Simple MVC architecture. AltoRouter integration. No complexity.
Just build your project.
git clone https://github.com/Gicehajunior/selfphp-framework.git
cd selfphp-framework
cp .env.example .env
composer install
selfphp sp-cmd run -o 8200
8000
Framework Author
"Simple and Customizable PHP Framework in MVC Architecture"
Clean, expressive routes just like you want them
<?php
/**
* SelfPhp Framework v1.3.0
* AltoRouter Integration
* @author Giceha Junior
*/
use SelfPhp\Route;
use App\Http\Auth\AuthController;
use App\Http\Controllers\DashboardController;
use App\Http\Controllers\HomeController;
use App\Http\Middleware\AuthMiddleware;
// GET Routes
Route::get('/', [HomeController::class, 'index']);
Route::get('/dashboard', [DashboardController::class, 'index'], [AuthMiddleware::class]);
Route::get('/login', [AuthController::class, 'login']);
Route::get('/register', [AuthController::class, 'signup']);
Route::get('/logout', [AuthController::class, 'logout']);
Route::get('/404', [AuthController::class, 'notFoundErrorPage']);
// POST Routes
Route::post('/login', [AuthController::class, 'login_user']);
Route::post('/register', [AuthController::class, 'signup_user']);
Route::get('/dashboard', [Controller::class, 'index'], [AuthMiddleware::class]);
Full HTTP method support with clean syntax
Controllers, Models, Views - organized
Complete setup guide to get your SelfPhp application running.
git clone https://github.com/Gicehajunior/selfphp-framework.git
cd selfphp-framework
cp .env.example .env
nano .env # Edit your database config
composer install
npm install && npm run build
selfphp sp-cmd run -o 8200
App runs at http://localhost:8200
Full documentation is on the way. We're building comprehensive guides, examples, and community resources to help you master SelfPhp Framework.
Visit the repository regularly for detailed documentation and community updates.
Star on GitHub