# nishanth6153/humano architecture

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

- Interactive diagram: https://gitdiagram.com/nishanth6153/humano
- Repository: https://github.com/nishanth6153/humano

## Overview

Dayflow is an employee-management application for HR, administrators, and employees. Users sign in and are routed to role-specific pages for employee profiles, attendance, leave, and payroll; the frontend services make API requests to an Express backend, whose domain services access data through Prisma. The graph preserves these major product areas. Some frontend-to-backend links are dashed because the excerpts do not establish the complete HTTP wiring for each domain.

Main entry points: [`backend/src/app.ts`](https://github.com/nishanth6153/humano/blob/main/backend/src/app.ts) (API application), [`backend/src/config/prisma.ts`](https://github.com/nishanth6153/humano/blob/main/backend/src/config/prisma.ts) (Prisma data access), [`frontend/src/App.tsx`](https://github.com/nishanth6153/humano/blob/main/frontend/src/App.tsx) (Role-based app), [`backend/src/middleware/authenticate.ts`](https://github.com/nishanth6153/humano/blob/main/backend/src/middleware/authenticate.ts) (Authentication and roles)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_web["Web application"]
  node_app["Role-based app<br/>[App.tsx]"]
  node_auth_context["Session context<br/>[AuthContext.tsx]"]
  node_api_client["API client<br/>[client.ts]"]
  node_auth_front["Sign-in service<br/>[auth.service.ts]"]
  node_people_ui["People pages"]
  node_attendance_ui["Attendance pages"]
  node_timeoff_ui["Leave pages"]
  node_payroll_ui["Payroll pages"]
end

subgraph group_identity["Identity and access"]
  node_backend_app["API application<br/>[app.ts]"]
  node_auth_api["Authentication API"]
  node_auth_middleware["Authentication and roles<br/>[authenticate.ts]"]
end

subgraph group_people["Employee management"]
  node_employee_api["Employee API"]
  node_prisma["Prisma data access<br/>[prisma.ts]"]
  node_database[("Application database")]
end

subgraph group_workforce["Workforce operations"]
  node_attendance_api["Attendance API"]
  node_timeoff_api["Time-off API"]
end

subgraph group_compensation["Compensation and insights"]
  node_salary_api["Salary API"]
  node_dashboard_api["Dashboard analytics"]
end

node_users(("HR and employees"))

node_users -->|"use"| node_app
node_app -->|"provides session"| node_auth_context
node_app -->|"routes to"| node_people_ui
node_app -->|"routes to"| node_attendance_ui
node_app -->|"routes to"| node_timeoff_ui
node_app -->|"routes to"| node_payroll_ui
node_auth_context -->|"uses"| node_auth_front
node_auth_front -->|"requests"| node_api_client
node_api_client -.->|"sends API requests"| node_backend_app
node_backend_app -->|"mounts routes"| node_auth_api
node_backend_app -->|"mounts routes"| node_employee_api
node_backend_app -->|"mounts routes"| node_attendance_api
node_backend_app -->|"mounts routes"| node_timeoff_api
node_backend_app -->|"mounts routes"| node_salary_api
node_backend_app -->|"mounts routes"| node_dashboard_api
node_auth_api -->|"protects routes"| node_auth_middleware
node_employee_api -->|"protects routes"| node_auth_middleware
node_attendance_api -->|"protects routes"| node_auth_middleware
node_timeoff_api -->|"protects routes"| node_auth_middleware
node_salary_api -->|"protects routes"| node_auth_middleware
node_dashboard_api -->|"protects routes"| node_auth_middleware
node_auth_api -->|"reads user records"| node_prisma
node_employee_api -->|"accesses records"| node_prisma
node_attendance_api -->|"accesses records"| node_prisma
node_timeoff_api -->|"accesses records"| node_prisma
node_salary_api -->|"accesses records"| node_prisma
node_dashboard_api -->|"queries metrics"| node_prisma
node_prisma -.->|"reads and writes"| node_database
node_people_ui -.->|"uses API"| node_employee_api
node_attendance_ui -.->|"uses API"| node_attendance_api
node_timeoff_ui -.->|"uses API"| node_timeoff_api
node_payroll_ui -.->|"uses API"| node_salary_api

click node_app "https://github.com/nishanth6153/humano/blob/main/frontend/src/App.tsx"
click node_auth_context "https://github.com/nishanth6153/humano/blob/main/frontend/src/context/AuthContext.tsx"
click node_api_client "https://github.com/nishanth6153/humano/blob/main/frontend/src/api/client.ts"
click node_auth_front "https://github.com/nishanth6153/humano/blob/main/frontend/src/services/auth.service.ts"
click node_people_ui "https://github.com/nishanth6153/humano/tree/main/frontend/src/pages"
click node_attendance_ui "https://github.com/nishanth6153/humano/tree/main/frontend/src/pages"
click node_timeoff_ui "https://github.com/nishanth6153/humano/tree/main/frontend/src/pages"
click node_payroll_ui "https://github.com/nishanth6153/humano/tree/main/frontend/src/pages"
click node_backend_app "https://github.com/nishanth6153/humano/blob/main/backend/src/app.ts"
click node_auth_api "https://github.com/nishanth6153/humano/tree/main/backend/src/auth"
click node_employee_api "https://github.com/nishanth6153/humano/tree/main/backend/src/employees"
click node_attendance_api "https://github.com/nishanth6153/humano/tree/main/backend/src/attendance"
click node_timeoff_api "https://github.com/nishanth6153/humano/tree/main/backend/src/timeoff"
click node_salary_api "https://github.com/nishanth6153/humano/tree/main/backend/src/salary"
click node_dashboard_api "https://github.com/nishanth6153/humano/tree/main/backend/src/dashboard"
click node_auth_middleware "https://github.com/nishanth6153/humano/blob/main/backend/src/middleware/authenticate.ts"
click node_prisma "https://github.com/nishanth6153/humano/blob/main/backend/src/config/prisma.ts"

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_app,node_auth_context,node_api_client,node_auth_front,node_people_ui,node_attendance_ui,node_timeoff_ui,node_payroll_ui toneBlue
class node_backend_app,node_auth_api,node_auth_middleware toneAmber
class node_employee_api,node_prisma,node_database toneMint
class node_attendance_api,node_timeoff_api toneRose
class node_salary_api,node_dashboard_api,node_users toneIndigo
```

## Components

### Web application

- [Role-based app](https://github.com/nishanth6153/humano/blob/main/frontend/src/App.tsx): `frontend/src/App.tsx`
- [Session context](https://github.com/nishanth6153/humano/blob/main/frontend/src/context/AuthContext.tsx): `frontend/src/context/AuthContext.tsx`
- [API client](https://github.com/nishanth6153/humano/blob/main/frontend/src/api/client.ts): `frontend/src/api/client.ts`
- [Sign-in service](https://github.com/nishanth6153/humano/blob/main/frontend/src/services/auth.service.ts): `frontend/src/services/auth.service.ts`
- [People pages](https://github.com/nishanth6153/humano/tree/main/frontend/src/pages): `frontend/src/pages`
- [Attendance pages](https://github.com/nishanth6153/humano/tree/main/frontend/src/pages): `frontend/src/pages`
- [Leave pages](https://github.com/nishanth6153/humano/tree/main/frontend/src/pages): `frontend/src/pages`
- [Payroll pages](https://github.com/nishanth6153/humano/tree/main/frontend/src/pages): `frontend/src/pages`

### Identity and access

- [API application](https://github.com/nishanth6153/humano/blob/main/backend/src/app.ts): `backend/src/app.ts`
- [Authentication API](https://github.com/nishanth6153/humano/tree/main/backend/src/auth): `backend/src/auth`
- [Authentication and roles](https://github.com/nishanth6153/humano/blob/main/backend/src/middleware/authenticate.ts): `backend/src/middleware/authenticate.ts`

### Employee management

- [Employee API](https://github.com/nishanth6153/humano/tree/main/backend/src/employees): `backend/src/employees`
- [Prisma data access](https://github.com/nishanth6153/humano/blob/main/backend/src/config/prisma.ts): `backend/src/config/prisma.ts`
- **Application database**

### Workforce operations

- [Attendance API](https://github.com/nishanth6153/humano/tree/main/backend/src/attendance): `backend/src/attendance`
- [Time-off API](https://github.com/nishanth6153/humano/tree/main/backend/src/timeoff): `backend/src/timeoff`

### Compensation and insights

- [Salary API](https://github.com/nishanth6153/humano/tree/main/backend/src/salary): `backend/src/salary`
- [Dashboard analytics](https://github.com/nishanth6153/humano/tree/main/backend/src/dashboard): `backend/src/dashboard`

### Other components

- **HR and employees**

## Connections

- HR and employees → Role-based app: use (evidence: `frontend/src/App.tsx`)
- Role-based app → Session context: provides session (evidence: `frontend/src/App.tsx`)
- Role-based app → People pages: routes to (evidence: `frontend/src/App.tsx`)
- Role-based app → Attendance pages: routes to (evidence: `frontend/src/App.tsx`)
- Role-based app → Leave pages: routes to (evidence: `frontend/src/App.tsx`)
- Role-based app → Payroll pages: routes to (evidence: `frontend/src/App.tsx`)
- Session context → Sign-in service: uses (evidence: `frontend/src/context/AuthContext.tsx`)
- Sign-in service → API client: requests (evidence: `frontend/src/services/auth.service.ts`)
- API client → API application: sends API requests
- API application → Authentication API: mounts routes (evidence: `backend/src/app.ts`)
- API application → Employee API: mounts routes (evidence: `backend/src/app.ts`)
- API application → Attendance API: mounts routes (evidence: `backend/src/app.ts`)
- API application → Time-off API: mounts routes (evidence: `backend/src/app.ts`)
- API application → Salary API: mounts routes (evidence: `backend/src/app.ts`)
- API application → Dashboard analytics: mounts routes (evidence: `backend/src/app.ts`)
- Authentication API → Authentication and roles: protects routes (evidence: `backend/src/auth/auth.routes.ts`)
- Employee API → Authentication and roles: protects routes (evidence: `backend/src/employees/employee.routes.ts`)
- Attendance API → Authentication and roles: protects routes (evidence: `backend/src/attendance/attendance.routes.ts`)
- Time-off API → Authentication and roles: protects routes (evidence: `backend/src/timeoff/timeoff.routes.ts`)
- Salary API → Authentication and roles: protects routes (evidence: `backend/src/salary/salary.routes.ts`)
- Dashboard analytics → Authentication and roles: protects routes (evidence: `backend/src/dashboard/dashboard.routes.ts`)
- Authentication API → Prisma data access: reads user records (evidence: `backend/src/auth/auth.service.ts`)
- Employee API → Prisma data access: accesses records (evidence: `backend/src/employees/employee.service.ts`)
- Attendance API → Prisma data access: accesses records (evidence: `backend/src/attendance/attendance.service.ts`)
- Time-off API → Prisma data access: accesses records (evidence: `backend/src/timeoff/timeoff.service.ts`)
- Salary API → Prisma data access: accesses records (evidence: `backend/src/salary/salary.service.ts`)
- Dashboard analytics → Prisma data access: queries metrics (evidence: `backend/src/dashboard/dashboard.service.ts`)
- Prisma data access → Application database: reads and writes
- People pages → Employee API: uses API
- Attendance pages → Attendance API: uses API
- Leave pages → Time-off API: uses API
- Payroll pages → Salary API: uses API
