SelfPhp Framework v1.3.0

PHP Framework That Gives You
A Headstart

Simple MVC architecture. AltoRouter integration. No complexity.
Just build your project.

Quick start
git clone https://github.com/Gicehajunior/selfphp-framework.git
cd selfphp-framework
cp .env.example .env
composer install
Run your app:
selfphp sp-cmd run -o 8200
Default port:
8000
Giceha Junior
@GicehaJunior

Framework Author

"Simple and Customizable PHP Framework in MVC Architecture"

1 star 1 watching 1 fork
View on GitHub Buy me a coffee

AltoRouter Powered Routing

Clean, expressive routes just like you want them

routes/web.php
<?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']);
Middleware Support

Route::get('/dashboard', [Controller::class, 'index'], [AuthMiddleware::class]);

GET & POST

Full HTTP method support with clean syntax

MVC Architecture

Controllers, Models, Views - organized

Get Started in Minutes

Complete setup guide to get your SelfPhp application running.

Requirements
  • PHP 7.4+
  • Composer
  • Node.js & npm
  • MySQL (optional)
1
Clone the Repository
git clone https://github.com/Gicehajunior/selfphp-framework.git
2
Navigate to Project
cd selfphp-framework
3
Set Up Configuration
cp .env.example .env nano .env # Edit your database config
4
Install Dependencies
composer install npm install && npm run build
5
Run the Framework
selfphp sp-cmd run -o 8200 App runs at http://localhost:8200
COMING SOON

SelfPhp SDK Documentation

Full documentation is on the way. We're building comprehensive guides, examples, and community resources to help you master SelfPhp Framework.

Stay Updated

Visit the repository regularly for detailed documentation and community updates.

Star on GitHub
SELFPHP

SELFPHP FRAMEWORK


Simple and Customizable PHP Framework in MVC Architecture