Search by

nuhsait / ci4-api-starter

nuhsait

CodeIgniter 4 starter for pure JSON APIs: no views, errors as JSON, debug toolbar disabled.

Package info

github.com/nuhsait/ci4-api-starter

Type:project

pkg:composer/nuhsait/ci4-api-starter

Statistics

Installs: 2

Dependents: 0

Suggesters: 0

Stars: 0

Open Issues: 0

v1.0.0 2026-09-26 09:48 UTC

This package is auto-updated.

Last update: 2026-09-26 09:51:41 UTC


README

A CodeIgniter 4 app starter for pure JSON APIs, based on codeigniter4/appstarter.

Differences from appstarter

  • No views: app/Views and the Home controller 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