For any queries you can reach us at / WhatsApp us: +919158876092

CodeIgniter 4 Application Structure


You need to understand how the application is structured.

Default Directories

A fresh install has six directories:

  • /app,
  • /system,
  • /public,
  • /writable,
  • /tests
  • /docs.
Each of these directories has a very specific part to play.


The source code of the project resides in the app directory. The following folders make up the basic contents:

	/Config         Stores the configuration files
	/Controllers    Controllers determine the program flow
	/Database       Stores the database migrations and seeds files
	/Filters        Stores filter classes that can run before and after controller
	/Helpers        Helpers store collections of standalone functions
	/Language       Multiple language support reads the language strings from here
	/Libraries      Useful classes that don't fit in another category
	/Models         Models work with the database to represent the business entities.
	/ThirdParty     ThirdParty libraries that can be used in application
	/Views          Views make up the HTML that is displayed to the client.

All files in this directory inside the App namespace, though you are free to change that in app/Config/Constants.php.


This directory stores the files that make up the framework. The files in the system directory should never be modified.


The public folder contains the required assets for the application such as css, javascript and images.


This includes directories for storing cache files, logs, and any uploads a user might send.


This directory contains your test files.


It holds a local copy of the CodeIgniter4 User Guide.