cFrame

The core framework includes simple functions like the development environment information, copy functions (can be used to recursively copy a directory), debugging functions, mailing functions, and a module loader. Below you will find the extensions provided to the framework, which are completely optional and modular, and for the most part independent of each other.

Extensions

Authentication

  • Provides authentication functions
  • Login with username, email, or identifier
  • User functions
  • Session functions
  • User verification (depends on the mail function from the core FW)

Cache

  • Cache file creation
  • Cache file updating
  • Cache checking (checks whether cache needs to be updated)
  • Displaying the cached version of pages

Error handler

  • Returns error pages to be displayed.

Layout

  • Returns layout files
  • Templatify (templating system that allows for dynamic pages)
  • Logic system for Templatify (if statements)
  • Formatting
  • Themes if enabled
  • Redirects
  • This requires the templatify.cfg.php to be located in your root $settings['location'] directory

Logging

  • Provides logging functions
  • Dependent on database functions

PDO/Database

  • Sets up database connection
  • Uses PDO
  • Wrapper functions

Perms

  • Depends on database functions
  • Returns user permission array
  • Can check for a permission
  • Shows array of roles
  • Depends on layout functions currently, but this should be changed soon

Router

  • Allows for routing with htaccess file or similar
  • Uses add route function to add routes
  • Uses process routes function once all routes are added
  • If using modules it is necessary to load modules first and then process routes

Security class

  • Currently only provides IP banning functions
  • Depends on database functions.

Directory Structure

You will need a directory structure similar to:

                    .
                    ├── include
                    │   ├── app
                    │   │   ├── app.trait.php
                    │   │   └── page.class.php
                    │   ├── assets
                    │   │   ├── images
                    │   │   │   ├── code.png
                    │   │   │   └── logo.svg
                    │   │   └── js
                    │   │       ├── jquery.min.js
                    │   │       └── main.js
                    │   ├── cFrame
                    │   │   └── src
                    │   │       ├── README.md
                    │   │       ├── auth.trait.php
                    │   │       ├── cache.trait.php
                    │   │       ├── errorhandler.trait.php
                    │   │       ├── framework.php
                    │   │       ├── layout.trait.php
                    │   │       ├── logging.trait.php
                    │   │       ├── pdo.trait.php
                    │   │       ├── perms.trait.php
                    │   │       ├── router.trait.php
                    │   │       └── security.trait.php
                    │   ├── layout
                    │   │   ├── 0001.lay
                    │   │   ├── 0002.lay
                    │   │   ├── 0003.lay
                    │   │   ├── 0004.lay
                    │   │   ├── 0005.lay
                    │   │   ├── 0006.lay
                    │   │   ├── 1001.lay
                    │   │   ├── 1002.lay
                    │   │   ├── 1003.lay
                    │   │   ├── 404.lay
                    │   │   └── pages
                    │   │       └── home
                    │   │           └── home.cbpage
                    │   └── templatify.cfg.php
                    ├── index.php
                    └── settings.php
                

And your settings file will need to look something like:

                    $settings = [];

                    $settings['title'] = 'TITLE';
                    $settings['contact'] = 'Support Email';
                    $settings['url'] = 'Your URL';

                    $settings['user'] = 'user';
                    $settings['pass'] = 'password';
                    $settings['db'] = 'db';
                    $settings['host'] = 'host';

                    $settings['location'] = 'include';

                    $settings['app'] = 'include/app/';
                    $settings['cFrame'] = "include/cFrame/src/";
                

For a database driven project.

Beta testers

We are looking for beta testers! The framework can run from both command line (minus obvious
browser based extensions) and a web server. For now it is best used on small to medium projects.