# xxsoloxxleveling-sketch/azmnew architecture

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

- Interactive diagram: https://gitdiagram.com/xxsoloxxleveling-sketch/azmnew
- Repository: https://github.com/xxsoloxxleveling-sketch/azmnew

## Overview

AZMNEW is a scholarship registration and examination administration portal. The principal workflow runs from candidate registration through student records and roll-slip retrieval, then exam-hall allocation and QR/manual attendance; administrators also reconcile fees and manage institutional and operational records. The frontend routes public and admin views, while its API client communicates with an Express backend whose domain services use shared persistence. README capabilities include PDF slips/challans, partner and test-center coordination, dashboard reporting, and an interactive globe. Several feature modules are represented by their exact enclosing directories because their source was not sampled.

Main entry points: [`src/components/admin`](https://github.com/xxsoloxxleveling-sketch/azmnew/tree/main/src/components/admin) (Admin workspace), [`backend/src/modules`](https://github.com/xxsoloxxleveling-sketch/azmnew/tree/main/backend/src/modules) (HTTP controllers), [`backend/src/modules/exam-halls/examHalls.service.ts`](https://github.com/xxsoloxxleveling-sketch/azmnew/blob/main/backend/src/modules/exam-halls/examHalls.service.ts) (Exam-hall allocation), [`backend/src/lib/prisma.ts`](https://github.com/xxsoloxxleveling-sketch/azmnew/blob/main/backend/src/lib/prisma.ts) (Prisma persistence)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_web["Portal experience"]
  node_app["Portal router<br/>[App.tsx]"]
  node_registration["Candidate registration"]
  node_public["Public portal features"]
  node_adminui["Admin workspace"]
  node_globe["Institutional globe<br/>[globe.tsx]"]
end

subgraph group_exam["Registration and exams"]
  node_students["Student records"]
  node_slips["Slip and challan PDFs<br/>[pdf.service.ts]"]
  node_halls["Exam-hall allocation"]
  node_attendance["QR and manual attendance"]
  node_qr["QR token service<br/>[qr.service.ts]"]
  node_results["Results"]
end

subgraph group_operations["Administration"]
  node_fees["Fee tracking"]
  node_partners["Partner coordination"]
  node_centers["Test centers"]
  node_staff["Staff and payroll"]
  node_transactions["Financial ledger"]
  node_otheradmin["Other admin records"]
end

subgraph group_server["Backend services"]
  node_auth["Backend authentication<br/>[auth.service.ts]"]
  node_controllers["HTTP controllers"]
end

subgraph group_shared["Shared infrastructure"]
  node_api["API client<br/>[apiClient.ts]"]
  node_authweb["Frontend authentication<br/>[auth.ts]"]
  node_mockapi["Portal data operations<br/>[mockApi.ts]"]
  node_db[("Prisma persistence<br/>[prisma.ts]")]
  node_storage["Object storage<br/>[r2Storage.ts]"]
end

node_candidate(("Candidate"))
node_admin(("Administrator / invigilator"))

node_candidate -->|"opens portal"| node_app
node_app -->|"routes to"| node_registration
node_app -->|"shows public views"| node_public
node_app -->|"routes admin"| node_adminui
node_candidate -->|"submits application"| node_registration
node_admin -->|"manages portal"| node_adminui
node_public -.->|"presents institutions"| node_globe
node_registration -.->|"uses data operations"| node_mockapi
node_adminui -.->|"uses data operations"| node_mockapi
node_mockapi -->|"calls"| node_api
node_api -->|"reads tokens"| node_authweb
node_api -.->|"sends API requests"| node_controllers
node_controllers -->|"delegates student actions"| node_students
node_controllers -->|"delegates attendance"| node_attendance
node_controllers -->|"delegates hall actions"| node_halls
node_controllers -->|"delegates fee actions"| node_fees
node_controllers -.->|"delegates authentication"| node_auth
node_students -.->|"reads and writes"| node_db
node_halls -->|"queries candidate classes"| node_students
node_halls -->|"allocates in transactions"| node_db
node_attendance -->|"persists attendance"| node_db
node_attendance -->|"uses QR service"| node_qr
node_attendance -->|"checks hall service"| node_halls
node_auth -->|"loads user records"| node_db
node_fees -->|"uses persistence"| node_db
node_fees -->|"uses QR service"| node_qr
node_students -.->|"generates slip PDFs"| node_slips
node_adminui -->|"scans QR / records manually"| node_attendance
node_adminui -->|"reconciles fees"| node_fees
node_adminui -.->|"manages halls"| node_halls
node_adminui -.->|"manages partners"| node_partners
node_adminui -.->|"manages test centers"| node_centers
node_adminui -.->|"manages staff"| node_staff
node_adminui -.->|"manages ledger"| node_transactions
node_adminui -.->|"views results"| node_results
node_adminui -.->|"manages other records"| node_otheradmin
node_admin -.->|"assigns candidates"| node_halls
node_adminui -->|"exports PDFs"| node_slips
node_storage -.->|"stores separately"| node_db

click node_app "https://github.com/xxsoloxxleveling-sketch/azmnew/blob/main/src/App.tsx"
click node_registration "https://github.com/xxsoloxxleveling-sketch/azmnew/blob/main/src/components/public/register/PublicCandidateRegistrationWizard.tsx"
click node_public "https://github.com/xxsoloxxleveling-sketch/azmnew/tree/main/src/components/home"
click node_adminui "https://github.com/xxsoloxxleveling-sketch/azmnew/tree/main/src/components/admin"
click node_globe "https://github.com/xxsoloxxleveling-sketch/azmnew/blob/main/src/components/ui/globe.tsx"
click node_api "https://github.com/xxsoloxxleveling-sketch/azmnew/blob/main/src/lib/apiClient.ts"
click node_authweb "https://github.com/xxsoloxxleveling-sketch/azmnew/blob/main/src/lib/auth.ts"
click node_mockapi "https://github.com/xxsoloxxleveling-sketch/azmnew/blob/main/src/lib/mockApi.ts"
click node_students "https://github.com/xxsoloxxleveling-sketch/azmnew/blob/main/backend/src/modules/students/students.service.ts"
click node_slips "https://github.com/xxsoloxxleveling-sketch/azmnew/blob/main/backend/src/modules/documents/pdf.service.ts"
click node_halls "https://github.com/xxsoloxxleveling-sketch/azmnew/blob/main/backend/src/modules/exam-halls/examHalls.service.ts"
click node_attendance "https://github.com/xxsoloxxleveling-sketch/azmnew/blob/main/backend/src/modules/attendance/attendance.service.ts"
click node_qr "https://github.com/xxsoloxxleveling-sketch/azmnew/blob/main/backend/src/modules/attendance/qr.service.ts"
click node_results "https://github.com/xxsoloxxleveling-sketch/azmnew/tree/main/backend/src/modules/results"
click node_fees "https://github.com/xxsoloxxleveling-sketch/azmnew/tree/main/backend/src/modules/fees"
click node_partners "https://github.com/xxsoloxxleveling-sketch/azmnew/tree/main/backend/src/modules/partners"
click node_centers "https://github.com/xxsoloxxleveling-sketch/azmnew/tree/main/backend/src/modules/test-centers"
click node_staff "https://github.com/xxsoloxxleveling-sketch/azmnew/tree/main/backend/src/modules/staff"
click node_transactions "https://github.com/xxsoloxxleveling-sketch/azmnew/tree/main/backend/src/modules/transactions"
click node_otheradmin "https://github.com/xxsoloxxleveling-sketch/azmnew/tree/main/backend/src/modules"
click node_auth "https://github.com/xxsoloxxleveling-sketch/azmnew/blob/main/backend/src/modules/auth/auth.service.ts"
click node_controllers "https://github.com/xxsoloxxleveling-sketch/azmnew/tree/main/backend/src/modules"
click node_db "https://github.com/xxsoloxxleveling-sketch/azmnew/blob/main/backend/src/lib/prisma.ts"
click node_storage "https://github.com/xxsoloxxleveling-sketch/azmnew/blob/main/backend/src/lib/r2Storage.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_registration,node_public,node_adminui,node_globe toneBlue
class node_students,node_slips,node_halls,node_attendance,node_qr,node_results toneAmber
class node_fees,node_partners,node_centers,node_staff,node_transactions,node_otheradmin toneMint
class node_auth,node_controllers toneRose
class node_api,node_authweb,node_mockapi,node_db,node_storage,node_candidate,node_admin toneIndigo
```

## Components

### Portal experience

- [Portal router](https://github.com/xxsoloxxleveling-sketch/azmnew/blob/main/src/App.tsx): `src/App.tsx`
- [Candidate registration](https://github.com/xxsoloxxleveling-sketch/azmnew/blob/main/src/components/public/register/PublicCandidateRegistrationWizard.tsx): `src/components/public/register/PublicCandidateRegistrationWizard.tsx`
- [Public portal features](https://github.com/xxsoloxxleveling-sketch/azmnew/tree/main/src/components/home): `src/components/home`
- [Admin workspace](https://github.com/xxsoloxxleveling-sketch/azmnew/tree/main/src/components/admin): `src/components/admin`
- [Institutional globe](https://github.com/xxsoloxxleveling-sketch/azmnew/blob/main/src/components/ui/globe.tsx): `src/components/ui/globe.tsx`

### Registration and exams

- [Student records](https://github.com/xxsoloxxleveling-sketch/azmnew/blob/main/backend/src/modules/students/students.service.ts): `backend/src/modules/students/students.service.ts`
- [Slip and challan PDFs](https://github.com/xxsoloxxleveling-sketch/azmnew/blob/main/backend/src/modules/documents/pdf.service.ts): `backend/src/modules/documents/pdf.service.ts`
- [Exam-hall allocation](https://github.com/xxsoloxxleveling-sketch/azmnew/blob/main/backend/src/modules/exam-halls/examHalls.service.ts): `backend/src/modules/exam-halls/examHalls.service.ts`
- [QR and manual attendance](https://github.com/xxsoloxxleveling-sketch/azmnew/blob/main/backend/src/modules/attendance/attendance.service.ts): `backend/src/modules/attendance/attendance.service.ts`
- [QR token service](https://github.com/xxsoloxxleveling-sketch/azmnew/blob/main/backend/src/modules/attendance/qr.service.ts): `backend/src/modules/attendance/qr.service.ts`
- [Results](https://github.com/xxsoloxxleveling-sketch/azmnew/tree/main/backend/src/modules/results): `backend/src/modules/results`

### Administration

- [Fee tracking](https://github.com/xxsoloxxleveling-sketch/azmnew/tree/main/backend/src/modules/fees): `backend/src/modules/fees`
- [Partner coordination](https://github.com/xxsoloxxleveling-sketch/azmnew/tree/main/backend/src/modules/partners): `backend/src/modules/partners`
- [Test centers](https://github.com/xxsoloxxleveling-sketch/azmnew/tree/main/backend/src/modules/test-centers): `backend/src/modules/test-centers`
- [Staff and payroll](https://github.com/xxsoloxxleveling-sketch/azmnew/tree/main/backend/src/modules/staff): `backend/src/modules/staff`
- [Financial ledger](https://github.com/xxsoloxxleveling-sketch/azmnew/tree/main/backend/src/modules/transactions): `backend/src/modules/transactions`
- [Other admin records](https://github.com/xxsoloxxleveling-sketch/azmnew/tree/main/backend/src/modules): `backend/src/modules`

### Backend services

- [Backend authentication](https://github.com/xxsoloxxleveling-sketch/azmnew/blob/main/backend/src/modules/auth/auth.service.ts): `backend/src/modules/auth/auth.service.ts`
- [HTTP controllers](https://github.com/xxsoloxxleveling-sketch/azmnew/tree/main/backend/src/modules): `backend/src/modules`

### Shared infrastructure

- [API client](https://github.com/xxsoloxxleveling-sketch/azmnew/blob/main/src/lib/apiClient.ts): `src/lib/apiClient.ts`
- [Frontend authentication](https://github.com/xxsoloxxleveling-sketch/azmnew/blob/main/src/lib/auth.ts): `src/lib/auth.ts`
- [Portal data operations](https://github.com/xxsoloxxleveling-sketch/azmnew/blob/main/src/lib/mockApi.ts): `src/lib/mockApi.ts`
- [Prisma persistence](https://github.com/xxsoloxxleveling-sketch/azmnew/blob/main/backend/src/lib/prisma.ts): `backend/src/lib/prisma.ts`
- [Object storage](https://github.com/xxsoloxxleveling-sketch/azmnew/blob/main/backend/src/lib/r2Storage.ts): `backend/src/lib/r2Storage.ts`

### Other components

- **Candidate**
- **Administrator / invigilator**

## Connections

- Candidate → Portal router: opens portal (evidence: `README.md`)
- Portal router → Candidate registration: routes to (evidence: `src/App.tsx`)
- Portal router → Public portal features: shows public views (evidence: `src/App.tsx`)
- Portal router → Admin workspace: routes admin (evidence: `src/App.tsx`)
- Candidate → Candidate registration: submits application (evidence: `README.md`)
- Administrator / invigilator → Admin workspace: manages portal (evidence: `README.md`)
- Public portal features → Institutional globe: presents institutions (evidence: `README.md`)
- Candidate registration → Portal data operations: uses data operations
- Admin workspace → Portal data operations: uses data operations (evidence: `src/lib/mockApi.ts`)
- Portal data operations → API client: calls (evidence: `src/lib/mockApi.ts`)
- API client → Frontend authentication: reads tokens (evidence: `src/lib/apiClient.ts`)
- API client → HTTP controllers: sends API requests (evidence: `src/lib/apiClient.ts`)
- HTTP controllers → Student records: delegates student actions (evidence: `backend/src/modules/students/students.controller.ts`)
- HTTP controllers → QR and manual attendance: delegates attendance (evidence: `backend/src/modules/attendance/attendance.controller.ts`)
- HTTP controllers → Exam-hall allocation: delegates hall actions (evidence: `backend/src/modules/exam-halls/examHalls.controller.ts`)
- HTTP controllers → Fee tracking: delegates fee actions (evidence: `backend/src/modules/fees/fees.controller.ts`)
- HTTP controllers → Backend authentication: delegates authentication (evidence: `backend/src/modules/auth/auth.service.ts`)
- Student records → Prisma persistence: reads and writes
- Exam-hall allocation → Student records: queries candidate classes (evidence: `backend/src/modules/exam-halls/examHalls.service.ts`)
- Exam-hall allocation → Prisma persistence: allocates in transactions (evidence: `backend/src/modules/exam-halls/examHalls.service.ts`)
- QR and manual attendance → Prisma persistence: persists attendance (evidence: `backend/src/modules/attendance/attendance.service.ts`)
- QR and manual attendance → QR token service: uses QR service (evidence: `backend/src/modules/attendance/attendance.service.ts`)
- QR and manual attendance → Exam-hall allocation: checks hall service (evidence: `backend/src/modules/attendance/attendance.service.ts`)
- Backend authentication → Prisma persistence: loads user records (evidence: `backend/src/modules/auth/auth.service.ts`)
- Fee tracking → Prisma persistence: uses persistence (evidence: `backend/src/modules/fees/fees.service.ts`)
- Fee tracking → QR token service: uses QR service (evidence: `backend/src/modules/fees/fees.service.ts`)
- Student records → Slip and challan PDFs: generates slip PDFs
- Admin workspace → QR and manual attendance: scans QR / records manually (evidence: `README.md`)
- Admin workspace → Fee tracking: reconciles fees (evidence: `README.md`)
- Admin workspace → Exam-hall allocation: manages halls
- Admin workspace → Partner coordination: manages partners
- Admin workspace → Test centers: manages test centers
- Admin workspace → Staff and payroll: manages staff
- Admin workspace → Financial ledger: manages ledger
- Admin workspace → Results: views results
- Admin workspace → Other admin records: manages other records
- Administrator / invigilator → Exam-hall allocation: assigns candidates (evidence: `README.md`)
- Admin workspace → Slip and challan PDFs: exports PDFs (evidence: `README.md`)
- Object storage → Prisma persistence: stores separately
