Architecture & Features

Last updated: Jan 1st, 2017

Features

  • PSR 7 Compliant
  • Easy to work with
  • Secure
  • Pluggable Design
  • Twig Template Engine
  • Auto Cron Job Handler
  • Strong Database Abstraction Layer
  • Support for Rabbit MQ & Redis
  • Extensive Documentation
  • Simple Configuration

Architecture

Speedy is a full stack framework as it handles everything from serving the web content to database management and also managing the HTML generation all integrated in one Framework. Speedy provides an amazing experience for developers and designers alike.

Project Structure

Speedy follows the following directory and file structure:

Speedy

This is the project root directory, it contains all the project and framework data.

App

The App directory holds the app configuration and the routes to be used.

config.php

Holds the app configuration array which may be accessed within the app in the $_ENV variables.

Routes.php

This is where all the routes for the application are declared.

Controllers

Contains the controllers required for the application.

WelcomeController.php

A sample controller file. Notice the camelCase of the controller name which is also the name of the class it contains.

Core

This directory contains the main classes and files required for the framework to function.

autoload.php

The autoload file is the primary linking point of all the Core classes and plugins. It automatically loads the classes from the /Core Directory.

Bridge.php

The Bridge.php is the interfacing bridge between the back-end of the application and the user. Any request that passes to the application, comes through the Bridge Class.

Classes

Contains the framework base classes.

BaseAuth.php

Contains the Base Authentication Class for Auth Middleware

BaseController.php

Contains the Base Class for working with Controllers.

BaseCSRF.php

Contains the Base Class for CSRF Token based Middleware.

Crontab.php

Speedy's Auto Cron handler.

DB.php

Database management Database Abstraction Layer(DAL) container.

Helpers.php

Framework's Helper functions container which can be called without objects or parent classes.

Input.php

Request data filtering and handling Class.

Mailer.php

Mail Handling Class, used to send out mails.

Route.php

Application Routing management class.

Session.php

Fast Session Handler / Manager class.

System.php

Class containing framework's core functions.

Middleware

Contains the Application's Middleware. Custom Middleware can be added.

Auth.php

Authentication Middleware Class.

CSRF.php

CSRF Middleware Class.

Plugins

This directory holds the sub applications required for the functioning of the Framework, anything added or removed in composer.json gets affected in this directory.

Crontab

Holds the Speedy auto cron handler definition file.

Cron.php

Contains the cron commands to be executed along with their job run schedules.

cronLog.log

Contains the cron-job run logs.

DBTables

Contains Migrations (SQL Files) and lock file. Sql Files added here can be used to update database by running the migration command of creator.

migrations.lock

Register that maintains the migration run details.

table_api_keys.sql

SQL File containing migration(SQL Code) for API Keys table.

table_users.sql

SQL File containing migration(SQL Code) for Users table.

docs

This is the directory which contains the Framework's Manual. The reference you are currently reading rests here :)

public

This is the publicly accessible directory all the custom css, js, images and other static files should be placed here (preferably all bundled in a directory e.g. assets).

.htaccess

This is the application request forwarding file aka. the apache server configuration file.

index-php

This is the file to which all the user requests finally head to for further processing.

Storage

This directory contains the cache and log files of Speedy.

Cache

This directory contains the template engine cache files.

Views

Template engine views cache directory.

.store

Storage lock file.

log.log

Contains application's log messages

tests

Contains unit testing files.

FlowTest.php

PHPUnit basic flow tests file.

Views

Contains application view files. All files contained herein should possibly end with the .vu.php file extension.

404.vu.php

404 Error Page.

welcome.vu.php

Welcome Page.

app.lock

Application initialization lock file.

composer.json

Composer dependency management file.

creator

This is the file which should be executed in the command line to execute application functions such as migrating tables or creating controllers etc.

LICENSE

Speedy PHP Framework End User License Agreement (EULA) file.

README.md

Description and installation procedure of Speedy PHP Framework.

server.php

Invoked when development server is started.