This is a blog application built with pure PHP, implementing the MVC (Model-View-Controller) architecture. A lightweight custom framework was developed specifically for this project, providing the essential features required to build and extend a modern PHP application.
- Create, read, update, delete blog posts
- Dynamic routing system for clean and user-friendly URLs.
- Basic form validation and error handling.
- Fully responsive design using Tailwind CSS (optional).
The project includes a custom lightweight PHP framework with the following features:
- Routing System: Handles dynamic routes and maps them to controllers, with middleware support.
- Template Rendering: Renders views with basic templating logic.
- Database Facades: Simplifies database queries.
- Policies: Ensure that users can only perform actions they are permitted to.
- CLI: Custom CLI, for creating Middlewares, Controllers, Models and run Migrations operations.
- Template Compiler: Converts custom template syntax inspired by HTML into PHP code. This allows developers to write expressive templates using a familiar syntax, like
<if>and<foreach>, which are seamlessly compiled into efficient PHP code. See the TEMPLATE file for details.
To read the framework documentation, install phpDocumentor and run the following command in your terminal:
php phpDocumentor.phar -d src -t framework-docsTo use the CLI run on your terminal:
php utils --help- Clone the repository:
git clone https://github.com/ttinonin/blog.git
cd blog/- Install dependencies:
composer install
npm install- Set up the database:
-
Create a
.envfile in the project root directory based on .env.example -
Run the migrations:
php utils migrate:run- Start the server:
php utils startContributions are welcome! Please fork the repository, create a new branch for your feature, and submit a pull request.
This project is licensed under the MIT License. See the LICENSE file for details.