# lara-igniter/framework architecture

> Architecture diagram of the GitHub repository lara-igniter/framework, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-09-24). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/lara-igniter/framework
- Repository: https://github.com/lara-igniter/framework

## Overview

Laraigniter is a PHP framework layered over CodeIgniter 3, providing web routing and response handling alongside framework services for persistence, rendering, authentication, and integrations. The central web flow registers routes, resolves a request to a route, and runs middleware or an action. The tree also shows ORM/schema, queue, filesystem, mail, validation, and console capabilities. Wiring is detailed only where sampled source supports it; other modules are represented as capabilities without speculative call edges.

Main entry points: [`src/Elegant/Routing/RouteServiceProvider.php`](https://github.com/lara-igniter/framework/blob/1.x/src/Elegant/Routing/RouteServiceProvider.php) (Route registration and dispatch), [`src/Elegant/View/Engines/CompilerEngine.php`](https://github.com/lara-igniter/framework/blob/1.x/src/Elegant/View/Engines/CompilerEngine.php) (Compiled view engine), [`src/Elegant/Filesystem/FilesystemManager.php`](https://github.com/lara-igniter/framework/blob/1.x/src/Elegant/Filesystem/FilesystemManager.php) (Filesystem disks), [`src/Elegant/Queue/QueueManager.php`](https://github.com/lara-igniter/framework/blob/1.x/src/Elegant/Queue/QueueManager.php) (Queue dispatch and workers)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_foundation["Framework foundation"]
  node_application["Application runtime<br/>[Application.php]"]
  node_config["Configuration<br/>[Repository.php]"]
  node_collections["Collections and support<br/>[Collection.php]"]
end

subgraph group_web["Web request"]
  node_routing["Route registration and dispatch"]
  node_router["Router and routes<br/>[Router.php]"]
  node_middleware["HTTP middleware<br/>[Middleware.php]"]
  node_httpkernel["HTTP kernel<br/>[Kernel.php]"]
  node_httpio["Request and response<br/>[Request.php]"]
  node_views["View rendering<br/>[Factory.php]"]
  node_blade["Blade compiler<br/>[BladeCompiler.php]"]
  node_compilerengine["Compiled view engine<br/>[CompilerEngine.php]"]
end

subgraph group_data["Data and state"]
  node_database["Models and queries<br/>[Model.php]"]
  node_schema["Schema and migrations<br/>[Schema.php]"]
  node_sessions["Session state<br/>[Store.php]"]
end

subgraph group_services["Application services"]
  node_filesystem["Filesystem disks"]
  node_auth["Authentication and access"]
  node_validation["Request validation<br/>[Validator.php]"]
  node_mail["Mail delivery<br/>[MailManager.php]"]
  node_queue["Queue dispatch and workers<br/>[QueueManager.php]"]
  node_httpclient["HTTP client<br/>[Factory.php]"]
end

subgraph group_cli["Console"]
  node_console["Console commands<br/>[Kernel.php]"]
end

node_caller(("HTTP caller"))
node_ci3["CodeIgniter 3"]

node_caller -->|"sends request"| node_ci3
node_ci3 -->|"runs hooks"| node_routing
node_routing -->|"resolves route"| node_router
node_routing -->|"runs middleware"| node_middleware
node_routing -->|"registers response"| node_httpio
node_httpkernel -->|"handles HTTP"| node_httpio
node_compilerengine -->|"compiles templates"| node_blade
node_compilerengine -->|"renders view"| node_views
node_application -->|"provides configuration"| node_config
node_filesystem -->|"resolves disks"| node_filesystem
node_queue -->|"resolves connection"| node_queue
node_mail -->|"resolves view factory"| node_views

click node_application "https://github.com/lara-igniter/framework/blob/1.x/src/Elegant/Foundation/Application.php"
click node_config "https://github.com/lara-igniter/framework/blob/1.x/src/Elegant/Config/Repository.php"
click node_collections "https://github.com/lara-igniter/framework/blob/1.x/src/Elegant/Collections/Collection.php"
click node_routing "https://github.com/lara-igniter/framework/blob/1.x/src/Elegant/Routing/RouteServiceProvider.php"
click node_router "https://github.com/lara-igniter/framework/blob/1.x/src/Elegant/Routing/Router.php"
click node_middleware "https://github.com/lara-igniter/framework/blob/1.x/src/Elegant/Routing/Middleware/Middleware.php"
click node_httpkernel "https://github.com/lara-igniter/framework/blob/1.x/src/Elegant/Foundation/Http/Kernel.php"
click node_httpio "https://github.com/lara-igniter/framework/blob/1.x/src/Elegant/Foundation/Http/Request.php"
click node_views "https://github.com/lara-igniter/framework/blob/1.x/src/Elegant/View/Factory.php"
click node_blade "https://github.com/lara-igniter/framework/blob/1.x/src/Elegant/View/Compilers/BladeCompiler.php"
click node_compilerengine "https://github.com/lara-igniter/framework/blob/1.x/src/Elegant/View/Engines/CompilerEngine.php"
click node_database "https://github.com/lara-igniter/framework/blob/1.x/src/Elegant/Database/Model/Model.php"
click node_schema "https://github.com/lara-igniter/framework/blob/1.x/src/Elegant/Database/Schema/Schema.php"
click node_sessions "https://github.com/lara-igniter/framework/blob/1.x/src/Elegant/Session/Store.php"
click node_filesystem "https://github.com/lara-igniter/framework/blob/1.x/src/Elegant/Filesystem/FilesystemManager.php"
click node_auth "https://github.com/lara-igniter/framework/blob/1.x/src/Elegant/Auth/AuthServiceProvider.php"
click node_validation "https://github.com/lara-igniter/framework/blob/1.x/src/Elegant/Validation/Validator.php"
click node_mail "https://github.com/lara-igniter/framework/blob/1.x/src/Elegant/Mail/MailManager.php"
click node_queue "https://github.com/lara-igniter/framework/blob/1.x/src/Elegant/Queue/QueueManager.php"
click node_httpclient "https://github.com/lara-igniter/framework/blob/1.x/src/Elegant/Http/Client/Factory.php"
click node_console "https://github.com/lara-igniter/framework/blob/1.x/src/Elegant/Console/Kernel.php"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_application,node_config,node_collections toneBlue
class node_routing,node_router,node_middleware,node_httpkernel,node_httpio,node_views,node_blade,node_compilerengine toneAmber
class node_database,node_schema,node_sessions toneMint
class node_filesystem,node_auth,node_validation,node_mail,node_queue,node_httpclient toneRose
class node_console,node_caller,node_ci3 toneIndigo
```

## Components

### Framework foundation

- [Application runtime](https://github.com/lara-igniter/framework/blob/1.x/src/Elegant/Foundation/Application.php): `src/Elegant/Foundation/Application.php`
- [Configuration](https://github.com/lara-igniter/framework/blob/1.x/src/Elegant/Config/Repository.php): `src/Elegant/Config/Repository.php`
- [Collections and support](https://github.com/lara-igniter/framework/blob/1.x/src/Elegant/Collections/Collection.php): `src/Elegant/Collections/Collection.php`

### Web request

- [Route registration and dispatch](https://github.com/lara-igniter/framework/blob/1.x/src/Elegant/Routing/RouteServiceProvider.php): `src/Elegant/Routing/RouteServiceProvider.php`
- [Router and routes](https://github.com/lara-igniter/framework/blob/1.x/src/Elegant/Routing/Router.php): `src/Elegant/Routing/Router.php`
- [HTTP middleware](https://github.com/lara-igniter/framework/blob/1.x/src/Elegant/Routing/Middleware/Middleware.php): `src/Elegant/Routing/Middleware/Middleware.php`
- [HTTP kernel](https://github.com/lara-igniter/framework/blob/1.x/src/Elegant/Foundation/Http/Kernel.php): `src/Elegant/Foundation/Http/Kernel.php`
- [Request and response](https://github.com/lara-igniter/framework/blob/1.x/src/Elegant/Foundation/Http/Request.php): `src/Elegant/Foundation/Http/Request.php`
- [View rendering](https://github.com/lara-igniter/framework/blob/1.x/src/Elegant/View/Factory.php): `src/Elegant/View/Factory.php`
- [Blade compiler](https://github.com/lara-igniter/framework/blob/1.x/src/Elegant/View/Compilers/BladeCompiler.php): `src/Elegant/View/Compilers/BladeCompiler.php`
- [Compiled view engine](https://github.com/lara-igniter/framework/blob/1.x/src/Elegant/View/Engines/CompilerEngine.php): `src/Elegant/View/Engines/CompilerEngine.php`

### Data and state

- [Models and queries](https://github.com/lara-igniter/framework/blob/1.x/src/Elegant/Database/Model/Model.php): `src/Elegant/Database/Model/Model.php`
- [Schema and migrations](https://github.com/lara-igniter/framework/blob/1.x/src/Elegant/Database/Schema/Schema.php): `src/Elegant/Database/Schema/Schema.php`
- [Session state](https://github.com/lara-igniter/framework/blob/1.x/src/Elegant/Session/Store.php): `src/Elegant/Session/Store.php`

### Application services

- [Filesystem disks](https://github.com/lara-igniter/framework/blob/1.x/src/Elegant/Filesystem/FilesystemManager.php): `src/Elegant/Filesystem/FilesystemManager.php`
- [Authentication and access](https://github.com/lara-igniter/framework/blob/1.x/src/Elegant/Auth/AuthServiceProvider.php): `src/Elegant/Auth/AuthServiceProvider.php`
- [Request validation](https://github.com/lara-igniter/framework/blob/1.x/src/Elegant/Validation/Validator.php): `src/Elegant/Validation/Validator.php`
- [Mail delivery](https://github.com/lara-igniter/framework/blob/1.x/src/Elegant/Mail/MailManager.php): `src/Elegant/Mail/MailManager.php`
- [Queue dispatch and workers](https://github.com/lara-igniter/framework/blob/1.x/src/Elegant/Queue/QueueManager.php): `src/Elegant/Queue/QueueManager.php`
- [HTTP client](https://github.com/lara-igniter/framework/blob/1.x/src/Elegant/Http/Client/Factory.php): `src/Elegant/Http/Client/Factory.php`

### Console

- [Console commands](https://github.com/lara-igniter/framework/blob/1.x/src/Elegant/Console/Kernel.php): `src/Elegant/Console/Kernel.php`

### Other components

- **HTTP caller**
- **CodeIgniter 3**

## Connections

- HTTP caller → CodeIgniter 3: sends request
- CodeIgniter 3 → Route registration and dispatch: runs hooks
- Route registration and dispatch → Router and routes: resolves route
- Route registration and dispatch → HTTP middleware: runs middleware
- Route registration and dispatch → Request and response: registers response
- HTTP kernel → Request and response: handles HTTP
- Compiled view engine → Blade compiler: compiles templates
- Compiled view engine → View rendering: renders view
- Application runtime → Configuration: provides configuration
- Filesystem disks → Filesystem disks: resolves disks
- Queue dispatch and workers → Queue dispatch and workers: resolves connection
- Mail delivery → View rendering: resolves view factory
