Zen is a lightweight PHP framework designed for building web applications with an MVC architecture. It includes built-in routing, dependency injection, authentication, validation, and session management.
- MVC Architecture: Organized structure with Models, Views, and Controllers.
- Routing: Simple and flexible routing system with middleware support.
- Dependency Injection: Container-based DI for managing dependencies.
- Database: PDO-based database abstraction for MySQL.
- Authentication: Built-in login, register, and logout functionality with role-based access.
- Validation: Form validation with error handling and flashing.
- Sessions: Session management with flash messages.
- Styling: Integrated with Tailwind CSS for modern UI.
-
Clone the repository:
git clone https://github.com/shimijallores/zen.git cd zen -
Install PHP dependencies:
composer install
-
Install Node.js dependencies (for Tailwind CSS):
npm install
-
Set up environment variables:
- Copy
.env.exampleto.envand configure your database settings.
- Copy
-
Set up the database:
- Create a MySQL database.
- Run the SQL schema from
database/database.sql(if provided).
-
Start the development server:
php -S localhost:8000 -t public
-
Build CSS (in a separate terminal):
npm run dev
- Access the application at
http://localhost:8000. - Default route redirects to
/airlines. - Admin routes require authentication.
- Use the provided controllers and models as examples to build your application.
Core/: Framework core classes (App, Database, Router, etc.)Http/controllers/: Application controllersHttp/models/: Data modelsHttp/views/: View templatesHttp/Services/: Service classesdatabase/: Database schema and migrationspublic/: Public assets (CSS, JS, images)routes.php: Route definitionsconfig.php: Configuration settingsbootstrap.php: Application bootstrap
- PHP 8.0+
- MySQL
- Composer
- Node.js (for CSS compilation)
This project is licensed under the MIT License.