# abhiib02/ci4-ems architecture

> Architecture diagram of the GitHub repository abhiib02/ci4-ems, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-02). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/abhiib02/ci4-ems
- Repository: https://github.com/abhiib02/ci4-ems

## Overview

This is a CodeIgniter 4 PHP framework distribution containing an employee-management application. The application’s user workflow covers authentication, role-specific dashboards, attendance and leave management, and administrative employee, department, holiday, and salary functions. The framework supplies HTTP routing, controller execution, and shared services beneath those features. The graph combines documented framework behavior with visible application routes and dashboard model calls; unsampled application controllers and framework internals limit some links.

Main entry points: [`app/Config/Routes.php`](https://github.com/abhiib02/ci4-ems/blob/master/app/Config/Routes.php) (App routes), [`app/Controllers/DashboardController.php`](https://github.com/abhiib02/ci4-ems/blob/master/app/Controllers/DashboardController.php) (Dashboards), [`app/Controllers/LeaveController.php`](https://github.com/abhiib02/ci4-ems/blob/master/app/Controllers/LeaveController.php) (Leave workflow), [`app/Controllers/LoginController.php`](https://github.com/abhiib02/ci4-ems/blob/master/app/Controllers/LoginController.php) (Account access)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_app["Employee application"]
  node_routes["App routes<br/>[Routes.php]"]
  node_auth["Role guards<br/>[AuthGuard.php]"]
  node_login["Account access"]
  node_registration["Registration"]
  node_dashboard["Dashboards"]
  node_attendance["Attendance"]
  node_leave["Leave workflow"]
  node_leave_service["Leave rules<br/>[LeaveService.php]"]
  node_admin_hr["HR administration"]
  node_salary_controller["Salary operations"]
  node_views["Dashboard views"]
end

subgraph group_framework["Request framework"]
  node_entry["Web entry<br/>[index.php]"]
  node_runtime["Request runtime<br/>[CodeIgniter.php]"]
  node_router["Route dispatch<br/>[Router.php]"]
  node_base["Controller base<br/>[BaseController.php]"]
end

subgraph group_domain["HR data"]
  node_user_model["User records<br/>[User.php]"]
  node_attendance_model["Attendance records<br/>[Attendance.php]"]
  node_leave_model["Leave records<br/>[Leave.php]"]
  node_salary_model["Salary records<br/>[Salary.php]"]
  node_holiday_model["Holiday records<br/>[Holiday.php]"]
  node_department_model["Department records<br/>[Department.php]"]
end

node_visitor(("Browser user"))

node_visitor -->|"requests page"| node_entry
node_entry -.->|"starts runtime"| node_runtime
node_runtime -->|"routes request"| node_router
node_router -.->|"uses route config"| node_routes
node_routes -->|"routes to"| node_login
node_routes -->|"routes to"| node_registration
node_routes -->|"routes to"| node_dashboard
node_routes -->|"routes to"| node_attendance
node_routes -->|"routes to"| node_leave
node_routes -->|"routes to"| node_salary_controller
node_routes -->|"routes to"| node_admin_hr
node_routes -->|"applies guard"| node_auth
node_login -.->|"extends"| node_base
node_dashboard -->|"reads user data"| node_user_model
node_dashboard -->|"reads attendance"| node_attendance_model
node_dashboard -->|"reads leave data"| node_leave_model
node_dashboard -->|"reads holidays"| node_holiday_model
node_dashboard -.->|"uses salary data"| node_salary_model
node_dashboard -.->|"uses department data"| node_department_model
node_dashboard -->|"renders"| node_views
node_leave -.->|"uses rules"| node_leave_service
node_leave -.->|"uses leave data"| node_leave_model
node_attendance -.->|"uses attendance data"| node_attendance_model
node_salary_controller -.->|"uses salary data"| node_salary_model
node_admin_hr -.->|"uses departments"| node_department_model

click node_entry "https://github.com/abhiib02/ci4-ems/blob/master/public/index.php"
click node_runtime "https://github.com/abhiib02/ci4-ems/blob/master/system/CodeIgniter.php"
click node_router "https://github.com/abhiib02/ci4-ems/blob/master/system/Router/Router.php"
click node_routes "https://github.com/abhiib02/ci4-ems/blob/master/app/Config/Routes.php"
click node_base "https://github.com/abhiib02/ci4-ems/blob/master/app/Controllers/BaseController.php"
click node_auth "https://github.com/abhiib02/ci4-ems/blob/master/app/Filters/AuthGuard.php"
click node_login "https://github.com/abhiib02/ci4-ems/blob/master/app/Controllers/LoginController.php"
click node_registration "https://github.com/abhiib02/ci4-ems/blob/master/app/Controllers/RegisterController.php"
click node_dashboard "https://github.com/abhiib02/ci4-ems/blob/master/app/Controllers/DashboardController.php"
click node_attendance "https://github.com/abhiib02/ci4-ems/blob/master/app/Controllers/AttendanceController.php"
click node_leave "https://github.com/abhiib02/ci4-ems/blob/master/app/Controllers/LeaveController.php"
click node_leave_service "https://github.com/abhiib02/ci4-ems/blob/master/app/Services/LeaveService.php"
click node_admin_hr "https://github.com/abhiib02/ci4-ems/blob/master/app/Controllers/DepartmentController.php"
click node_salary_controller "https://github.com/abhiib02/ci4-ems/blob/master/app/Controllers/SalaryController.php"
click node_views "https://github.com/abhiib02/ci4-ems/tree/master/app/Views/dashboard"
click node_user_model "https://github.com/abhiib02/ci4-ems/blob/master/app/Models/User.php"
click node_attendance_model "https://github.com/abhiib02/ci4-ems/blob/master/app/Models/Attendance.php"
click node_leave_model "https://github.com/abhiib02/ci4-ems/blob/master/app/Models/Leave.php"
click node_salary_model "https://github.com/abhiib02/ci4-ems/blob/master/app/Models/Salary.php"
click node_holiday_model "https://github.com/abhiib02/ci4-ems/blob/master/app/Models/Holiday.php"
click node_department_model "https://github.com/abhiib02/ci4-ems/blob/master/app/Models/Department.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_routes,node_auth,node_login,node_registration,node_dashboard,node_attendance,node_leave,node_leave_service,node_admin_hr,node_salary_controller,node_views,node_visitor toneBlue
class node_entry,node_runtime,node_router,node_base toneAmber
class node_user_model,node_attendance_model,node_leave_model,node_salary_model,node_holiday_model,node_department_model toneMint
```

## Components

### Employee application

- [App routes](https://github.com/abhiib02/ci4-ems/blob/master/app/Config/Routes.php): `app/Config/Routes.php`
- [Role guards](https://github.com/abhiib02/ci4-ems/blob/master/app/Filters/AuthGuard.php): `app/Filters/AuthGuard.php`
- [Account access](https://github.com/abhiib02/ci4-ems/blob/master/app/Controllers/LoginController.php): `app/Controllers/LoginController.php`
- [Registration](https://github.com/abhiib02/ci4-ems/blob/master/app/Controllers/RegisterController.php): `app/Controllers/RegisterController.php`
- [Dashboards](https://github.com/abhiib02/ci4-ems/blob/master/app/Controllers/DashboardController.php): `app/Controllers/DashboardController.php`
- [Attendance](https://github.com/abhiib02/ci4-ems/blob/master/app/Controllers/AttendanceController.php): `app/Controllers/AttendanceController.php`
- [Leave workflow](https://github.com/abhiib02/ci4-ems/blob/master/app/Controllers/LeaveController.php): `app/Controllers/LeaveController.php`
- [Leave rules](https://github.com/abhiib02/ci4-ems/blob/master/app/Services/LeaveService.php): `app/Services/LeaveService.php`
- [HR administration](https://github.com/abhiib02/ci4-ems/blob/master/app/Controllers/DepartmentController.php): `app/Controllers/DepartmentController.php`
- [Salary operations](https://github.com/abhiib02/ci4-ems/blob/master/app/Controllers/SalaryController.php): `app/Controllers/SalaryController.php`
- [Dashboard views](https://github.com/abhiib02/ci4-ems/tree/master/app/Views/dashboard): `app/Views/dashboard`

### Request framework

- [Web entry](https://github.com/abhiib02/ci4-ems/blob/master/public/index.php): `public/index.php`
- [Request runtime](https://github.com/abhiib02/ci4-ems/blob/master/system/CodeIgniter.php): `system/CodeIgniter.php`
- [Route dispatch](https://github.com/abhiib02/ci4-ems/blob/master/system/Router/Router.php): `system/Router/Router.php`
- [Controller base](https://github.com/abhiib02/ci4-ems/blob/master/app/Controllers/BaseController.php): `app/Controllers/BaseController.php`

### HR data

- [User records](https://github.com/abhiib02/ci4-ems/blob/master/app/Models/User.php): `app/Models/User.php`
- [Attendance records](https://github.com/abhiib02/ci4-ems/blob/master/app/Models/Attendance.php): `app/Models/Attendance.php`
- [Leave records](https://github.com/abhiib02/ci4-ems/blob/master/app/Models/Leave.php): `app/Models/Leave.php`
- [Salary records](https://github.com/abhiib02/ci4-ems/blob/master/app/Models/Salary.php): `app/Models/Salary.php`
- [Holiday records](https://github.com/abhiib02/ci4-ems/blob/master/app/Models/Holiday.php): `app/Models/Holiday.php`
- [Department records](https://github.com/abhiib02/ci4-ems/blob/master/app/Models/Department.php): `app/Models/Department.php`

### Other components

- **Browser user**

## Connections

- Browser user → Web entry: requests page (evidence: `README.md`)
- Web entry → Request runtime: starts runtime
- Request runtime → Route dispatch: routes request (evidence: `system/CodeIgniter.php`)
- Route dispatch → App routes: uses route config
- App routes → Account access: routes to (evidence: `app/Config/Routes.php`)
- App routes → Registration: routes to (evidence: `app/Config/Routes.php`)
- App routes → Dashboards: routes to (evidence: `app/Config/Routes.php`)
- App routes → Attendance: routes to (evidence: `app/Config/Routes.php`)
- App routes → Leave workflow: routes to (evidence: `app/Config/Routes.php`)
- App routes → Salary operations: routes to (evidence: `app/Config/Routes.php`)
- App routes → HR administration: routes to (evidence: `app/Config/Routes.php`)
- App routes → Role guards: applies guard (evidence: `app/Config/Routes.php`)
- Account access → Controller base: extends
- Dashboards → User records: reads user data (evidence: `app/Controllers/DashboardController.php`)
- Dashboards → Attendance records: reads attendance (evidence: `app/Controllers/DashboardController.php`)
- Dashboards → Leave records: reads leave data (evidence: `app/Controllers/DashboardController.php`)
- Dashboards → Holiday records: reads holidays (evidence: `app/Controllers/DashboardController.php`)
- Dashboards → Salary records: uses salary data (evidence: `app/Controllers/DashboardController.php`)
- Dashboards → Department records: uses department data (evidence: `app/Controllers/DashboardController.php`)
- Dashboards → Dashboard views: renders (evidence: `app/Controllers/DashboardController.php`)
- Leave workflow → Leave rules: uses rules
- Leave workflow → Leave records: uses leave data
- Attendance → Attendance records: uses attendance data
- Salary operations → Salary records: uses salary data
- HR administration → Department records: uses departments
