# jhonniel/hris-kpm architecture

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

- Interactive diagram: https://gitdiagram.com/jhonniel/hris-kpm
- Repository: https://github.com/jhonniel/hris-kpm

## Overview

This repository combines a CodeIgniter-based employee-management application with the framework runtime. Its user-facing domains include employee records, attendance, leave, payroll, loans, projects, logistics, notices, and organization settings. The main request path is framework bootstrap and routing into controllers, which use domain models and render backend views. The supplied excerpts directly establish only some application-to-model and controller-to-view relationships; other domain links are omitted rather than inferred.

Main entry points: [`application/controllers/Employee.php`](https://github.com/jhonniel/hris-kpm/blob/main/application/controllers/Employee.php) (Employee management), [`application/controllers/Payroll.php`](https://github.com/jhonniel/hris-kpm/blob/main/application/controllers/Payroll.php) (Payroll), [`system/core/CodeIgniter.php`](https://github.com/jhonniel/hris-kpm/blob/main/system/core/CodeIgniter.php) (Framework bootstrap), [`system/core/Router.php`](https://github.com/jhonniel/hris-kpm/blob/main/system/core/Router.php) (URI routing)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_runtime["Framework runtime"]
  node_entry["Application entry<br/>[index.php]"]
  node_bootstrap["Framework bootstrap<br/>[CodeIgniter.php]"]
  node_router["URI routing<br/>[Router.php]"]
  node_controller_base["Controller base<br/>[Controller.php]"]
  node_loader["Resource loader<br/>[Loader.php]"]
  node_model_base["Model base<br/>[Model.php]"]
  node_db_builder["Query builder"]
end

subgraph group_people["People operations"]
  node_employee["Employee management<br/>[Employee.php]"]
  node_employee_data["Employee records<br/>[Employee_model.php]"]
  node_attendance["Attendance<br/>[Attendance.php]"]
  node_leave["Leave management<br/>[Leave.php]"]
  node_leave_data["Leave records<br/>[Leave_model.php]"]
end

subgraph group_business["Business operations"]
  node_payroll["Payroll<br/>[Payroll.php]"]
  node_payroll_data["Payroll data<br/>[Payroll_model.php]"]
  node_loan["Loans<br/>[Loan.php]"]
  node_projects["Projects and tasks<br/>[Projects.php]"]
  node_project_data["Project data<br/>[Project_model.php]"]
  node_logistics["Logistics<br/>[Logistice.php]"]
  node_notices["Notices<br/>[Notice.php]"]
  node_organization["Organization<br/>[Organization.php]"]
  node_settings["Settings<br/>[Settings.php]"]
  node_dashboard["Dashboard<br/>[Dashboard.php]"]
end

subgraph group_presentation["Application presentation"]
  node_task_view["Task view<br/>[tasks_view.php]"]
  node_invalid_view["Inactive-user view<br/>[invalid_user.php]"]
  node_login_view["Login view<br/>[login.php]"]
end

node_request(("Web request"))

node_request -.->|"enters"| node_entry
node_entry -->|"loads"| node_bootstrap
node_bootstrap -->|"initializes"| node_router
node_bootstrap -->|"dispatches"| node_controller_base
node_router -->|"reads routes"| node_entry
node_router -.->|"resolves controller"| node_employee
node_controller_base -->|"initializes"| node_loader
node_loader -->|"loads"| node_model_base
node_loader -.->|"loads"| node_db_builder
node_employee -->|"queries"| node_employee_data
node_employee -->|"renders"| node_invalid_view
node_employee -->|"references"| node_login_view
node_payroll -->|"queries"| node_payroll_data
node_payroll -->|"uses controller"| node_employee
node_payroll -->|"uses controller"| node_loan
node_payroll -->|"uses controller"| node_dashboard
node_projects -->|"uses controller"| node_dashboard
node_task_view -->|"looks up assignees"| node_project_data

click node_entry "https://github.com/jhonniel/hris-kpm/blob/main/index.php"
click node_bootstrap "https://github.com/jhonniel/hris-kpm/blob/main/system/core/CodeIgniter.php"
click node_router "https://github.com/jhonniel/hris-kpm/blob/main/system/core/Router.php"
click node_controller_base "https://github.com/jhonniel/hris-kpm/blob/main/system/core/Controller.php"
click node_loader "https://github.com/jhonniel/hris-kpm/blob/main/system/core/Loader.php"
click node_model_base "https://github.com/jhonniel/hris-kpm/blob/main/system/core/Model.php"
click node_db_builder "https://github.com/jhonniel/hris-kpm/blob/main/system/database/DB_query_builder.php"
click node_employee "https://github.com/jhonniel/hris-kpm/blob/main/application/controllers/Employee.php"
click node_employee_data "https://github.com/jhonniel/hris-kpm/blob/main/application/models/Employee_model.php"
click node_attendance "https://github.com/jhonniel/hris-kpm/blob/main/application/controllers/Attendance.php"
click node_leave "https://github.com/jhonniel/hris-kpm/blob/main/application/controllers/Leave.php"
click node_leave_data "https://github.com/jhonniel/hris-kpm/blob/main/application/models/Leave_model.php"
click node_payroll "https://github.com/jhonniel/hris-kpm/blob/main/application/controllers/Payroll.php"
click node_payroll_data "https://github.com/jhonniel/hris-kpm/blob/main/application/models/Payroll_model.php"
click node_loan "https://github.com/jhonniel/hris-kpm/blob/main/application/controllers/Loan.php"
click node_projects "https://github.com/jhonniel/hris-kpm/blob/main/application/controllers/Projects.php"
click node_project_data "https://github.com/jhonniel/hris-kpm/blob/main/application/models/Project_model.php"
click node_logistics "https://github.com/jhonniel/hris-kpm/blob/main/application/controllers/Logistice.php"
click node_notices "https://github.com/jhonniel/hris-kpm/blob/main/application/controllers/Notice.php"
click node_organization "https://github.com/jhonniel/hris-kpm/blob/main/application/controllers/Organization.php"
click node_settings "https://github.com/jhonniel/hris-kpm/blob/main/application/controllers/Settings.php"
click node_dashboard "https://github.com/jhonniel/hris-kpm/blob/main/application/controllers/Dashboard.php"
click node_task_view "https://github.com/jhonniel/hris-kpm/blob/main/application/views/backend/tasks_view.php"
click node_invalid_view "https://github.com/jhonniel/hris-kpm/blob/main/application/views/backend/invalid_user.php"
click node_login_view "https://github.com/jhonniel/hris-kpm/blob/main/application/views/login.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_entry,node_bootstrap,node_router,node_controller_base,node_loader,node_model_base,node_db_builder toneBlue
class node_employee,node_employee_data,node_attendance,node_leave,node_leave_data toneAmber
class node_payroll,node_payroll_data,node_loan,node_projects,node_project_data,node_logistics,node_notices,node_organization,node_settings,node_dashboard,node_request toneMint
class node_task_view,node_invalid_view,node_login_view toneRose
```

## Components

### Framework runtime

- [Application entry](https://github.com/jhonniel/hris-kpm/blob/main/index.php): `index.php`
- [Framework bootstrap](https://github.com/jhonniel/hris-kpm/blob/main/system/core/CodeIgniter.php): `system/core/CodeIgniter.php`
- [URI routing](https://github.com/jhonniel/hris-kpm/blob/main/system/core/Router.php): `system/core/Router.php`
- [Controller base](https://github.com/jhonniel/hris-kpm/blob/main/system/core/Controller.php): `system/core/Controller.php`
- [Resource loader](https://github.com/jhonniel/hris-kpm/blob/main/system/core/Loader.php): `system/core/Loader.php`
- [Model base](https://github.com/jhonniel/hris-kpm/blob/main/system/core/Model.php): `system/core/Model.php`
- [Query builder](https://github.com/jhonniel/hris-kpm/blob/main/system/database/DB_query_builder.php): `system/database/DB_query_builder.php`

### People operations

- [Employee management](https://github.com/jhonniel/hris-kpm/blob/main/application/controllers/Employee.php): `application/controllers/Employee.php`
- [Employee records](https://github.com/jhonniel/hris-kpm/blob/main/application/models/Employee_model.php): `application/models/Employee_model.php`
- [Attendance](https://github.com/jhonniel/hris-kpm/blob/main/application/controllers/Attendance.php): `application/controllers/Attendance.php`
- [Leave management](https://github.com/jhonniel/hris-kpm/blob/main/application/controllers/Leave.php): `application/controllers/Leave.php`
- [Leave records](https://github.com/jhonniel/hris-kpm/blob/main/application/models/Leave_model.php): `application/models/Leave_model.php`

### Business operations

- [Payroll](https://github.com/jhonniel/hris-kpm/blob/main/application/controllers/Payroll.php): `application/controllers/Payroll.php`
- [Payroll data](https://github.com/jhonniel/hris-kpm/blob/main/application/models/Payroll_model.php): `application/models/Payroll_model.php`
- [Loans](https://github.com/jhonniel/hris-kpm/blob/main/application/controllers/Loan.php): `application/controllers/Loan.php`
- [Projects and tasks](https://github.com/jhonniel/hris-kpm/blob/main/application/controllers/Projects.php): `application/controllers/Projects.php`
- [Project data](https://github.com/jhonniel/hris-kpm/blob/main/application/models/Project_model.php): `application/models/Project_model.php`
- [Logistics](https://github.com/jhonniel/hris-kpm/blob/main/application/controllers/Logistice.php): `application/controllers/Logistice.php`
- [Notices](https://github.com/jhonniel/hris-kpm/blob/main/application/controllers/Notice.php): `application/controllers/Notice.php`
- [Organization](https://github.com/jhonniel/hris-kpm/blob/main/application/controllers/Organization.php): `application/controllers/Organization.php`
- [Settings](https://github.com/jhonniel/hris-kpm/blob/main/application/controllers/Settings.php): `application/controllers/Settings.php`
- [Dashboard](https://github.com/jhonniel/hris-kpm/blob/main/application/controllers/Dashboard.php): `application/controllers/Dashboard.php`

### Application presentation

- [Task view](https://github.com/jhonniel/hris-kpm/blob/main/application/views/backend/tasks_view.php): `application/views/backend/tasks_view.php`
- [Inactive-user view](https://github.com/jhonniel/hris-kpm/blob/main/application/views/backend/invalid_user.php): `application/views/backend/invalid_user.php`
- [Login view](https://github.com/jhonniel/hris-kpm/blob/main/application/views/login.php): `application/views/login.php`

### Other components

- **Web request**

## Connections

- Web request → Application entry: enters
- Application entry → Framework bootstrap: loads (evidence: `index.php`)
- Framework bootstrap → URI routing: initializes (evidence: `system/core/CodeIgniter.php`)
- Framework bootstrap → Controller base: dispatches (evidence: `system/core/CodeIgniter.php`)
- URI routing → Application entry: reads routes (evidence: `system/core/Router.php`)
- URI routing → Employee management: resolves controller
- Controller base → Resource loader: initializes (evidence: `system/core/Controller.php`)
- Resource loader → Model base: loads (evidence: `system/core/Loader.php`)
- Resource loader → Query builder: loads
- Employee management → Employee records: queries (evidence: `application/controllers/Employee.php`)
- Employee management → Inactive-user view: renders (evidence: `application/controllers/Employee.php`)
- Employee management → Login view: references (evidence: `application/controllers/Employee.php`)
- Payroll → Payroll data: queries (evidence: `application/controllers/Payroll.php`)
- Payroll → Employee management: uses controller (evidence: `application/controllers/Payroll.php`)
- Payroll → Loans: uses controller (evidence: `application/controllers/Payroll.php`)
- Payroll → Dashboard: uses controller (evidence: `application/controllers/Payroll.php`)
- Projects and tasks → Dashboard: uses controller (evidence: `application/controllers/Projects.php`)
- Task view → Project data: looks up assignees (evidence: `application/views/backend/tasks_view.php`)
