# krtzmrgrth/lets-g-hris architecture

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

- Interactive diagram: https://gitdiagram.com/krtzmrgrth/lets-g-hris
- Repository: https://github.com/krtzmrgrth/lets-g-hris

## Overview

HRIS Demo is a PHP employee-management portal. Employees sign in, are routed to a role-appropriate dashboard, and can view their profile or submit leave and attendance requests; administrators and managers review workforce data and requests, while administrators also manage payroll. PHP page handlers use shared session, domain, and JSON helpers in `includes/config.php`. The README documents JSON-backed storage and the core employee capabilities. Some storage mappings and unsampled dashboard behavior are not shown, so those links are omitted or marked unverified.

Main entry points: [`includes/config.php`](https://github.com/krtzmrgrth/lets-g-hris/blob/main/includes/config.php) (Session and domain helpers), [`index.php`](https://github.com/krtzmrgrth/lets-g-hris/blob/main/index.php) (Sign-in), [`dashboard.php`](https://github.com/krtzmrgrth/lets-g-hris/blob/main/dashboard.php) (Employee dashboard), [`leave_application.php`](https://github.com/krtzmrgrth/lets-g-hris/blob/main/leave_application.php) (Leave requests)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_access["Access and profiles"]
  node_login["Sign-in<br/>[index.php]"]
  node_profile["Employee profile"]
  node_logout["Logout<br/>[logout.php]"]
end

subgraph group_employee["Employee services"]
  node_employee_dashboard["Employee dashboard<br/>[dashboard.php]"]
  node_leave_form["Leave requests"]
  node_sick_redirect["Sick leave entry"]
  node_attendance_form["Attendance requests"]
end

subgraph group_operations["Workforce operations"]
  node_manager["Manager dashboard"]
  node_admin_overview["Admin overview"]
  node_admin_employees["Employee administration"]
  node_admin_payroll["Payroll management"]
end

subgraph group_data["Shared data"]
  node_shared["Session and domain helpers<br/>[config.php]"]
  node_json_data[("JSON data files")]
end

node_employee_actor(("Employee"))
node_admin_actor(("HR admin"))

node_employee_actor -->|"signs in"| node_login
node_admin_actor -->|"signs in"| node_login
node_login -->|"checks credentials"| node_shared
node_login -->|"routes admin"| node_admin_overview
node_login -->|"routes manager"| node_manager
node_login -->|"routes employee"| node_employee_dashboard
node_employee_dashboard -->|"loads domain data"| node_shared
node_profile -->|"reads and updates"| node_shared
node_leave_form -->|"submits requests"| node_shared
node_sick_redirect -->|"redirects to"| node_leave_form
node_attendance_form -->|"adds requests"| node_shared
node_manager -->|"reviews requests"| node_shared
node_admin_overview -->|"manages workforce"| node_shared
node_admin_employees -->|"manages employees"| node_shared
node_admin_payroll -->|"loads payroll data"| node_shared
node_shared -.->|"reads and writes"| node_json_data
node_employee_actor -.->|"views overview"| node_employee_dashboard
node_employee_actor -->|"views profile"| node_profile
node_employee_actor -->|"applies for leave"| node_leave_form
node_employee_actor -->|"starts sick leave"| node_sick_redirect
node_employee_actor -.->|"requests attendance"| node_attendance_form
node_employee_actor -.->|"logs out"| node_logout

click node_login "https://github.com/krtzmrgrth/lets-g-hris/blob/main/index.php"
click node_shared "https://github.com/krtzmrgrth/lets-g-hris/blob/main/includes/config.php"
click node_employee_dashboard "https://github.com/krtzmrgrth/lets-g-hris/blob/main/dashboard.php"
click node_profile "https://github.com/krtzmrgrth/lets-g-hris/blob/main/employee_details.php"
click node_leave_form "https://github.com/krtzmrgrth/lets-g-hris/blob/main/leave_application.php"
click node_sick_redirect "https://github.com/krtzmrgrth/lets-g-hris/blob/main/sick_leave_application.php"
click node_attendance_form "https://github.com/krtzmrgrth/lets-g-hris/blob/main/attendance_request.php"
click node_manager "https://github.com/krtzmrgrth/lets-g-hris/blob/main/manager_dashboard.php"
click node_admin_overview "https://github.com/krtzmrgrth/lets-g-hris/blob/main/admin_dashboard.php"
click node_admin_employees "https://github.com/krtzmrgrth/lets-g-hris/blob/main/admin_employee_dashboard.php"
click node_admin_payroll "https://github.com/krtzmrgrth/lets-g-hris/blob/main/admin_payroll_dashboard.php"
click node_json_data "https://github.com/krtzmrgrth/lets-g-hris/tree/main/data"
click node_logout "https://github.com/krtzmrgrth/lets-g-hris/blob/main/logout.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_login,node_profile,node_logout toneBlue
class node_employee_dashboard,node_leave_form,node_sick_redirect,node_attendance_form toneAmber
class node_manager,node_admin_overview,node_admin_employees,node_admin_payroll toneMint
class node_shared,node_json_data toneRose
class node_employee_actor,node_admin_actor toneIndigo
```

## Components

### Access and profiles

- [Sign-in](https://github.com/krtzmrgrth/lets-g-hris/blob/main/index.php): `index.php`
- [Employee profile](https://github.com/krtzmrgrth/lets-g-hris/blob/main/employee_details.php): `employee_details.php`
- [Logout](https://github.com/krtzmrgrth/lets-g-hris/blob/main/logout.php): `logout.php`

### Employee services

- [Employee dashboard](https://github.com/krtzmrgrth/lets-g-hris/blob/main/dashboard.php): `dashboard.php`
- [Leave requests](https://github.com/krtzmrgrth/lets-g-hris/blob/main/leave_application.php): `leave_application.php`
- [Sick leave entry](https://github.com/krtzmrgrth/lets-g-hris/blob/main/sick_leave_application.php): `sick_leave_application.php`
- [Attendance requests](https://github.com/krtzmrgrth/lets-g-hris/blob/main/attendance_request.php): `attendance_request.php`

### Workforce operations

- [Manager dashboard](https://github.com/krtzmrgrth/lets-g-hris/blob/main/manager_dashboard.php): `manager_dashboard.php`
- [Admin overview](https://github.com/krtzmrgrth/lets-g-hris/blob/main/admin_dashboard.php): `admin_dashboard.php`
- [Employee administration](https://github.com/krtzmrgrth/lets-g-hris/blob/main/admin_employee_dashboard.php): `admin_employee_dashboard.php`
- [Payroll management](https://github.com/krtzmrgrth/lets-g-hris/blob/main/admin_payroll_dashboard.php): `admin_payroll_dashboard.php`

### Shared data

- [Session and domain helpers](https://github.com/krtzmrgrth/lets-g-hris/blob/main/includes/config.php): `includes/config.php`
- [JSON data files](https://github.com/krtzmrgrth/lets-g-hris/tree/main/data): `data`

### Other components

- **Employee**
- **HR admin**

## Connections

- Employee → Sign-in: signs in (evidence: `README.md`)
- HR admin → Sign-in: signs in (evidence: `README.md`)
- Sign-in → Session and domain helpers: checks credentials (evidence: `index.php`)
- Sign-in → Admin overview: routes admin (evidence: `index.php`)
- Sign-in → Manager dashboard: routes manager (evidence: `index.php`)
- Sign-in → Employee dashboard: routes employee (evidence: `index.php`)
- Employee dashboard → Session and domain helpers: loads domain data (evidence: `dashboard.php`)
- Employee profile → Session and domain helpers: reads and updates (evidence: `employee_details.php`)
- Leave requests → Session and domain helpers: submits requests (evidence: `leave_application.php`)
- Sick leave entry → Leave requests: redirects to (evidence: `sick_leave_application.php`)
- Attendance requests → Session and domain helpers: adds requests (evidence: `attendance_request.php`)
- Manager dashboard → Session and domain helpers: reviews requests (evidence: `manager_dashboard.php`)
- Admin overview → Session and domain helpers: manages workforce (evidence: `admin_dashboard.php`)
- Employee administration → Session and domain helpers: manages employees (evidence: `admin_employee_dashboard.php`)
- Payroll management → Session and domain helpers: loads payroll data (evidence: `admin_payroll_dashboard.php`)
- Session and domain helpers → JSON data files: reads and writes
- Employee → Employee dashboard: views overview
- Employee → Employee profile: views profile (evidence: `README.md`)
- Employee → Leave requests: applies for leave (evidence: `README.md`)
- Employee → Sick leave entry: starts sick leave (evidence: `README.md`)
- Employee → Attendance requests: requests attendance
- Employee → Logout: logs out
