PHPackages                             msplus247/akpan - 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. msplus247/akpan

ActiveProject[Framework](/categories/framework)

msplus247/akpan
===============

A lightweight PHP MVC framework.

v6.0(9mo ago)05[1 PRs](https://github.com/msplusapps/akpan/pulls)MITPHPPHP ^8.1

Since Jul 13Pushed 9mo agoCompare

[ Source](https://github.com/msplusapps/akpan)[ Packagist](https://packagist.org/packages/msplus247/akpan)[ RSS](/packages/msplus247-akpan/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (1)DependenciesVersions (11)Used By (0)

AkpanMVC
========

[](#akpanmvc)

**AkpanMVC** is a lightweight, beginner-friendly PHP MVC framework built for rapid development. It supports clean routing, controller architecture, SQL migrations, middleware, and simple view rendering.

---

🚀 Features
----------

[](#-features)

- ✅ Simple expressive routing (`GET`, `POST`)
- ✅ Middleware support (`auth`, `guest`, custom)
- ✅ Controller-based architecture
- ✅ SQL-based migration system
- ✅ Blade-like views with data passing
- ✅ PSR-4 Composer autoloading
- ✅ `.env` configuration loader
- ✅ Debugging with styled console output
- ✅ Session-based user auth structure
- ✅ Auto-loading route/middleware files
- ✅ Composer ready

---

📦 Installation
--------------

[](#-installation)

Install AkpanMVC using Composer:

```
composer create-project msplusapps/akpan myproject
```

🗂 Directory Structure
---------------------

[](#-directory-structure)

myproject/ ├── app/ │ ├── controllers/ → Controllers like AuthController.php │ ├── models/ → Models like User.php │ ├── views/ → Views like home.view.php │ ├── routes/ → Route files (web.php, auth.php) │ ├── middlewares/ → Middleware functions (auth.php, guest.php) │ └── migrations/ → .sql migration files ├── core/ │ ├── Router.php │ ├── Controller.php │ ├── Model.php │ ├── Env.php │ ├── Database.php │ └── Migrations.php ├── public/ │ └── index.php → Entry point ├── logs/ │ └── error.log ├── .env ├── composer.json └── README.md

⚙️ .env Configuration
---------------------

[](#️-env-configuration)

DB\_HOST=localhost DB\_NAME=akpanmvc DB\_USER=root DB\_PASS=

🌐 Routing
---------

[](#-routing)

Router::get('/', \['WebController', 'index'\])-&gt;name('home');

Router::get('/login', \['AuthController', 'login'\])-&gt;name('login'); Router::post('/auth', \['AuthController', 'authenticate'\])-&gt;middleware('guest');

Router::get('/dashboard', \['DashboardController', 'index'\])-&gt;middleware('auth');

\##🧍‍♂️ Middleware // app/middlewares/auth.php function auth() { if (!isset($\_SESSION\['user'\])) { header("Location: /login"); exit; } }

Router::get('/dashboard', \['DashboardController', 'index'\])-&gt;middleware('auth');

🧩 Controllers
-------------

[](#-controllers)

class WebController extends Controller { public function index() { return $this-&gt;view('home', \['title' =&gt; 'Welcome'\]); } }

Use $this-&gt;view('file', \['data' =&gt; 'value'\]) to pass data to views.

🧬 Models
--------

[](#-models)

class User extends Model { protected $table = 'users'; }

$users = User::all(); $user = User::find(1);

📚 Views
-------

[](#-views)

Views are .view.php files stored in app/views/.

Render them from a controller: return $this-&gt;view('auth/login', \['title' =&gt; 'Login'\]); Example app/views/auth/login.view.php:

 Login 📜 Migrations
------------

[](#-migrations)

Add .sql files to app/migrations/.

Example 2024\_07\_12\_create\_users\_table.sql:

CREATE TABLE users ( id INT AUTO\_INCREMENT PRIMARY KEY, name VARCHAR(100), email VARCHAR(100) UNIQUE, password VARCHAR(255), created\_at TIMESTAMP DEFAULT CURRENT\_TIMESTAMP ); Migrations are executed once and logged to the msk\_migrations table.

🧪 Local Testing
---------------

[](#-local-testing)

Run the app locally using PHP’s built-in server:

php -S localhost:8000 -t public Then visit:

Debugging
---------

[](#debugging)

Debug output is automatically displayed via Router::debug():

\[ROUTE LOADED\] app/routes/web.php \[DISPATCH\] GET '/' \[EXECUTE\] WebController::index() Errors are saved to logs/error.log for further inspection.

📜 License
---------

[](#-license)

AkpanMVC is open-sourced software licensed under the MIT license.

🙌 Author
--------

[](#-author)

msplusapps GitHub: @msplusapps Packagist: msplusapps/akpan

💡 Contribute
------------

[](#-contribute)

Fork this repository

Create your feature branch (git checkout -b feature/new-feature)

Commit your changes

Push to the branch

Open a Pull Request

❤️ Thank You Thanks for using AkpanMVC — we’d love to hear your feedback and ideas!

###  Health Score

32

—

LowBetter than 72% of packages

Maintenance56

Moderate activity, may be stable

Popularity4

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity51

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 75.3% 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.

###  Release Activity

Cadence

Every ~3 days

Total

6

Last Release

296d ago

Major Versions

v1.0.0 → v3.0.02025-07-16

v2.0.0 → v4.0.02025-07-17

v4.0.0 → v5.02025-07-27

v5.0 → v6.02025-07-27

### Community

Maintainers

![](https://www.gravatar.com/avatar/799e180f5a726984d7a8e22ce1712a5efe9d897b5f9c8326489f6ed657024fdf?d=identicon)[msplusapps](/maintainers/msplusapps)

---

Top Contributors

[![msplusapps](https://avatars.githubusercontent.com/u/220552281?v=4)](https://github.com/msplusapps "msplusapps (67 commits)")[![google-labs-jules[bot]](https://avatars.githubusercontent.com/in/842251?v=4)](https://github.com/google-labs-jules[bot] "google-labs-jules[bot] (22 commits)")

### Embed Badge

![Health badge](/badges/msplus247-akpan/health.svg)

```
[![Health](https://phpackages.com/badges/msplus247-akpan/health.svg)](https://phpackages.com/packages/msplus247-akpan)
```

###  Alternatives

[laravel/passport

Laravel Passport provides OAuth2 server support to Laravel.

3.4k85.0M532](/packages/laravel-passport)[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.7M259](/packages/laravel-dusk)[laravel/prompts

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

712181.8M596](/packages/laravel-prompts)[cakephp/chronos

A simple API extension for DateTime.

1.4k47.7M121](/packages/cakephp-chronos)[laravel/pail

Easily delve into your Laravel application's log files directly from the command line.

91545.3M590](/packages/laravel-pail)

PHPackages © 2026

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