# jmdusal/human-link architecture

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

- Interactive diagram: https://gitdiagram.com/jmdusal/human-link
- Repository: https://github.com/jmdusal/human-link

## Overview

HumanLink is a multi-company HR and work-management platform. An employee or administrator uses the React application to sign in and manage attendance, leave, payroll, people, and workspaces; the Laravel API exposes those operations and persists company-scoped records. The graph preserves the README’s major product areas and the sampled auth, attendance, leave, payroll, and workspace service boundaries. Several frontend-to-endpoint and unsampled controller-to-service links are not shown because the excerpts do not establish their exact calls.

Main entry points: [`humanlink/src/App.tsx`](https://github.com/jmdusal/human-link/blob/main/humanlink/src/App.tsx) (Web application), [`humanlink-api/routes/api.php`](https://github.com/jmdusal/human-link/blob/main/humanlink-api/routes/api.php) (API routing), [`humanlink-api/app/Services/Payroll/PayrollService.php`](https://github.com/jmdusal/human-link/blob/main/humanlink-api/app/Services/Payroll/PayrollService.php) (Payroll and payslips), [`humanlink-api/app/Services/Attendance/AttendanceService.php`](https://github.com/jmdusal/human-link/blob/main/humanlink-api/app/Services/Attendance/AttendanceService.php) (Attendance and schedules)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_frontend["React application"]
  node_react["Web application<br/>[App.tsx]"]
  node_ui_features["HR and work screens"]
end

subgraph group_api["Laravel API"]
  node_api_routes["API routing<br/>[api.php]"]
  node_auth_controller["Authentication endpoints"]
  node_workspace_controller["Workspace endpoints"]
end

subgraph group_hr["People operations"]
  node_attendance["Attendance and schedules"]
  node_leave["Leave management"]
  node_payroll["Payroll and payslips<br/>[PayrollService.php]"]
  node_lifecycle["Employee lifecycle"]
  node_reports["Dashboard and reports<br/>[ReportService.php]"]
end

subgraph group_work["Work management"]
  node_workspace["Workspace membership"]
  node_projects_tasks["Projects and tasks<br/>[TaskService.php]"]
end

subgraph group_platform["Shared platform"]
  node_auth_service["Authentication<br/>[AuthService.php]"]
  node_company_admin["Company administration<br/>[CompanyService.php]"]
  node_notifications["Notifications"]
end

node_employee(("HR users"))
node_mysql[("MySQL records")]
node_reverb["Reverb realtime"]

node_employee -->|"uses"| node_react
node_react -->|"renders"| node_ui_features
node_react -.->|"calls API"| node_api_routes
node_api_routes -->|"routes auth"| node_auth_controller
node_api_routes -->|"routes workspace"| node_workspace_controller
node_auth_controller -->|"delegates"| node_auth_service
node_workspace_controller -->|"delegates"| node_workspace
node_attendance -.->|"reads and writes"| node_mysql
node_leave -.->|"reads and writes"| node_mysql
node_payroll -.->|"reads and writes"| node_mysql
node_workspace -.->|"reads and writes"| node_mysql
node_attendance -->|"broadcasts timer"| node_reverb
node_leave -->|"generates payroll"| node_payroll
node_lifecycle -->|"generates final pay"| node_payroll

click node_react "https://github.com/jmdusal/human-link/blob/main/humanlink/src/App.tsx"
click node_ui_features "https://github.com/jmdusal/human-link/tree/main/humanlink/src/pages"
click node_api_routes "https://github.com/jmdusal/human-link/blob/main/humanlink-api/routes/api.php"
click node_auth_controller "https://github.com/jmdusal/human-link/blob/main/humanlink-api/app/Http/Controllers/Api/AuthenticationController.php"
click node_workspace_controller "https://github.com/jmdusal/human-link/blob/main/humanlink-api/app/Http/Controllers/Api/WorkspaceController.php"
click node_auth_service "https://github.com/jmdusal/human-link/blob/main/humanlink-api/app/Services/Auth/AuthService.php"
click node_attendance "https://github.com/jmdusal/human-link/blob/main/humanlink-api/app/Services/Attendance/AttendanceService.php"
click node_leave "https://github.com/jmdusal/human-link/blob/main/humanlink-api/app/Services/LeaveRequest/LeaveRequestService.php"
click node_payroll "https://github.com/jmdusal/human-link/blob/main/humanlink-api/app/Services/Payroll/PayrollService.php"
click node_lifecycle "https://github.com/jmdusal/human-link/blob/main/humanlink-api/app/Services/EmployeeLifecycle/EmployeeLifecycleService.php"
click node_workspace "https://github.com/jmdusal/human-link/blob/main/humanlink-api/app/Services/Workspace/WorkspaceService.php"
click node_projects_tasks "https://github.com/jmdusal/human-link/blob/main/humanlink-api/app/Services/Task/TaskService.php"
click node_reports "https://github.com/jmdusal/human-link/blob/main/humanlink-api/app/Services/Report/ReportService.php"
click node_company_admin "https://github.com/jmdusal/human-link/blob/main/humanlink-api/app/Services/Company/CompanyService.php"
click node_notifications "https://github.com/jmdusal/human-link/tree/main/humanlink-api/app/Notifications"

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_react,node_ui_features,node_employee toneBlue
class node_api_routes,node_auth_controller,node_workspace_controller,node_mysql toneAmber
class node_attendance,node_leave,node_payroll,node_lifecycle,node_reports toneMint
class node_workspace,node_projects_tasks toneRose
class node_auth_service,node_company_admin,node_notifications,node_reverb toneIndigo
```

## Components

### React application

- [Web application](https://github.com/jmdusal/human-link/blob/main/humanlink/src/App.tsx): `humanlink/src/App.tsx`
- [HR and work screens](https://github.com/jmdusal/human-link/tree/main/humanlink/src/pages): `humanlink/src/pages`

### Laravel API

- [API routing](https://github.com/jmdusal/human-link/blob/main/humanlink-api/routes/api.php): `humanlink-api/routes/api.php`
- [Authentication endpoints](https://github.com/jmdusal/human-link/blob/main/humanlink-api/app/Http/Controllers/Api/AuthenticationController.php): `humanlink-api/app/Http/Controllers/Api/AuthenticationController.php`
- [Workspace endpoints](https://github.com/jmdusal/human-link/blob/main/humanlink-api/app/Http/Controllers/Api/WorkspaceController.php): `humanlink-api/app/Http/Controllers/Api/WorkspaceController.php`

### People operations

- [Attendance and schedules](https://github.com/jmdusal/human-link/blob/main/humanlink-api/app/Services/Attendance/AttendanceService.php): `humanlink-api/app/Services/Attendance/AttendanceService.php`
- [Leave management](https://github.com/jmdusal/human-link/blob/main/humanlink-api/app/Services/LeaveRequest/LeaveRequestService.php): `humanlink-api/app/Services/LeaveRequest/LeaveRequestService.php`
- [Payroll and payslips](https://github.com/jmdusal/human-link/blob/main/humanlink-api/app/Services/Payroll/PayrollService.php): `humanlink-api/app/Services/Payroll/PayrollService.php`
- [Employee lifecycle](https://github.com/jmdusal/human-link/blob/main/humanlink-api/app/Services/EmployeeLifecycle/EmployeeLifecycleService.php): `humanlink-api/app/Services/EmployeeLifecycle/EmployeeLifecycleService.php`
- [Dashboard and reports](https://github.com/jmdusal/human-link/blob/main/humanlink-api/app/Services/Report/ReportService.php): `humanlink-api/app/Services/Report/ReportService.php`

### Work management

- [Workspace membership](https://github.com/jmdusal/human-link/blob/main/humanlink-api/app/Services/Workspace/WorkspaceService.php): `humanlink-api/app/Services/Workspace/WorkspaceService.php`
- [Projects and tasks](https://github.com/jmdusal/human-link/blob/main/humanlink-api/app/Services/Task/TaskService.php): `humanlink-api/app/Services/Task/TaskService.php`

### Shared platform

- [Authentication](https://github.com/jmdusal/human-link/blob/main/humanlink-api/app/Services/Auth/AuthService.php): `humanlink-api/app/Services/Auth/AuthService.php`
- [Company administration](https://github.com/jmdusal/human-link/blob/main/humanlink-api/app/Services/Company/CompanyService.php): `humanlink-api/app/Services/Company/CompanyService.php`
- [Notifications](https://github.com/jmdusal/human-link/tree/main/humanlink-api/app/Notifications): `humanlink-api/app/Notifications`

### Other components

- **HR users**
- **MySQL records**
- **Reverb realtime**

## Connections

- HR users → Web application: uses (evidence: `README.md`)
- Web application → HR and work screens: renders (evidence: `humanlink/src/App.tsx`)
- Web application → API routing: calls API (evidence: `README.md`)
- API routing → Authentication endpoints: routes auth (evidence: `humanlink-api/routes/api.php`)
- API routing → Workspace endpoints: routes workspace (evidence: `humanlink-api/routes/api.php`)
- Authentication endpoints → Authentication: delegates (evidence: `humanlink-api/app/Http/Controllers/Api/AuthenticationController.php`)
- Workspace endpoints → Workspace membership: delegates (evidence: `humanlink-api/app/Http/Controllers/Api/WorkspaceController.php`)
- Attendance and schedules → MySQL records: reads and writes
- Leave management → MySQL records: reads and writes
- Payroll and payslips → MySQL records: reads and writes
- Workspace membership → MySQL records: reads and writes
- Attendance and schedules → Reverb realtime: broadcasts timer (evidence: `humanlink-api/app/Services/Attendance/AttendanceService.php`)
- Leave management → Payroll and payslips: generates payroll (evidence: `humanlink-api/app/Services/LeaveRequest/LeaveRequestService.php`)
- Employee lifecycle → Payroll and payslips: generates final pay (evidence: `humanlink-api/app/Services/EmployeeLifecycle/EmployeeLifecycleService.php`)
