PHPackages                             simpletine/hmvc-shield - 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. [Authentication &amp; Authorization](/categories/authentication)
4. /
5. simpletine/hmvc-shield

ActiveLibrary[Authentication &amp; Authorization](/categories/authentication)

simpletine/hmvc-shield
======================

Features a modular HMVC (Hierarchical Model-View-Controller) architecture for CodeIgniter 4, integrated CodeIgniter 4 Shield and built with AdminLTE, providing a robust foundation for scalable web applications.

v1.3.2(1mo ago)15553—0%4[1 issues](https://github.com/Simpletine/CodeIgniter4-HMVC-Shield/issues)MITCSSPHP ^8.2

Since Jul 13Pushed 1mo ago3 watchersCompare

[ Source](https://github.com/Simpletine/CodeIgniter4-HMVC-Shield)[ Packagist](https://packagist.org/packages/simpletine/hmvc-shield)[ RSS](/packages/simpletine-hmvc-shield/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (7)Dependencies (8)Versions (10)Used By (0)

[![Official Website](https://camo.githubusercontent.com/453246990bd0cdc68af9ee911abaf625df8e424090d9ec4df93f5fe06536db5f/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4f6666696369616c5f576562736974652d56697369742d79656c6c6f77)](https://simpletine.com) [![YouTube Channel](https://camo.githubusercontent.com/9d965db92b70bb7dd8c7a9a3b12e172f1baf5dd18a14b73d956eb0d74b5768d9/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f596f75547562655f4368616e6e656c2d5375627363726962652d464630303030)](https://www.youtube.com/channel/UCRuDf31rPyyC2PUbsMG0vZw)

Codeigniter 4 HMVC
==================

[](#codeigniter-4-hmvc)

This repository features a modular HMVC (Hierarchical Model-View-Controller) architecture for CodeIgniter 4, integrated with the official authentication system, CodeIgniter 4 Shield. It also includes a comprehensive Admin Dashboard built with AdminLTE, providing a robust foundation for scalable and secure web applications.

Installation Guide
==================

[](#installation-guide)

Create a project

```
composer create-project simpletine/codeigniter4-starter ci4_hmvc --stability=dev
```

Copy `env` file and setup database environment

```
cp env .env
```

Run the app, using different port, add options `--port=9000`

```
php spark serve
```

Configuration
-------------

[](#configuration)

Install HMVC package

```
composer require simpletine/hmvc-shield
```

Setup Command Line

```
php spark simpletine:setup
```

Default Auth
------------

[](#default-auth)

```
email: super@admin.com
password: password
```

Create User
-----------

[](#create-user)

Use command line to create a new user

```
php spark shield:user create
```

Notice
------

[](#notice)

If you are using old versions, after composer update, you need to update the `index.php` and `spark` file to root folder (Upgrading to v4.4.8)

```
composer update
cp vendor/codeigniter4/framework/public/index.php public/index.php
cp vendor/codeigniter4/framework/spark spark
```

Module Commands
===============

[](#module-commands)

Commands available and funcationality

General
-------

[](#general)

Create a new module named `Blogs`

```
php spark module:create Blogs
```

Clone a existing module of `Blogs` and renamed to `Items`

```
php spark module:copy Blogs Items
```

Create a controller to module `Blogs` named `Categories.php`

```
php spark module:controller Blogs Categories
```

Create a model to module `Blogs` named `Categories.php`

```
php spark module:model Blogs Categories
```

Publisher
---------

[](#publisher)

Publish require assets to `public` folder

```
php spark publish:assets
```

Publish views with `AdminLTE` to `COnfig/Auth.php`

```
php spark publish:views
```

Admin
-----

[](#admin)

Additional options for the commands

Create a new controller and view to `Admin` module with `AdminLTE`

```
php spark module:controller Admin Users --admin
```

Modules Directory
-----------------

[](#modules-directory)

```
App
├── Modules
│   └── Blogs
│       ├──  Config
│           └──  Routes.php
│       ├──  Controllers
│           └──  Blogs.php
│       ├──  Models
│           └──  Blogs.php
│       └──  Views
│           └──  index.php
└── ...

```

### Route Group

[](#route-group)

Add new subroutes to `blogs` named `new` with method name

```
$routes->get('new', 'Blogs::new');
```

Sample of routes group after new subroutes

```
$routes->group(
    'blogs', ['namespace' => '\Modules\Blogs\Controllers'], function ($routes) {
        $routes->get('/', 'Blogs::index');
        $routes->get('new', 'Blogs::new');
    }
);
```

PHPCS
=====

[](#phpcs)

Default instance of containing all rules applicable for the CodeIgniter organization

```
composer run fix
```

PSR4
====

[](#psr4)

At `App/Config/Autoload.php`, you can configure your custom namespace:

```
public $psr4 = [
    "Blogs" => APPPATH . "Modules/Blogs", // Example
    // ...
];
```

###  Health Score

49

—

FairBetter than 95% of packages

Maintenance88

Actively maintained with recent releases

Popularity26

Limited adoption so far

Community13

Small or concentrated contributor base

Maturity58

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 92.9% 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 ~102 days

Recently: every ~150 days

Total

7

Last Release

50d ago

PHP version history (2 changes)v1.1.0PHP ^7.4 || ^8.0

v1.3.2PHP ^8.2

### Community

Maintainers

![](https://www.gravatar.com/avatar/0aaba5c38ca3788e9624656f2c09a1779babe5f93e915f0ac86c02c7a51e2cf9?d=identicon)[Simpletine](/maintainers/Simpletine)

---

Top Contributors

[![Simpletine](https://avatars.githubusercontent.com/u/107442254?v=4)](https://github.com/Simpletine "Simpletine (26 commits)")[![valentinechong](https://avatars.githubusercontent.com/u/80739222?v=4)](https://github.com/valentinechong "valentinechong (2 commits)")

---

Tags

authenticationcodeigniter4hmvc-codeigniterhmvc-frameworkshieldsimpletine

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Code StylePHP\_CodeSniffer

Type Coverage Yes

### Embed Badge

![Health badge](/badges/simpletine-hmvc-shield/health.svg)

```
[![Health](https://phpackages.com/badges/simpletine-hmvc-shield/health.svg)](https://phpackages.com/packages/simpletine-hmvc-shield)
```

###  Alternatives

[agungsugiarto/boilerplate

CodeIgniter4 Boilerplate based on AdminLTE 3 with user management, roles, permissions, ...

1647.7k](/packages/agungsugiarto-boilerplate)[agungsugiarto/codeigniter4-authentication

Provides an API for authentication and includes concrete authentication adapters for common use case scenarios

494.5k2](/packages/agungsugiarto-codeigniter4-authentication)[casbin/codeigniter-permission

Associate users with roles and permissions, use Casbin in CodeIgniter4 Web Framework.

443.0k](/packages/casbin-codeigniter-permission)

PHPackages © 2026

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