PHPackages                             almhdy24/php-mini-mvc - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Framework](/categories/framework)
4. /
5. almhdy24/php-mini-mvc

ActiveProject[Framework](/categories/framework)

almhdy24/php-mini-mvc
=====================

Professional PHP Mini MVC Skeleton

00PHP

Since Mar 22Pushed 1mo agoCompare

[ Source](https://github.com/almhdy24/php-mini-mvc)[ Packagist](https://packagist.org/packages/almhdy24/php-mini-mvc)[ RSS](/packages/almhdy24-php-mini-mvc/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

🚀 PHP Mini MVC Skeleton
=======================

[](#-php-mini-mvc-skeleton)

[![PHP](https://camo.githubusercontent.com/8e616b32ea6d2562125d6120fddeedd8bddd16548f82d100ebe6a50980445733/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f5048502d382532422d626c7565)](https://camo.githubusercontent.com/8e616b32ea6d2562125d6120fddeedd8bddd16548f82d100ebe6a50980445733/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f5048502d382532422d626c7565) [![Composer](https://camo.githubusercontent.com/3b82e75e4adcf1823fbb60a68d313ea3f93b97f8d82eb05783d541107d621fdd/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f436f6d706f7365722d72657175697265642d627269676874677265656e)](https://camo.githubusercontent.com/3b82e75e4adcf1823fbb60a68d313ea3f93b97f8d82eb05783d541107d621fdd/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f436f6d706f7365722d72657175697265642d627269676874677265656e) [![License](https://camo.githubusercontent.com/5caa455d8debc46fb23abbadb45a733a937f3910a73fc875c2f7820468e1bb54/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4c6963656e73652d4d49542d677265656e)](https://camo.githubusercontent.com/5caa455d8debc46fb23abbadb45a733a937f3910a73fc875c2f7820468e1bb54/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4c6963656e73652d4d49542d677265656e)

This is a simple, clean, and lightweight MVC (Model-View-Controller) starter kit built specifically for PHP 8+. It is perfect if you want to build a small-to-medium web project without the complexity or weight of a huge framework. It keeps things fast, organized, and easy to understand.

📑 Table of Contents
-------------------

[](#-table-of-contents)

- [Features](#-features)
- [Tech Stack](#-tech-stack)
- [Installation](#-installation)
- [Usage](#-usage)
- [Project Structure](#-project-structure)
- [License](#-license)

---

✨ Features
----------

[](#-features)

- 🏗️ **Classic MVC Pattern**: Clear separation of concerns between logic, data, and presentation.
- 📦 **PSR-4 Autoloading**: Modern class loading using Composer.
- 🛣️ **Custom Router**: Lightweight URL routing with support for dynamic parameters (e.g., `/users/{id}`).
- 🗄️ **Base Model (PDO)**: Ready-to-use SQLite integration with common CRUD operations.
- 🛡️ **Error Handling**: Custom exception and error handling for cleaner debugging.
- ⚡ **Zero Bloat**: Extremely minimal codebase; perfect for rapid prototyping.

---

🛠️ Tech Stack
-------------

[](#️-tech-stack)

- **Language**: PHP 8+
- **Package Manager**: Composer
- **Database**: SQLite (default)
- **Architecture**: MVC

---

📥 Installation
--------------

[](#-installation)

1. Clone the repository:

    ```
    git clone https://github.com/almhdy24/php-mini-mvc.git
    cd php-mini-mvc
    ```
2. Install dependencies:

    ```
    composer install
    ```
3. Start the local server:

    ```
    php -S localhost:8000 -t public
    ```
4. Access the application at `http://localhost:8000`.

---

💡 Usage
-------

[](#-usage)

### Adding a New Route

[](#adding-a-new-route)

Edit `routes/web.php` to map URLs to Controllers:

```
$router->get('/profile', ['ProfileController', 'index'], 'profile');
```

### Creating a Controller

[](#creating-a-controller)

Create a new file in `app/Controllers/` extending `App\Core\Controller`:

```
namespace App
aulControllers;
use App\Core\Controller;

class ProfileController extends Controller {
    public function index() {
        $this->view('profile', ['user' => 'John Doe']);
    }
}
```

---

📁 Project Structure
-------------------

[](#-project-structure)

PathDescription`/app`Core application logic (Controllers, Models, Views)`/config`Application configuration files`/public`Entry point of the application (index.php)`/routes`Route definitions`/storage`SQLite database file storage---

📜 License
---------

[](#-license)

Distributed under the MIT License. See `LICENSE` for more information.

---

🔗 Important Links
-----------------

[](#-important-links)

- [GitHub Repository](https://github.com/almhdy24/php-mini-mvc)

---

Built with ❤️ by almhdy24 | [View on GitHub](https://github.com/almhdy24/php-mini-mvc)

If you find this project useful, please consider giving it a star! 🌟

###  Health Score

20

—

LowBetter than 14% of packages

Maintenance63

Regular maintenance activity

Popularity0

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity11

Early-stage or recently created project

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

### Community

Maintainers

![](https://www.gravatar.com/avatar/18e19c1fe6a43546aafedabd3958bc2cb26bf8d7d83989fbe5cc9f8334f257de?d=identicon)[almhdy](/maintainers/almhdy)

---

Top Contributors

[![almhdy24](https://avatars.githubusercontent.com/u/67668895?v=4)](https://github.com/almhdy24 "almhdy24 (2 commits)")

### Embed Badge

![Health badge](/badges/almhdy24-php-mini-mvc/health.svg)

```
[![Health](https://phpackages.com/badges/almhdy24-php-mini-mvc/health.svg)](https://phpackages.com/packages/almhdy24-php-mini-mvc)
```

###  Alternatives

[laravel/telescope

An elegant debug assistant for the Laravel framework.

5.2k67.8M190](/packages/laravel-telescope)[spiral/roadrunner

RoadRunner: High-performance PHP application server and process manager written in Go and powered with plugins

8.4k12.2M84](/packages/spiral-roadrunner)[nolimits4web/swiper

Most modern mobile touch slider and framework with hardware accelerated transitions

41.8k177.2k1](/packages/nolimits4web-swiper)[laravel/dusk

Laravel Dusk provides simple end-to-end testing and browser automation.

1.9k36.7M255](/packages/laravel-dusk)[laravel/prompts

Add beautiful and user-friendly forms to your command-line applications.

708181.8M591](/packages/laravel-prompts)[cakephp/chronos

A simple API extension for DateTime.

1.4k47.7M119](/packages/cakephp-chronos)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
