Libok is a PHP project boilerplate built on the principles of Clean Architecture. It comes with ready-to-use features like user authentication and management, using Doctrine ORM and Bootstrap 5 fot UI.
- Clean Architecture: Separation of concerns into Domain, Application, Infrastructure, and Framework layers.
- Doctrine ORM: Powerful database abstraction layer for robust data management.
- User Management: Full CRUD functionality for users (Login, Registration, List, Create, Edit, Delete).
- Bootstrap 5 UI: Clean and responsive views.
- PSR-4 Autoloading: Standardized project structure managed by Composer.
- Environment-based Configuration: Uses
.envfiles for secure and flexible configuration. - Testing Suite: Includes templates for Unit and Integration tests with PHPUnit.
- PHP >= 8.1
- Composer
- A database server (e.g., MySQL, MariaDB, PostgreSQL)
-
Clone the repository:
git clone https://github.com/mmarcwabo/libok.git cd libok -
Install PHP dependencies:
composer install
-
Configure your environment: Copy the example environment file and update it with your database credentials.
cp .env.example .env
Now, open
.envand edit theDB_*variables. -
Create the database schema: Run the Doctrine command-line tool to create the necessary tables in your database.
composer schema-create
Use PHP's built-in web server to run the application locally.
-
Start the server: Run this command from the project's root directory.
composer serve
This is equivalent to:
php -S localhost:8000 -t public
-
Access the application: Open your web browser and navigate to
http://localhost:8000.
The project is configured to use an in-memory SQLite database for testing, so no additional setup is required.
To run the full test suite (Unit and Integration tests), execute:
composer test