Skip to content
/ blog Public

A lightweight PHP blog application with custom MVC framework. Featuring simple routing, database management, and authorization policies.

License

Notifications You must be signed in to change notification settings

ttinonin/blog

Repository files navigation

PHP Blog Application

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.

Features

  • 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).

Framework Features

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.

Documentation

To read the framework documentation, install phpDocumentor and run the following command in your terminal:

php phpDocumentor.phar -d src -t framework-docs

CLI

To use the CLI run on your terminal:

php utils --help

Instalation

  1. Clone the repository:
git clone https://github.com/ttinonin/blog.git
cd blog/
  1. Install dependencies:
composer install
npm install
  1. Set up the database:
  • Create a .env file in the project root directory based on .env.example

  • Run the migrations:

php utils migrate:run
  1. Start the server:
php utils start

Contributing

Contributions are welcome! Please fork the repository, create a new branch for your feature, and submit a pull request.

License

This project is licensed under the MIT License. See the LICENSE file for details.

About

A lightweight PHP blog application with custom MVC framework. Featuring simple routing, database management, and authorization policies.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages