CodeIgniter Architecture

Next Page Previous Page

The architecture of CodeIgniter is designed in a way that the data will be processed as fast as it can, everything is separated into different folders and packages to create a sorted and clean environment as you can see in the image given below.

  • Index.php: This is phase one of our web application, Every request in the web application will always come in the index.php file, this a root file for our application.
  • Routing: Here starts phase 2, The routing here acts as a decision-maker or request sorter for our application, the router decides whether to send the request to the Coaching or the Security  
  • Caching: For all requests that are in coaching with their cached data will directly go to the browser and a response will be generated to the user ignoring all further procedures.
  • Security: If a request data is not found in Caching then the request will be sent for the security check.
  • Application Controller: Once the requests pass the security it goes to the Application Controller, and the application controller sends those requests accordingly to all models, helpers, plugins, and scripts.
  • View: Once the data is passed to the view, it will pass all the data to Caching for keeping the cache data for the next requests, so that the future request will process much faster.

Directory Structure of CodeIgniter Application:

The directory structure is divided into three folders.

  • Application
  • System
  • User_guide


Application :

The Application folder is where all our application code is placed, the application folder contains other application folders as follows.

  • Cache: The Cache folder contains all the cached data of our application. This coaching process will help to process data much faster in the overall application.
  • Config: Config folders take cares of all the configuration like database and application with the help of files like config.php and database.php
  • Controllers: The controller is a very important part of our web application, all the controllers we create goes under the Controller folder.
  • Core: As the name suggests this is a folder that contains a class of the application.
  • Helpers: Helpers are one of the things CodeIgniter is known for because it has all the helper classes in it.
  • Hooks: With the help of these hook files, we can modify some inner workings of CodeIgniter, it is better to use hook rather than making changes into core files.
  • Language: All the language-related files will be stored under the Language Folder.
  • Libraries: All the built-in libraries for our application will be stored inside Library Folder.
  • Logs: Every activity in the system is stored in logs.
  • Models: All application Modules will be inside the Module folder.
  • Third_party:  As the name suggests all the third-party plugins will be inside the Third-party folder.
  • Views: All the views of our application that are HTML files will be inside the Views.



The system folder holds onto some very important and core files of our application system, which helps to make development easy for the developer.

  • Core:  This is the core of our Application system, we are not supposed to touch any code here or it may mess up the working of our application.
  • Database: This is the core database folder that has drivers and other important settings that should remain untouched.
  • Fonts: Font related utilities will be here.
  • Helpers: This folder is the storage for the core helpers of the application.
  • Language: Language related utilities will be under the Language folder.
  • Libraries: This folder is one of the most important folders in the application, it helps us to use so many things like calendar and emailing feature, better be untouched as it is the core file to the system.


Just a user manual about CodeIgniter.

Next Page Previous Page

Treding Tutorial

Popular Tutorials

to Learn now