Sirius is a very simple PHP framework (MVC), I built it from scratch as a try to understanding OOP and MVC\Frameworks and how they works like Laravel and how they built it ... of course its not as big as Laravel .. No, it's just a simple framework covers the basis of MVC concept.
I'm sharing this project with you if anyone want to understanding or developing it like so..


Features

  • Simple structure.
  • Using environment variables.
  • Very basic `get` routing system without using a library.
  • Powerful error handling system using `Whoops`.
  • Laravel's Blade template engine usign `BladeOne`.
  • Working with database using  `Eloquent ORM`.


Installation
No need for composer to install the framework, just download the framework and getting started .

Configuration
Public Directory
The index.php in `Public` directory serves as the front controller for all HTTP requests entering your application.

Configuration Files
All configuration files are stored in the `config` directory.

App Configuration
After installing Sirius framework, you should configure the `name` of the application or the `database connection info`...

So in the main files of the framework there is a file called `.env` this file contains the general app configuration as the following example :

APP_NAME=Sirius          // App name
APP_INDEX=welcome        // App index view [Default : welcome]
APP_DEBUG=true           // App debuging [Enalble : true, Disable : flase]

DB_DRIVER=mysql          // Database driver [Default : mysql]
DB_PORT=3306             // Database port
DB_HOST=127.0.0.1        // Database host name
DB_USERNAME=             // Database username
DB_PASSWORD=             // Database password
DB_DATABASE=             // Database name

if .env file is missing! there is a copy of the file called .env.example just copy it and remove .example from it's name.


Getting started

Structure

Sirius                           // Framework directory
     |__app                      // App directory
     |    |__Controllers         // App controllers
     |    |__Models              // App models
     |    Functions.php          // App functions
     |    Route.php              // App route system
     |    
     |__config                   // Config directory
     |       database.php        // Database configuration [you can configure DB from `.env` file]
     |       
     |__public                   // Public directory
     |       |__css              // App css files
     |       |__js               // App javascript files
     |       -index.php           // Public index [read `Public directory` in above `Configuration`]
     |       
     |__resources                // Resources directory
     |          |__cache         // Views cache
     |          |__views         // Views directory
     |          
     |__routes                   // Routes Directory
     |       web.php             // Setting routes file
     |       
     |__vendor                   // Vendor file [contains various third-party libraries and their dependencies by composer]
     .env                        // Environment variables
     .env.example                // `.env` copy
     composer.json               // composer file
     composer.lock               // composer file

...

You can read the full documentation on the Github repo of this project :

That's it :)