# parvez141300/zentro-hr-payroll-sass-erp-client architecture

> Architecture diagram of the GitHub repository parvez141300/zentro-hr-payroll-sass-erp-client, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-14). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/parvez141300/zentro-hr-payroll-sass-erp-client
- Repository: https://github.com/parvez141300/zentro-hr-payroll-sass-erp-client

## Overview

Zentro is a multi-tenant HR and payroll ERP frontend serving six roles, from platform administration to employee self-service. The principal workflow is: a user registers or signs in, reaches a role-appropriate dashboard, manages or views workforce records, and handles attendance, leave, or payroll tasks. The tree and README establish these product areas, while sampled auth and HTTP code show server actions delegating to services that call a backend API. Many domain-specific UI-to-service links were not sampled, so those links are marked unverified.

Main entry points: [`src/app/(dashboardLayout)/(roleBasedProtectedRoute)`](https://github.com/parvez141300/zentro-hr-payroll-sass-erp-client/tree/main/src/app/(dashboardLayout)/(roleBasedProtectedRoute)) (Role Dashboards), [`src/actions`](https://github.com/parvez141300/zentro-hr-payroll-sass-erp-client/tree/main/src/actions) (Domain Actions), [`src/lib/http/httpServer.ts`](https://github.com/parvez141300/zentro-hr-payroll-sass-erp-client/blob/main/src/lib/http/httpServer.ts) (Server HTTP Client), [`src/app/(authLayout)`](https://github.com/parvez141300/zentro-hr-payroll-sass-erp-client/tree/main/src/app/(authLayout)) (Login and Register)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_entry["Entry and Access"]
  node_public["Public Site"]
  node_auth_pages["Login and Register"]
  node_auth_forms["Auth Forms"]
  node_auth_action["Auth Actions<br/>[auth.action.ts]"]
  node_auth_service["Auth Service<br/>[auth.service.ts]"]
  node_dashboards["Role Dashboards"]
end

subgraph group_workforce["Workforce Management"]
  node_profiles["Role Profiles"]
  node_employee_admin["Employee Management"]
  node_org_admin["Organization Setup"]
end

subgraph group_operations["HR Operations"]
  node_attendance["Attendance"]
  node_leave["Leave Management"]
  node_payroll["Payroll"]
end

subgraph group_platform["Platform and Billing"]
  node_platform_admin["Platform Administration"]
  node_plan_config["Subscription Plans"]
end

subgraph group_transport["API and Session Layer"]
  node_actions["Domain Actions"]
  node_services["Domain Services"]
  node_server_http["Server HTTP Client<br/>[httpServer.ts]"]
  node_session["Session and Tokens<br/>[refresh.server.ts]"]
end

node_user(("User"))
node_backend["Express API"]

node_user -->|"browses"| node_public
node_user -->|"signs in"| node_auth_pages
node_auth_pages -->|"renders"| node_auth_forms
node_auth_forms -.->|"submits"| node_auth_action
node_auth_action -->|"delegates"| node_auth_service
node_auth_service -->|"calls"| node_server_http
node_server_http -->|"sends requests"| node_backend
node_server_http -->|"refreshes tokens"| node_session
node_user -->|"opens role view"| node_dashboards
node_dashboards -.->|"shows profile"| node_profiles
node_dashboards -.->|"manages employees"| node_employee_admin
node_dashboards -.->|"manages departments"| node_org_admin
node_dashboards -.->|"manages attendance"| node_attendance
node_dashboards -.->|"handles leave"| node_leave
node_dashboards -.->|"processes payroll"| node_payroll
node_dashboards -->|"routes by role"| node_platform_admin
node_platform_admin -.->|"manages plans"| node_plan_config
node_employee_admin -.->|"submits changes"| node_actions
node_org_admin -.->|"submits changes"| node_actions
node_attendance -.->|"submits records"| node_actions
node_leave -.->|"submits requests"| node_actions
node_payroll -.->|"submits payroll"| node_actions
node_actions -.->|"delegates"| node_services
node_services -.->|"calls API"| node_server_http

click node_public "https://github.com/parvez141300/zentro-hr-payroll-sass-erp-client/tree/main/src/app/(commonLayout)"
click node_auth_pages "https://github.com/parvez141300/zentro-hr-payroll-sass-erp-client/tree/main/src/app/(authLayout)"
click node_auth_forms "https://github.com/parvez141300/zentro-hr-payroll-sass-erp-client/tree/main/src/components/modules/authentication"
click node_auth_action "https://github.com/parvez141300/zentro-hr-payroll-sass-erp-client/blob/main/src/actions/auth.action.ts"
click node_auth_service "https://github.com/parvez141300/zentro-hr-payroll-sass-erp-client/blob/main/src/services/auth.service.ts"
click node_dashboards "https://github.com/parvez141300/zentro-hr-payroll-sass-erp-client/tree/main/src/app/(dashboardLayout)/(roleBasedProtectedRoute)"
click node_profiles "https://github.com/parvez141300/zentro-hr-payroll-sass-erp-client/tree/main/src/components/modules/(dashboard)/(common)/profile"
click node_employee_admin "https://github.com/parvez141300/zentro-hr-payroll-sass-erp-client/tree/main/src/components/modules/(dashboard)/dashboard/manageEmployeeTable"
click node_org_admin "https://github.com/parvez141300/zentro-hr-payroll-sass-erp-client/tree/main/src/components/modules/(dashboard)/dashboard/manageDepartmentTable"
click node_attendance "https://github.com/parvez141300/zentro-hr-payroll-sass-erp-client/tree/main/src/components/modules/(dashboard)/dashboard/manageAttendanceTable"
click node_leave "https://github.com/parvez141300/zentro-hr-payroll-sass-erp-client/tree/main/src/components/modules/(dashboard)/dashboard/manageLeaveTable"
click node_payroll "https://github.com/parvez141300/zentro-hr-payroll-sass-erp-client/tree/main/src/components/modules/(dashboard)/dashboard/managePayrollTable"
click node_platform_admin "https://github.com/parvez141300/zentro-hr-payroll-sass-erp-client/tree/main/src/app/(dashboardLayout)/(roleBasedProtectedRoute)/(platformSuperAdminRoute)"
click node_plan_config "https://github.com/parvez141300/zentro-hr-payroll-sass-erp-client/blob/main/src/services/subscriptionPlanConfig.service.ts"
click node_actions "https://github.com/parvez141300/zentro-hr-payroll-sass-erp-client/tree/main/src/actions"
click node_services "https://github.com/parvez141300/zentro-hr-payroll-sass-erp-client/tree/main/src/services"
click node_server_http "https://github.com/parvez141300/zentro-hr-payroll-sass-erp-client/blob/main/src/lib/http/httpServer.ts"
click node_session "https://github.com/parvez141300/zentro-hr-payroll-sass-erp-client/blob/main/src/lib/auth/refresh.server.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_public,node_auth_pages,node_auth_forms,node_auth_action,node_auth_service,node_dashboards,node_user toneBlue
class node_profiles,node_employee_admin,node_org_admin toneAmber
class node_attendance,node_leave,node_payroll,node_backend toneMint
class node_platform_admin,node_plan_config toneRose
class node_actions,node_services,node_server_http,node_session toneIndigo
```

## Components

### Entry and Access

- [Public Site](https://github.com/parvez141300/zentro-hr-payroll-sass-erp-client/tree/main/src/app/(commonLayout)): `src/app/(commonLayout)`
- [Login and Register](https://github.com/parvez141300/zentro-hr-payroll-sass-erp-client/tree/main/src/app/(authLayout)): `src/app/(authLayout)`
- [Auth Forms](https://github.com/parvez141300/zentro-hr-payroll-sass-erp-client/tree/main/src/components/modules/authentication): `src/components/modules/authentication`
- [Auth Actions](https://github.com/parvez141300/zentro-hr-payroll-sass-erp-client/blob/main/src/actions/auth.action.ts): `src/actions/auth.action.ts`
- [Auth Service](https://github.com/parvez141300/zentro-hr-payroll-sass-erp-client/blob/main/src/services/auth.service.ts): `src/services/auth.service.ts`
- [Role Dashboards](https://github.com/parvez141300/zentro-hr-payroll-sass-erp-client/tree/main/src/app/(dashboardLayout)/(roleBasedProtectedRoute)): `src/app/(dashboardLayout)/(roleBasedProtectedRoute)`

### Workforce Management

- [Role Profiles](https://github.com/parvez141300/zentro-hr-payroll-sass-erp-client/tree/main/src/components/modules/(dashboard)/(common)/profile): `src/components/modules/(dashboard)/(common)/profile`
- [Employee Management](https://github.com/parvez141300/zentro-hr-payroll-sass-erp-client/tree/main/src/components/modules/(dashboard)/dashboard/manageEmployeeTable): `src/components/modules/(dashboard)/dashboard/manageEmployeeTable`
- [Organization Setup](https://github.com/parvez141300/zentro-hr-payroll-sass-erp-client/tree/main/src/components/modules/(dashboard)/dashboard/manageDepartmentTable): `src/components/modules/(dashboard)/dashboard/manageDepartmentTable`

### HR Operations

- [Attendance](https://github.com/parvez141300/zentro-hr-payroll-sass-erp-client/tree/main/src/components/modules/(dashboard)/dashboard/manageAttendanceTable): `src/components/modules/(dashboard)/dashboard/manageAttendanceTable`
- [Leave Management](https://github.com/parvez141300/zentro-hr-payroll-sass-erp-client/tree/main/src/components/modules/(dashboard)/dashboard/manageLeaveTable): `src/components/modules/(dashboard)/dashboard/manageLeaveTable`
- [Payroll](https://github.com/parvez141300/zentro-hr-payroll-sass-erp-client/tree/main/src/components/modules/(dashboard)/dashboard/managePayrollTable): `src/components/modules/(dashboard)/dashboard/managePayrollTable`

### Platform and Billing

- [Platform Administration](https://github.com/parvez141300/zentro-hr-payroll-sass-erp-client/tree/main/src/app/(dashboardLayout)/(roleBasedProtectedRoute)/(platformSuperAdminRoute)): `src/app/(dashboardLayout)/(roleBasedProtectedRoute)/(platformSuperAdminRoute)`
- [Subscription Plans](https://github.com/parvez141300/zentro-hr-payroll-sass-erp-client/blob/main/src/services/subscriptionPlanConfig.service.ts): `src/services/subscriptionPlanConfig.service.ts`

### API and Session Layer

- [Domain Actions](https://github.com/parvez141300/zentro-hr-payroll-sass-erp-client/tree/main/src/actions): `src/actions`
- [Domain Services](https://github.com/parvez141300/zentro-hr-payroll-sass-erp-client/tree/main/src/services): `src/services`
- [Server HTTP Client](https://github.com/parvez141300/zentro-hr-payroll-sass-erp-client/blob/main/src/lib/http/httpServer.ts): `src/lib/http/httpServer.ts`
- [Session and Tokens](https://github.com/parvez141300/zentro-hr-payroll-sass-erp-client/blob/main/src/lib/auth/refresh.server.ts): `src/lib/auth/refresh.server.ts`

### Other components

- **User**
- **Express API**

## Connections

- User → Public Site: browses (evidence: `README.md`)
- User → Login and Register: signs in (evidence: `src/app/(authLayout)/login/page.tsx`)
- Login and Register → Auth Forms: renders (evidence: `src/app/(authLayout)/login/page.tsx`)
- Auth Forms → Auth Actions: submits
- Auth Actions → Auth Service: delegates (evidence: `src/actions/auth.action.ts`)
- Auth Service → Server HTTP Client: calls (evidence: `src/services/auth.service.ts`)
- Server HTTP Client → Express API: sends requests (evidence: `src/lib/http/httpServer.ts`)
- Server HTTP Client → Session and Tokens: refreshes tokens (evidence: `src/lib/http/httpServer.ts`)
- User → Role Dashboards: opens role view (evidence: `README.md`)
- Role Dashboards → Role Profiles: shows profile
- Role Dashboards → Employee Management: manages employees
- Role Dashboards → Organization Setup: manages departments
- Role Dashboards → Attendance: manages attendance
- Role Dashboards → Leave Management: handles leave
- Role Dashboards → Payroll: processes payroll
- Role Dashboards → Platform Administration: routes by role (evidence: `README.md`)
- Platform Administration → Subscription Plans: manages plans
- Employee Management → Domain Actions: submits changes
- Organization Setup → Domain Actions: submits changes
- Attendance → Domain Actions: submits records
- Leave Management → Domain Actions: submits requests
- Payroll → Domain Actions: submits payroll
- Domain Actions → Domain Services: delegates (evidence: `src/actions/auth.action.ts`)
- Domain Services → Server HTTP Client: calls API (evidence: `src/services/auth.service.ts`)
