PHPackages                             kenjis/ci4-app-template - 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. kenjis/ci4-app-template

ActiveProject[Framework](/categories/framework)

kenjis/ci4-app-template
=======================

CodeIgniter4 application template

v44.5.0(2y ago)184014[1 issues](https://github.com/kenjis/ci4-app-template/issues)[1 PRs](https://github.com/kenjis/ci4-app-template/pulls)MITPHPPHP ^7.4 || ^8.0

Since Feb 11Pushed 2y ago1 watchersCompare

[ Source](https://github.com/kenjis/ci4-app-template)[ Packagist](https://packagist.org/packages/kenjis/ci4-app-template)[ Docs](https://github.com/kenjis/ci4-app-template)[ RSS](/packages/kenjis-ci4-app-template/feed)WikiDiscussions ci4-app-template Synced today

READMEChangelog (10)Dependencies (9)Versions (25)Used By (0)

CodeIgniter 4 Application Template
==================================

[](#codeigniter-4-application-template)

This template changes the default configuration of CI4 more secure.

This repository includes:

- [CodeIgniter](https://github.com/codeigniter4/CodeIgniter4) 4.4.5
    - [Translations for CodeIgniter 4 System Messages](https://github.com/codeigniter4/translations) dev-develop
    - [CodeIgniter DevKit](https://github.com/codeigniter4/devkit) 1.2.0
- [PHPUnit](https://github.com/sebastianbergmann/phpunit) 9.6.16
- [Tatter\\Patches](https://github.com/tattersoftware/codeigniter4-patches) 2.1.0
- [Liaison Revision](https://github.com/paulbalandan/liaison-revision) 1.1.0
- [bear/qatools](https://github.com/bearsunday/BEAR.QATools) 1.10.0

Requirements
------------

[](#requirements)

- [PHP 7.4](https://www.php.net/releases/7_4_0.php) or later
    - [intl](http://php.net/manual/en/intl.requirements.php)
    - [libcurl](http://php.net/manual/en/curl.requirements.php) if you plan to use the HTTP\\CURLRequest library
    - json (enabled by default - don't turn it off)
    - [mbstring](http://php.net/manual/en/mbstring.installation.php)
    - [mysqlnd](http://php.net/manual/en/mysqlnd.install.php) if you plan to use MySQL
    - xml (enabled by default - don't turn it off)

How to Install
--------------

[](#how-to-install)

### Composer

[](#composer)

```
$ composer create-project kenjis/ci4-app-template your-project
```

### Git

[](#git)

```
$ git clone https://github.com/kenjis/ci4-app-template.git your-project
$ cd your-project/
$ composer install
$ git checkout -b main
```

How to Update
-------------

[](#how-to-update)

Update Composer packages:

```
$ composer update
```

Update your CodeIgniter4 project files:

```
$ php spark revision:update
```

How to Use
----------

[](#how-to-use)

### Services

[](#services)

- All Services must be manually added to `app/Config/Services.php`, even if third-party CI4 packages have their own Services.

### CSRF

[](#csrf)

- You must set CSRF token field in your form manually. See

### CSP

[](#csp)

- You must set CSP when you need. See
- You need to use `csp_script_nonce()` and `csp_style_nonce()` for inline contents. See

Changes from the CI4 Default Configuration
------------------------------------------

[](#changes-from-the-ci4-default-configuration)

### Services

[](#services-1)

- Auto-Discovery of services is disabled. [app/Config/Modules.php](https://github.com/kenjis/ci4-app-template/blob/ci4-app-template/app/Config/Modules.php#L82).
- `Config\Services` extends `CodeIgniter\Config\Services`. [app/Config/Services.php](https://github.com/kenjis/ci4-app-template/blob/ci4-app-template/app/Config/Services.php#L20).

### Configs

[](#configs)

- BaseURL's `index.php` is removed.
    - [app/Config/App.php](https://github.com/kenjis/ci4-app-template/blob/ci4-app-template/app/Config/App.php#L43)
- Auto Routing (Improved) is enabled.
    - [app/Config/Routing.php](https://github.com/kenjis/ci4-app-template/blob/ci4-app-template/app/Config/Routing.php#L93) and [app/Config/Feature.php](https://github.com/kenjis/ci4-app-template/blob/ci4-app-template/app/Config/Feature.php#L29)
    - See
- `Config\CURLRequest::$shareOptions` is disabled. (Since v4.4.0, this is set by default.)
    - [app/Config/CURLRequest.php](https://github.com/kenjis/ci4-app-template/blob/ci4-app-template/app/Config/CURLRequest.php#L19).
    - See
- MySQLi's `numberNative` is enabled.
    - [app/Config/Database.php](https://github.com/kenjis/ci4-app-template/blob/ci4-app-template/app/Config/Database.php#L45)
    - See
- Using Session-based CSRF protection.
    - [app/Config/Security.php](https://github.com/kenjis/ci4-app-template/blob/ci4-app-template/app/Config/Security.php#L18).
    - See
- CSRF protection `$tokenRandomize` is enabled.
    - [app/Config/Security.php](https://github.com/kenjis/ci4-app-template/blob/ci4-app-template/app/Config/Security.php#L29).
    - See
- CSP is enabled.
    - [app/Config/App](https://github.com/kenjis/ci4-app-template/blob/ci4-app-template/app/Config/App.php#L176).
    - See
- CSP `$autoNonce` is disabled.
    - [app/Config/ContentSecurityPolicy](https://github.com/kenjis/ci4-app-template/blob/ci4-app-template/app/Config/ContentSecurityPolicy.php#L175).
    - See
- Strict Validation Rules are used. (Since v4.3.0, this is set by default.)
    - [app/Config/Validation.php](https://github.com/kenjis/ci4-app-template/blob/ci4-app-template/app/Config/Validation.php#L24-L27).
    - See

### Filters

[](#filters)

- CSRF filter is enabled.
    - [app/Config/Filters.php](https://github.com/kenjis/ci4-app-template/blob/ci4-app-template/app/Config/Filters.php#L60-L63).
    - See
- InvalidChars filter is enabled.
    - [app/Config/Filters.php](https://github.com/kenjis/ci4-app-template/blob/ci4-app-template/app/Config/Filters.php#L39).
    - See
- SecureHeaders filter is enabled.
    - [app/Config/Filters.php](https://github.com/kenjis/ci4-app-template/blob/ci4-app-template/app/Config/Filters.php#L44).
    - See

### Features

[](#features)

- `Config\Feature::$multipleFilters` is enabled.
    - [app/Config/Feature.php](https://github.com/kenjis/ci4-app-template/blob/ci4-app-template/app/Config/Feature.php#L24).
    - See

### Others

[](#others)

- Using `develop` version CI4. [app/Config/Paths.php](https://github.com/kenjis/ci4-app-template/blob/ci4-app-template/app/Config/Paths.php#L28).

Available Commands
------------------

[](#available-commands)

```
composer test              // Run PHPUnit
composer cs-fix            // Fix the coding style
composer cs                // Check the coding style
composer sa                // Run static analysis
composer run-script --list // List all commands

```

Related Projects for CodeIgniter 4.x
------------------------------------

[](#related-projects-for-codeigniter-4x)

### Libraries

[](#libraries)

- [CodeIgniter 3 to 4 Upgrade Helper](https://github.com/kenjis/ci3-to-4-upgrade-helper)
- [CodeIgniter3-like Captcha](https://github.com/kenjis/ci3-like-captcha)
- [PHPUnit Helper](https://github.com/kenjis/phpunit-helper)
- [CodeIgniter4 Attribute Routes](https://github.com/kenjis/ci4-attribute-routes)
- [CodeIgniter Simple and Secure Twig](https://github.com/kenjis/codeigniter-ss-twig)
- [CodeIgniter4 Viewi Demo](https://github.com/kenjis/ci4-viewi-demo)

### Tutorials

[](#tutorials)

- [CodeIgniter 4 News Tutorial](https://github.com/kenjis/ci4-news)
- [CodeIgniter 4 Validation Tutorial](https://github.com/kenjis/ci4-validation-tutorial)
- [CodeIgniter4 Code Modules Test](https://github.com/kenjis/ci4-modules-test)
- [CodeIgniter 4 File Upload](https://github.com/kenjis/ci4-file-upload)

### Building Development Environment

[](#building-development-environment)

- [CodeIgniter4 Application Template](https://github.com/kenjis/ci4-app-template)
- [CodeIgniter4 Composer Installer](https://github.com/kenjis/ci4-composer-installer)
- [docker-codeigniter-apache](https://github.com/kenjis/docker-codeigniter-apache)

###  Health Score

33

—

LowBetter than 75% of packages

Maintenance19

Infrequent updates — may be unmaintained

Popularity23

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity68

Established project with proven stability

 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.

###  Release Activity

Cadence

Every ~47 days

Recently: every ~153 days

Total

24

Last Release

826d ago

Major Versions

v41.99.6 → v42.0.02022-06-07

v42.10.0 → v43.2.02023-03-16

v43.2.0 → v44.5.02024-02-03

PHP version history (2 changes)v41.1.0PHP &gt;=7.3

v41.99.0PHP ^7.4 || ^8.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/220fcd79c66bd061265dfe8d29cc640250616c4719dfb31f4ab87a1af101dc65?d=identicon)[kenjis](/maintainers/kenjis)

---

Top Contributors

[![kenjis](https://avatars.githubusercontent.com/u/87955?v=4)](https://github.com/kenjis "kenjis (188 commits)")

---

Tags

codeignitercodeigniter4project-templatecodeigniterproject templatecodeigniter4

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/kenjis-ci4-app-template/health.svg)

```
[![Health](https://phpackages.com/badges/kenjis-ci4-app-template/health.svg)](https://phpackages.com/packages/kenjis-ci4-app-template)
```

###  Alternatives

[composer/installers

A multi-framework Composer library installer

1.4k136.0M6.0k](/packages/composer-installers)[michalsn/codeigniter-htmx

HTMX helper for CodeIgniter 4 framework

8140.9k](/packages/michalsn-codeigniter-htmx)[codeigniter/phpstan-codeigniter

CodeIgniter extensions and rules for PHPStan

17457.2k30](/packages/codeigniter-phpstan-codeigniter)[tatter/frontend

Opinionated suite of frontend tech for CodeIgniter 4

125.3k](/packages/tatter-frontend)[monken/tablesigniter

CodeIgniter4 starter app

133.2k](/packages/monken-tablesigniter)

PHPackages © 2026

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