# tejas-vetukuri/hrms-4at architecture

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

- Interactive diagram: https://gitdiagram.com/tejas-vetukuri/hrms-4at
- Repository: https://github.com/tejas-vetukuri/hrms-4at

## Overview

4AT-HRMS is a single-company HR system with a Next.js employee/admin interface and a Django/DRF backend. The principal path is a signed-in user working in an HR screen, through a Next.js API route and proxy, to backend domain handling and a response. The tree shows employee, leave-example, payroll, account and audit modules, alongside frontend attendance, performance and other screens; their backend counterparts are not all present. Edges reflect the sampled proxy behavior and documented stack, not uninspected module internals.

Main entry points: [`backend/config`](https://github.com/tejas-vetukuri/hrms-4at/tree/main/backend/config) (Django API), [`frontend/src/lib/api/proxy.ts`](https://github.com/tejas-vetukuri/hrms-4at/blob/main/frontend/src/lib/api/proxy.ts) (Backend proxy), [`frontend/src/app/(app)`](https://github.com/tejas-vetukuri/hrms-4at/tree/main/frontend/src/app/(app)) (HR screens), [`backend/core`](https://github.com/tejas-vetukuri/hrms-4at/tree/main/backend/core) (Scope and permissions)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_frontend["Next.js interface"]
  node_screens["HR screens"]
  node_authscreen["Login screen<br/>[page.tsx]"]
  node_employeeapi["Employee routes"]
  node_attendanceapi["Attendance route"]
  node_essapi["ESS profile route<br/>[route.ts]"]
  node_adminapi["Admin routes<br/>[route.ts]"]
end

subgraph group_identity["Identity and access"]
  node_authcontext["Auth context<br/>[auth-context.tsx]"]
  node_authroutes["Auth routes"]
  node_proxy["Backend proxy<br/>[proxy.ts]"]
  node_accounts["Accounts and RBAC"]
end

subgraph group_hr["HR domains"]
  node_employees["Employee directory"]
  node_leave["Leave example"]
  node_payroll["Payroll"]
end

subgraph group_backend["Django platform"]
  node_core["Scope and permissions"]
  node_audit["Audit records"]
  node_django["Django API"]
end

node_employee(("HR user"))
node_database[("Application database")]

node_employee -->|"signs in"| node_authscreen
node_authscreen -->|"submits credentials"| node_authroutes
node_authcontext -->|"requests identity"| node_authroutes
node_screens -->|"requests directory"| node_employeeapi
node_screens -->|"requests attendance"| node_attendanceapi
node_screens -->|"updates profile"| node_essapi
node_screens -->|"manages HR"| node_adminapi
node_employeeapi -->|"calls proxy"| node_proxy
node_attendanceapi -->|"calls proxy"| node_proxy
node_essapi -->|"calls proxy"| node_proxy
node_adminapi -->|"dispatches proxy"| node_proxy
node_authroutes -->|"calls proxy"| node_proxy
node_proxy -->|"forwards requests"| node_django
node_django -->|"routes identity"| node_accounts
node_django -->|"routes directory"| node_employees
node_django -->|"routes leave"| node_leave
node_django -->|"routes payroll"| node_payroll
node_django -->|"routes audit"| node_audit
node_accounts -->|"uses access rules"| node_core
node_employees -->|"uses access rules"| node_core
node_leave -->|"uses access rules"| node_core
node_payroll -->|"uses access rules"| node_core

click node_screens "https://github.com/tejas-vetukuri/hrms-4at/tree/main/frontend/src/app/(app)"
click node_authscreen "https://github.com/tejas-vetukuri/hrms-4at/blob/main/frontend/src/app/login/page.tsx"
click node_authcontext "https://github.com/tejas-vetukuri/hrms-4at/blob/main/frontend/src/lib/auth/auth-context.tsx"
click node_authroutes "https://github.com/tejas-vetukuri/hrms-4at/tree/main/frontend/src/app/api/auth"
click node_proxy "https://github.com/tejas-vetukuri/hrms-4at/blob/main/frontend/src/lib/api/proxy.ts"
click node_employeeapi "https://github.com/tejas-vetukuri/hrms-4at/tree/main/frontend/src/app/api/employees"
click node_attendanceapi "https://github.com/tejas-vetukuri/hrms-4at/tree/main/frontend/src/app/api/attendance"
click node_essapi "https://github.com/tejas-vetukuri/hrms-4at/blob/main/frontend/src/app/api/ess/profile/route.ts"
click node_adminapi "https://github.com/tejas-vetukuri/hrms-4at/blob/main/frontend/src/app/api/admin/%5B...path%5D/route.ts"
click node_accounts "https://github.com/tejas-vetukuri/hrms-4at/tree/main/backend/accounts"
click node_core "https://github.com/tejas-vetukuri/hrms-4at/tree/main/backend/core"
click node_employees "https://github.com/tejas-vetukuri/hrms-4at/tree/main/backend/employees"
click node_leave "https://github.com/tejas-vetukuri/hrms-4at/tree/main/backend/example_leave"
click node_payroll "https://github.com/tejas-vetukuri/hrms-4at/tree/main/backend/payroll"
click node_audit "https://github.com/tejas-vetukuri/hrms-4at/tree/main/backend/audit"
click node_django "https://github.com/tejas-vetukuri/hrms-4at/tree/main/backend/config"

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_screens,node_authscreen,node_employeeapi,node_attendanceapi,node_essapi,node_adminapi,node_employee toneBlue
class node_authcontext,node_authroutes,node_proxy,node_accounts,node_database toneAmber
class node_employees,node_leave,node_payroll toneMint
class node_core,node_audit,node_django toneRose
```

## Components

### Next.js interface

- [HR screens](https://github.com/tejas-vetukuri/hrms-4at/tree/main/frontend/src/app/(app)): `frontend/src/app/(app)`
- [Login screen](https://github.com/tejas-vetukuri/hrms-4at/blob/main/frontend/src/app/login/page.tsx): `frontend/src/app/login/page.tsx`
- [Employee routes](https://github.com/tejas-vetukuri/hrms-4at/tree/main/frontend/src/app/api/employees): `frontend/src/app/api/employees`
- [Attendance route](https://github.com/tejas-vetukuri/hrms-4at/tree/main/frontend/src/app/api/attendance): `frontend/src/app/api/attendance`
- [ESS profile route](https://github.com/tejas-vetukuri/hrms-4at/blob/main/frontend/src/app/api/ess/profile/route.ts): `frontend/src/app/api/ess/profile/route.ts`
- [Admin routes](https://github.com/tejas-vetukuri/hrms-4at/blob/main/frontend/src/app/api/admin/%5B...path%5D/route.ts): `frontend/src/app/api/admin/[...path]/route.ts`

### Identity and access

- [Auth context](https://github.com/tejas-vetukuri/hrms-4at/blob/main/frontend/src/lib/auth/auth-context.tsx): `frontend/src/lib/auth/auth-context.tsx`
- [Auth routes](https://github.com/tejas-vetukuri/hrms-4at/tree/main/frontend/src/app/api/auth): `frontend/src/app/api/auth`
- [Backend proxy](https://github.com/tejas-vetukuri/hrms-4at/blob/main/frontend/src/lib/api/proxy.ts): `frontend/src/lib/api/proxy.ts`
- [Accounts and RBAC](https://github.com/tejas-vetukuri/hrms-4at/tree/main/backend/accounts): `backend/accounts`

### HR domains

- [Employee directory](https://github.com/tejas-vetukuri/hrms-4at/tree/main/backend/employees): `backend/employees`
- [Leave example](https://github.com/tejas-vetukuri/hrms-4at/tree/main/backend/example_leave): `backend/example_leave`
- [Payroll](https://github.com/tejas-vetukuri/hrms-4at/tree/main/backend/payroll): `backend/payroll`

### Django platform

- [Scope and permissions](https://github.com/tejas-vetukuri/hrms-4at/tree/main/backend/core): `backend/core`
- [Audit records](https://github.com/tejas-vetukuri/hrms-4at/tree/main/backend/audit): `backend/audit`
- [Django API](https://github.com/tejas-vetukuri/hrms-4at/tree/main/backend/config): `backend/config`

### Other components

- **HR user**
- **Application database**

## Connections

- HR user → Login screen: signs in
- Login screen → Auth routes: submits credentials
- Auth context → Auth routes: requests identity
- HR screens → Employee routes: requests directory
- HR screens → Attendance route: requests attendance
- HR screens → ESS profile route: updates profile
- HR screens → Admin routes: manages HR
- Employee routes → Backend proxy: calls proxy
- Attendance route → Backend proxy: calls proxy
- ESS profile route → Backend proxy: calls proxy
- Admin routes → Backend proxy: dispatches proxy
- Auth routes → Backend proxy: calls proxy
- Backend proxy → Django API: forwards requests
- Django API → Accounts and RBAC: routes identity
- Django API → Employee directory: routes directory
- Django API → Leave example: routes leave
- Django API → Payroll: routes payroll
- Django API → Audit records: routes audit
- Accounts and RBAC → Scope and permissions: uses access rules
- Employee directory → Scope and permissions: uses access rules
- Leave example → Scope and permissions: uses access rules
- Payroll → Scope and permissions: uses access rules
