This project is a simple Model-View-Controller (MVC) framework built from scratch using native PHP. It follows best practices for structuring PHP applications and provides a foundation for developing web applications.
-
Routing System: A simple router to handle requests and map them to controllers.
-
Model-View-Controller (MVC) Architecture: Separation of concerns for better maintainability.
-
Autoloading: Uses PSR-4 autoloading via Composer.
-
Template Engine: Uses native PHP for rendering views or twig
-
Database Connection: Simple database wrapper for handling queries based on PDO
-
Error Handling & Logging: Basic error handling and logging mechanism.
-
Session & Authentication: Implements session-based authentication.
The Structure is in the beta version, a major changes will occur.
│── public/ # Public directory (index.php, assets, etc.)
│── src/
│ ├── app/ # Application core (MVC files)
│ │ ├── Controllers/
│ │ ├── Models/
│ │ ├── Views/
│ │ ├── Core/ # Framework core classes (Router, Controller, etc.)
│── vendor/ # Composer dependencies
│── composer.json # Composer autoload configuration
│── .env # Environment variables
│── .htaccess # Apache configuration for URL rewriting
-
PHP 8.x or higher
-
Composer installed
-
Apache/Nginx server with mod_rewrite enabled
php -S localhost:8000 -d display_errors=1 -t public
- Trae is an interactive IDE with an ai agent integrated to speed up productivity use it with caution : Trae.ai
This project is open-source and available under the MIT License.