# amurtigro1/leave-management-system architecture

> Architecture diagram of the GitHub repository amurtigro1/leave-management-system, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-11-18). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/amurtigro1/leave-management-system
- Repository: https://github.com/amurtigro1/leave-management-system

## Overview

This is a Laravel leave and compensatory-time (overtime/CTO) management application with employee, supervisor, HR, and admin roles. The apparent workflow is request filing, role-based review, balance or CTO-log updates, and status notifications; the sampled controllers and models support those domains, but the web routes were not inspected, so initiating-to-controller routing is shown only as unverified. Holiday lookup and scheduled balance/expiry maintenance are additional capabilities. The README is the stock Laravel README, so product scope is inferred from the source tree and excerpts.

Main entry points: [`app/Http/Controllers/HrController.php`](https://github.com/amurtigro1/leave-management-system/blob/master/app/Http/Controllers/HrController.php) (HR workflows), [`app/Http/Controllers/AdminController.php`](https://github.com/amurtigro1/leave-management-system/blob/master/app/Http/Controllers/AdminController.php) (Admin workflows), [`app/Models/Leave.php`](https://github.com/amurtigro1/leave-management-system/blob/master/app/Models/Leave.php) (Leave records), [`app/Models/OvertimeRequest.php`](https://github.com/amurtigro1/leave-management-system/blob/master/app/Models/OvertimeRequest.php) (Overtime records)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_access["Access and roles"]
  node_auth["Authentication"]
end

subgraph group_requests["Leave and CTO"]
  node_employee_work["Employee requests"]
  node_supervisor_work["Supervisor review"]
  node_overtime_entry["Overtime requests"]
end

subgraph group_oversight["HR and administration"]
  node_hr_work["HR workflows<br/>[HrController.php]"]
  node_admin_work["Admin workflows"]
end

subgraph group_records["Domain records"]
  node_leave_record["Leave records<br/>[Leave.php]"]
  node_overtime_record["Overtime records"]
  node_user_record["User and balances<br/>[User.php]"]
  node_violation_record["Leave violations<br/>[LeaveViolation.php]"]
  node_coc_record["CTO logs<br/>[CocLog.php]"]
  node_holiday_record["Yearly holidays<br/>[YearlyHoliday.php]"]
end

subgraph group_support["Holidays and notices"]
  node_holiday_service["Holiday lookup"]
  node_status_notice["Status notifications"]
  node_maintenance["Scheduled maintenance"]
end

node_employee(("Employee"))
node_supervisor(("Supervisor"))
node_hr(("HR staff"))
node_admin(("Administrator"))

node_employee -.->|"signs in"| node_auth
node_employee -.->|"files requests"| node_employee_work
node_supervisor -.->|"reviews requests"| node_supervisor_work
node_hr -.->|"handles workflows"| node_hr_work
node_admin -.->|"handles workflows"| node_admin_work
node_employee_work -->|"reads and writes"| node_leave_record
node_employee_work -->|"reads and writes"| node_overtime_record
node_employee_work -->|"uses dates"| node_holiday_service
node_supervisor_work -->|"reviews"| node_leave_record
node_supervisor_work -->|"reviews"| node_overtime_record
node_supervisor_work -->|"notifies"| node_status_notice
node_hr_work -->|"reads and writes"| node_leave_record
node_hr_work -->|"reads and writes"| node_overtime_record
node_hr_work -->|"reads users"| node_user_record
node_hr_work -->|"uses dates"| node_holiday_service
node_hr_work -->|"notifies"| node_status_notice
node_admin_work -->|"reads and writes"| node_leave_record
node_admin_work -->|"reads and writes"| node_overtime_record
node_admin_work -->|"reads users"| node_user_record
node_admin_work -->|"updates logs"| node_coc_record
node_admin_work -->|"notifies"| node_status_notice
node_overtime_entry -.->|"handles requests"| node_overtime_record
node_holiday_service -->|"queries dates"| node_holiday_record
node_leave_record -->|"has violations"| node_violation_record
node_user_record -->|"has leaves"| node_leave_record
node_user_record -->|"has requests"| node_overtime_record
node_maintenance -.->|"adjusts balances"| node_user_record
node_maintenance -.->|"expires logs"| node_coc_record

click node_auth "https://github.com/amurtigro1/leave-management-system/tree/master/app/Http/Controllers/Auth"
click node_employee_work "https://github.com/amurtigro1/leave-management-system/blob/master/app/Http/Controllers/EmployeeController.php"
click node_supervisor_work "https://github.com/amurtigro1/leave-management-system/blob/master/app/Http/Controllers/SupervisorController.php"
click node_hr_work "https://github.com/amurtigro1/leave-management-system/blob/master/app/Http/Controllers/HrController.php"
click node_admin_work "https://github.com/amurtigro1/leave-management-system/blob/master/app/Http/Controllers/AdminController.php"
click node_overtime_entry "https://github.com/amurtigro1/leave-management-system/blob/master/app/Http/Controllers/OvertimeRequestController.php"
click node_leave_record "https://github.com/amurtigro1/leave-management-system/blob/master/app/Models/Leave.php"
click node_overtime_record "https://github.com/amurtigro1/leave-management-system/blob/master/app/Models/OvertimeRequest.php"
click node_user_record "https://github.com/amurtigro1/leave-management-system/blob/master/app/Models/User.php"
click node_violation_record "https://github.com/amurtigro1/leave-management-system/blob/master/app/Models/LeaveViolation.php"
click node_coc_record "https://github.com/amurtigro1/leave-management-system/blob/master/app/Models/CocLog.php"
click node_holiday_service "https://github.com/amurtigro1/leave-management-system/blob/master/app/Services/YearlyHolidayService.php"
click node_holiday_record "https://github.com/amurtigro1/leave-management-system/blob/master/app/Models/YearlyHoliday.php"
click node_status_notice "https://github.com/amurtigro1/leave-management-system/blob/master/app/Notifications/LeaveStatusNotification.php"
click node_maintenance "https://github.com/amurtigro1/leave-management-system/tree/master/app/Console/Commands"

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_auth toneBlue
class node_employee_work,node_supervisor_work,node_overtime_entry toneAmber
class node_hr_work,node_admin_work toneMint
class node_leave_record,node_overtime_record,node_user_record,node_violation_record,node_coc_record,node_holiday_record toneRose
class node_holiday_service,node_status_notice,node_maintenance,node_employee,node_supervisor,node_hr,node_admin toneIndigo
```

## Components

### Access and roles

- [Authentication](https://github.com/amurtigro1/leave-management-system/tree/master/app/Http/Controllers/Auth): `app/Http/Controllers/Auth`

### Leave and CTO

- [Employee requests](https://github.com/amurtigro1/leave-management-system/blob/master/app/Http/Controllers/EmployeeController.php): `app/Http/Controllers/EmployeeController.php`
- [Supervisor review](https://github.com/amurtigro1/leave-management-system/blob/master/app/Http/Controllers/SupervisorController.php): `app/Http/Controllers/SupervisorController.php`
- [Overtime requests](https://github.com/amurtigro1/leave-management-system/blob/master/app/Http/Controllers/OvertimeRequestController.php): `app/Http/Controllers/OvertimeRequestController.php`

### HR and administration

- [HR workflows](https://github.com/amurtigro1/leave-management-system/blob/master/app/Http/Controllers/HrController.php): `app/Http/Controllers/HrController.php`
- [Admin workflows](https://github.com/amurtigro1/leave-management-system/blob/master/app/Http/Controllers/AdminController.php): `app/Http/Controllers/AdminController.php`

### Domain records

- [Leave records](https://github.com/amurtigro1/leave-management-system/blob/master/app/Models/Leave.php): `app/Models/Leave.php`
- [Overtime records](https://github.com/amurtigro1/leave-management-system/blob/master/app/Models/OvertimeRequest.php): `app/Models/OvertimeRequest.php`
- [User and balances](https://github.com/amurtigro1/leave-management-system/blob/master/app/Models/User.php): `app/Models/User.php`
- [Leave violations](https://github.com/amurtigro1/leave-management-system/blob/master/app/Models/LeaveViolation.php): `app/Models/LeaveViolation.php`
- [CTO logs](https://github.com/amurtigro1/leave-management-system/blob/master/app/Models/CocLog.php): `app/Models/CocLog.php`
- [Yearly holidays](https://github.com/amurtigro1/leave-management-system/blob/master/app/Models/YearlyHoliday.php): `app/Models/YearlyHoliday.php`

### Holidays and notices

- [Holiday lookup](https://github.com/amurtigro1/leave-management-system/blob/master/app/Services/YearlyHolidayService.php): `app/Services/YearlyHolidayService.php`
- [Status notifications](https://github.com/amurtigro1/leave-management-system/blob/master/app/Notifications/LeaveStatusNotification.php): `app/Notifications/LeaveStatusNotification.php`
- [Scheduled maintenance](https://github.com/amurtigro1/leave-management-system/tree/master/app/Console/Commands): `app/Console/Commands`

### Other components

- **Employee**
- **Supervisor**
- **HR staff**
- **Administrator**

## Connections

- Employee → Authentication: signs in
- Employee → Employee requests: files requests
- Supervisor → Supervisor review: reviews requests
- HR staff → HR workflows: handles workflows
- Administrator → Admin workflows: handles workflows
- Employee requests → Leave records: reads and writes (evidence: `app/Http/Controllers/EmployeeController.php`)
- Employee requests → Overtime records: reads and writes (evidence: `app/Http/Controllers/EmployeeController.php`)
- Employee requests → Holiday lookup: uses dates (evidence: `app/Http/Controllers/EmployeeController.php`)
- Supervisor review → Leave records: reviews (evidence: `app/Http/Controllers/SupervisorController.php`)
- Supervisor review → Overtime records: reviews (evidence: `app/Http/Controllers/SupervisorController.php`)
- Supervisor review → Status notifications: notifies (evidence: `app/Http/Controllers/SupervisorController.php`)
- HR workflows → Leave records: reads and writes (evidence: `app/Http/Controllers/HrController.php`)
- HR workflows → Overtime records: reads and writes (evidence: `app/Http/Controllers/HrController.php`)
- HR workflows → User and balances: reads users (evidence: `app/Http/Controllers/HrController.php`)
- HR workflows → Holiday lookup: uses dates (evidence: `app/Http/Controllers/HrController.php`)
- HR workflows → Status notifications: notifies (evidence: `app/Http/Controllers/HrController.php`)
- Admin workflows → Leave records: reads and writes (evidence: `app/Http/Controllers/AdminController.php`)
- Admin workflows → Overtime records: reads and writes (evidence: `app/Http/Controllers/AdminController.php`)
- Admin workflows → User and balances: reads users (evidence: `app/Http/Controllers/AdminController.php`)
- Admin workflows → CTO logs: updates logs (evidence: `app/Http/Controllers/AdminController.php`)
- Admin workflows → Status notifications: notifies (evidence: `app/Http/Controllers/AdminController.php`)
- Overtime requests → Overtime records: handles requests
- Holiday lookup → Yearly holidays: queries dates (evidence: `app/Services/YearlyHolidayService.php`)
- Leave records → Leave violations: has violations (evidence: `app/Models/Leave.php`)
- User and balances → Leave records: has leaves (evidence: `app/Models/User.php`)
- User and balances → Overtime records: has requests (evidence: `app/Models/User.php`)
- Scheduled maintenance → User and balances: adjusts balances
- Scheduled maintenance → CTO logs: expires logs
