nuhsait / ci4-api-starter
CodeIgniter 4 starter for pure JSON APIs: no views, errors as JSON, debug toolbar disabled.
v1.0.0
2026-09-26 09:48 UTC
Requires
- php: ^8.2
- codeigniter4/framework: ^4.7
Requires (Dev)
- fakerphp/faker: ^1.9
- mikey179/vfsstream: ^1.6
- phpunit/phpunit: ^10.5.16
Suggests
None
Provides
None
Conflicts
None
Replaces
None
README
A CodeIgniter 4 app starter for pure JSON APIs, based on codeigniter4/appstarter.
Differences from appstarter
- No views:
app/Viewsand theHomecontroller are removed. - Errors are returned as JSON, both in development and production.
- The Debug Toolbar is disabled.
- Responses are JSON only (no XML content negotiation).
Installation
composer create-project nuhsait/ci4-api-starter my-api
cd my-api
cp env .env
Edit .env for your app, specifically app.baseURL and the database settings.
Point your web server to the public folder, not to the project root.
Updating
composer update brings in new framework releases. Changes to the app folder are not
applied automatically: check the CodeIgniter release notes and merge the affected files
from vendor/codeigniter4/framework/app by hand.
Server Requirements
PHP 8.2 or higher, with the intl and mbstring extensions.
See the CodeIgniter user guide for everything else.
License
MIT