# karthick-code/zenora architecture

> Architecture diagram of the GitHub repository karthick-code/zenora, 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/karthick-code/zenora
- Repository: https://github.com/karthick-code/zenora

## Overview

Zenora is a browser-based, multi-tenant workforce-management platform built with React and Firebase, with no application server or Cloud Functions. Users sign in or register, enter role-appropriate workspaces, and use workforce, HR, payroll, and operations features backed by the frontend data service. Platform owners have a separate administration workspace. The README documents Firestore-backed company registration and Firebase Authentication password resets. Some page implementations were not sampled; their inclusion and routing are supported by the source index and App excerpt, while unsampled data flows are not inferred.

Main entry points: [`frontend/src/services/api.js`](https://github.com/karthick-code/zenora/blob/main/frontend/src/services/api.js) (Firestore data service), [`frontend/src/App.jsx`](https://github.com/karthick-code/zenora/blob/main/frontend/src/App.jsx) (Router and access), [`frontend/src/context/AuthContext.jsx`](https://github.com/karthick-code/zenora/blob/main/frontend/src/context/AuthContext.jsx) (Session and identity), [`frontend/src/services/firebase.js`](https://github.com/karthick-code/zenora/blob/main/frontend/src/services/firebase.js) (Firebase client setup)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_app["Application and identity"]
  node_app["Router and access<br/>[App.jsx]"]
  node_authpage["Sign-in and registration<br/>[AuthPage.jsx]"]
  node_authctx["Session and identity<br/>[AuthContext.jsx]"]
  node_reset["Password reset"]
  node_layout["Workspace navigation"]
end

subgraph group_workforce["Workforce management"]
  node_employees["Employee records<br/>[EmployeesPage.jsx]"]
  node_attendance["Attendance<br/>[AttendancePage.jsx]"]
  node_biometric["Biometric devices<br/>[BiometricPage.jsx]"]
  node_leaves["Leave management<br/>[LeavesPage.jsx]"]
  node_approvals["Approvals<br/>[ApprovalsPage.jsx]"]
  node_payroll["Payroll<br/>[PayrollPage.jsx]"]
  node_expenses["Expenses<br/>[ExpensesPage.jsx]"]
  node_documents["Documents and assets"]
  node_dashboard["Workforce overview<br/>[DashboardPage.jsx]"]
end

subgraph group_peopleops["People operations"]
  node_operations["Operations and helpdesk<br/>[OperationsPage.jsx]"]
  node_reports["Reports<br/>[ReportsPage.jsx]"]
  node_audit["Audit logs<br/>[AuditLogsPage.jsx]"]
  node_settings["Organization settings<br/>[SettingsPage.jsx]"]
end

subgraph group_platform["Platform administration"]
  node_platform["Platform console"]
  node_masterdash["Master admin dashboard"]
  node_masterlogin["Master admin login"]
end

subgraph group_data["Firebase data services"]
  node_api["Firestore data service<br/>[api.js]"]
  node_firebase["Firebase client setup<br/>[firebase.js]"]
  node_firestore[("Cloud Firestore")]
  node_firebaseauth["Firebase Authentication"]
  node_storage["Firebase Storage"]
end

node_user(("Workforce user"))

node_user -->|"opens"| node_app
node_app -->|"provides session"| node_authctx
node_app -->|"routes to"| node_authpage
node_app -->|"routes through"| node_layout
node_app -->|"routes to"| node_employees
node_app -->|"routes to"| node_attendance
node_app -->|"routes to"| node_leaves
node_app -->|"routes to"| node_approvals
node_app -->|"routes to"| node_payroll
node_app -->|"routes to"| node_expenses
node_app -->|"routes to"| node_documents
node_app -->|"routes to"| node_operations
node_app -->|"routes to"| node_reports
node_app -->|"routes to"| node_audit
node_app -->|"routes to"| node_settings
node_app -->|"routes to"| node_platform
node_app -->|"routes to"| node_biometric
node_authpage -->|"submits credentials"| node_authctx
node_authctx -->|"authenticates"| node_firebaseauth
node_authctx -->|"loads profile"| node_api
node_reset -->|"requests reset"| node_api
node_layout -->|"reads session"| node_authctx
node_layout -->|"loads notifications"| node_api
node_employees -->|"reads and writes"| node_api
node_attendance -->|"uses data service"| node_api
node_biometric -->|"uses data service"| node_api
node_leaves -->|"uses data service"| node_api
node_approvals -->|"uses data service"| node_api
node_payroll -->|"loads and processes"| node_api
node_expenses -->|"uses data service"| node_api
node_documents -->|"uses data service"| node_api
node_dashboard -->|"uses data service"| node_api
node_operations -->|"loads and updates"| node_api
node_reports -->|"uses data service"| node_api
node_audit -->|"uses data service"| node_api
node_settings -->|"uses data service"| node_api
node_platform -->|"loads platform data"| node_api
node_masterdash -->|"opens console"| node_platform
node_masterlogin -->|"uses session"| node_authctx
node_api -->|"uses client"| node_firebase
node_firebase -->|"initializes"| node_firestore
node_firebase -->|"initializes"| node_firebaseauth
node_firebase -->|"initializes"| node_storage
node_api -->|"reads and writes"| node_firestore
node_api -->|"sends reset email"| node_firebaseauth
node_api -.->|"may upload files"| node_storage

click node_app "https://github.com/karthick-code/zenora/blob/main/frontend/src/App.jsx"
click node_authpage "https://github.com/karthick-code/zenora/blob/main/frontend/src/pages/AuthPage.jsx"
click node_authctx "https://github.com/karthick-code/zenora/blob/main/frontend/src/context/AuthContext.jsx"
click node_reset "https://github.com/karthick-code/zenora/blob/main/frontend/src/pages/ResetPasswordPage.jsx"
click node_layout "https://github.com/karthick-code/zenora/blob/main/frontend/src/layouts/DashboardLayout.jsx"
click node_employees "https://github.com/karthick-code/zenora/blob/main/frontend/src/pages/EmployeesPage.jsx"
click node_attendance "https://github.com/karthick-code/zenora/blob/main/frontend/src/pages/AttendancePage.jsx"
click node_biometric "https://github.com/karthick-code/zenora/blob/main/frontend/src/pages/BiometricPage.jsx"
click node_leaves "https://github.com/karthick-code/zenora/blob/main/frontend/src/pages/LeavesPage.jsx"
click node_approvals "https://github.com/karthick-code/zenora/blob/main/frontend/src/pages/ApprovalsPage.jsx"
click node_payroll "https://github.com/karthick-code/zenora/blob/main/frontend/src/pages/PayrollPage.jsx"
click node_expenses "https://github.com/karthick-code/zenora/blob/main/frontend/src/pages/ExpensesPage.jsx"
click node_documents "https://github.com/karthick-code/zenora/blob/main/frontend/src/pages/DocumentsAssetsPage.jsx"
click node_dashboard "https://github.com/karthick-code/zenora/blob/main/frontend/src/pages/DashboardPage.jsx"
click node_operations "https://github.com/karthick-code/zenora/blob/main/frontend/src/pages/OperationsPage.jsx"
click node_reports "https://github.com/karthick-code/zenora/blob/main/frontend/src/pages/ReportsPage.jsx"
click node_audit "https://github.com/karthick-code/zenora/blob/main/frontend/src/pages/AuditLogsPage.jsx"
click node_settings "https://github.com/karthick-code/zenora/blob/main/frontend/src/pages/SettingsPage.jsx"
click node_platform "https://github.com/karthick-code/zenora/blob/main/frontend/src/pages/PlatformAdminPage.jsx"
click node_masterdash "https://github.com/karthick-code/zenora/blob/main/frontend/src/pages/MasterAdminDashboardPage.jsx"
click node_masterlogin "https://github.com/karthick-code/zenora/blob/main/frontend/src/pages/MasterAdminLoginPage.jsx"
click node_api "https://github.com/karthick-code/zenora/blob/main/frontend/src/services/api.js"
click node_firebase "https://github.com/karthick-code/zenora/blob/main/frontend/src/services/firebase.js"

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_authpage,node_authctx,node_reset,node_layout,node_user toneBlue
class node_employees,node_attendance,node_biometric,node_leaves,node_approvals,node_payroll,node_expenses,node_documents,node_dashboard toneAmber
class node_operations,node_reports,node_audit,node_settings toneMint
class node_platform,node_masterdash,node_masterlogin toneRose
class node_api,node_firebase,node_firestore,node_firebaseauth,node_storage toneIndigo
```

## Components

### Application and identity

- [Router and access](https://github.com/karthick-code/zenora/blob/main/frontend/src/App.jsx): `frontend/src/App.jsx`
- [Sign-in and registration](https://github.com/karthick-code/zenora/blob/main/frontend/src/pages/AuthPage.jsx): `frontend/src/pages/AuthPage.jsx`
- [Session and identity](https://github.com/karthick-code/zenora/blob/main/frontend/src/context/AuthContext.jsx): `frontend/src/context/AuthContext.jsx`
- [Password reset](https://github.com/karthick-code/zenora/blob/main/frontend/src/pages/ResetPasswordPage.jsx): `frontend/src/pages/ResetPasswordPage.jsx`
- [Workspace navigation](https://github.com/karthick-code/zenora/blob/main/frontend/src/layouts/DashboardLayout.jsx): `frontend/src/layouts/DashboardLayout.jsx`

### Workforce management

- [Employee records](https://github.com/karthick-code/zenora/blob/main/frontend/src/pages/EmployeesPage.jsx): `frontend/src/pages/EmployeesPage.jsx`
- [Attendance](https://github.com/karthick-code/zenora/blob/main/frontend/src/pages/AttendancePage.jsx): `frontend/src/pages/AttendancePage.jsx`
- [Biometric devices](https://github.com/karthick-code/zenora/blob/main/frontend/src/pages/BiometricPage.jsx): `frontend/src/pages/BiometricPage.jsx`
- [Leave management](https://github.com/karthick-code/zenora/blob/main/frontend/src/pages/LeavesPage.jsx): `frontend/src/pages/LeavesPage.jsx`
- [Approvals](https://github.com/karthick-code/zenora/blob/main/frontend/src/pages/ApprovalsPage.jsx): `frontend/src/pages/ApprovalsPage.jsx`
- [Payroll](https://github.com/karthick-code/zenora/blob/main/frontend/src/pages/PayrollPage.jsx): `frontend/src/pages/PayrollPage.jsx`
- [Expenses](https://github.com/karthick-code/zenora/blob/main/frontend/src/pages/ExpensesPage.jsx): `frontend/src/pages/ExpensesPage.jsx`
- [Documents and assets](https://github.com/karthick-code/zenora/blob/main/frontend/src/pages/DocumentsAssetsPage.jsx): `frontend/src/pages/DocumentsAssetsPage.jsx`
- [Workforce overview](https://github.com/karthick-code/zenora/blob/main/frontend/src/pages/DashboardPage.jsx): `frontend/src/pages/DashboardPage.jsx`

### People operations

- [Operations and helpdesk](https://github.com/karthick-code/zenora/blob/main/frontend/src/pages/OperationsPage.jsx): `frontend/src/pages/OperationsPage.jsx`
- [Reports](https://github.com/karthick-code/zenora/blob/main/frontend/src/pages/ReportsPage.jsx): `frontend/src/pages/ReportsPage.jsx`
- [Audit logs](https://github.com/karthick-code/zenora/blob/main/frontend/src/pages/AuditLogsPage.jsx): `frontend/src/pages/AuditLogsPage.jsx`
- [Organization settings](https://github.com/karthick-code/zenora/blob/main/frontend/src/pages/SettingsPage.jsx): `frontend/src/pages/SettingsPage.jsx`

### Platform administration

- [Platform console](https://github.com/karthick-code/zenora/blob/main/frontend/src/pages/PlatformAdminPage.jsx): `frontend/src/pages/PlatformAdminPage.jsx`
- [Master admin dashboard](https://github.com/karthick-code/zenora/blob/main/frontend/src/pages/MasterAdminDashboardPage.jsx): `frontend/src/pages/MasterAdminDashboardPage.jsx`
- [Master admin login](https://github.com/karthick-code/zenora/blob/main/frontend/src/pages/MasterAdminLoginPage.jsx): `frontend/src/pages/MasterAdminLoginPage.jsx`

### Firebase data services

- [Firestore data service](https://github.com/karthick-code/zenora/blob/main/frontend/src/services/api.js): `frontend/src/services/api.js`
- [Firebase client setup](https://github.com/karthick-code/zenora/blob/main/frontend/src/services/firebase.js): `frontend/src/services/firebase.js`
- **Cloud Firestore**
- **Firebase Authentication**
- **Firebase Storage**

### Other components

- **Workforce user**

## Connections

- Workforce user → Router and access: opens
- Router and access → Session and identity: provides session (evidence: `frontend/src/App.jsx`)
- Router and access → Sign-in and registration: routes to (evidence: `frontend/src/App.jsx`)
- Router and access → Workspace navigation: routes through (evidence: `frontend/src/App.jsx`)
- Router and access → Employee records: routes to (evidence: `frontend/src/App.jsx`)
- Router and access → Attendance: routes to (evidence: `frontend/src/App.jsx`)
- Router and access → Leave management: routes to (evidence: `frontend/src/App.jsx`)
- Router and access → Approvals: routes to (evidence: `frontend/src/App.jsx`)
- Router and access → Payroll: routes to (evidence: `frontend/src/App.jsx`)
- Router and access → Expenses: routes to (evidence: `frontend/src/App.jsx`)
- Router and access → Documents and assets: routes to (evidence: `frontend/src/App.jsx`)
- Router and access → Operations and helpdesk: routes to (evidence: `frontend/src/App.jsx`)
- Router and access → Reports: routes to (evidence: `frontend/src/App.jsx`)
- Router and access → Audit logs: routes to (evidence: `frontend/src/App.jsx`)
- Router and access → Organization settings: routes to (evidence: `frontend/src/App.jsx`)
- Router and access → Platform console: routes to (evidence: `frontend/src/App.jsx`)
- Router and access → Biometric devices: routes to (evidence: `frontend/src/App.jsx`)
- Sign-in and registration → Session and identity: submits credentials (evidence: `frontend/src/pages/AuthPage.jsx`)
- Session and identity → Firebase Authentication: authenticates (evidence: `frontend/src/context/AuthContext.jsx`)
- Session and identity → Firestore data service: loads profile (evidence: `frontend/src/context/AuthContext.jsx`)
- Password reset → Firestore data service: requests reset (evidence: `README.md`)
- Workspace navigation → Session and identity: reads session (evidence: `frontend/src/layouts/DashboardLayout.jsx`)
- Workspace navigation → Firestore data service: loads notifications (evidence: `frontend/src/layouts/DashboardLayout.jsx`)
- Employee records → Firestore data service: reads and writes (evidence: `frontend/src/pages/EmployeesPage.jsx`)
- Attendance → Firestore data service: uses data service (evidence: `frontend/src/pages/AttendancePage.jsx`)
- Biometric devices → Firestore data service: uses data service (evidence: `frontend/src/pages/BiometricPage.jsx`)
- Leave management → Firestore data service: uses data service (evidence: `frontend/src/pages/LeavesPage.jsx`)
- Approvals → Firestore data service: uses data service (evidence: `frontend/src/pages/ApprovalsPage.jsx`)
- Payroll → Firestore data service: loads and processes (evidence: `frontend/src/pages/PayrollPage.jsx`)
- Expenses → Firestore data service: uses data service (evidence: `frontend/src/pages/ExpensesPage.jsx`)
- Documents and assets → Firestore data service: uses data service (evidence: `frontend/src/pages/DocumentsAssetsPage.jsx`)
- Workforce overview → Firestore data service: uses data service (evidence: `frontend/src/pages/DashboardPage.jsx`)
- Operations and helpdesk → Firestore data service: loads and updates (evidence: `frontend/src/pages/OperationsPage.jsx`)
- Reports → Firestore data service: uses data service (evidence: `frontend/src/pages/ReportsPage.jsx`)
- Audit logs → Firestore data service: uses data service (evidence: `frontend/src/pages/AuditLogsPage.jsx`)
- Organization settings → Firestore data service: uses data service (evidence: `frontend/src/pages/SettingsPage.jsx`)
- Platform console → Firestore data service: loads platform data (evidence: `frontend/src/pages/PlatformAdminPage.jsx`)
- Master admin dashboard → Platform console: opens console (evidence: `frontend/src/pages/MasterAdminDashboardPage.jsx`)
- Master admin login → Session and identity: uses session (evidence: `frontend/src/pages/MasterAdminLoginPage.jsx`)
- Firestore data service → Firebase client setup: uses client (evidence: `frontend/src/services/api.js`)
- Firebase client setup → Cloud Firestore: initializes (evidence: `frontend/src/services/firebase.js`)
- Firebase client setup → Firebase Authentication: initializes (evidence: `frontend/src/services/firebase.js`)
- Firebase client setup → Firebase Storage: initializes (evidence: `frontend/src/services/firebase.js`)
- Firestore data service → Cloud Firestore: reads and writes (evidence: `frontend/src/services/api.js`)
- Firestore data service → Firebase Authentication: sends reset email (evidence: `frontend/src/services/api.js`)
- Firestore data service → Firebase Storage: may upload files (evidence: `README.md`)
