# mrvatsan/kite_exam architecture

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

- Interactive diagram: https://gitdiagram.com/mrvatsan/kite_exam
- Repository: https://github.com/mrvatsan/kite_exam

## Overview

KGiSL Exam Portal supports administrator management of seating datasets and faculty allocations, faculty duty workflows, and student exam information. The principal workflow is admin upload and activation of a seating plan, followed by faculty allocation and confirmation, faculty access to assigned halls, and student access to seating or hall-ticket information. The graph separates the Next.js role interfaces and API client from Django exam and faculty services and their persistent records. Source excerpts establish several calls; unsampled pages and backend routes limit finer-grained mapping.

Main entry points: [`KGiSL-Exam-Portal/frontend/src/app/api.ts`](https://github.com/mrvatsan/kite_exam/blob/main/KGiSL-Exam-Portal/frontend/src/app/api.ts) (HTTP API client), [`KGiSL-Exam-Portal/frontend/src/components/LoginClient.tsx`](https://github.com/mrvatsan/kite_exam/blob/main/KGiSL-Exam-Portal/frontend/src/components/LoginClient.tsx) (Role login), [`KGiSL-Exam-Portal/backend/apps/exams/views.py`](https://github.com/mrvatsan/kite_exam/blob/main/KGiSL-Exam-Portal/backend/apps/exams/views.py) (Exam API views), [`KGiSL-Exam-Portal/backend/apps/faculty/views.py`](https://github.com/mrvatsan/kite_exam/blob/main/KGiSL-Exam-Portal/backend/apps/faculty/views.py) (Faculty API views)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_web["Role-based web portal"]
  node_login["Role login<br/>[LoginClient.tsx]"]
  node_admin_dashboard["Dataset dashboard<br/>[page.tsx]"]
  node_admin_alloc["Allocation controls<br/>[page.tsx]"]
  node_admin_requests["Faculty requests<br/>[page.tsx]"]
  node_faculty_avail["Availability<br/>[page.tsx]"]
  node_faculty_seating["Faculty seating<br/>[page.tsx]"]
  node_faculty_history["Duty history<br/>[page.tsx]"]
  node_student_dashboard["Student dashboard<br/>[page.tsx]"]
  node_student_seating["Hall seating<br/>[page.tsx]"]
  node_student_ticket["Hall ticket<br/>[page.tsx]"]
  node_api_client["HTTP API client<br/>[api.ts]"]
end

subgraph group_exam["Exam and seating"]
  node_exam_views["Exam API views<br/>[views.py]"]
  node_excel_parser["Seating parser<br/>[utils.py]"]
end

subgraph group_faculty["Faculty operations"]
  node_faculty_views["Faculty API views<br/>[views.py]"]
  node_allocation_logic["Allocation logic<br/>[utils.py]"]
end

subgraph group_data["Persistent records"]
  node_exam_records[("Datasets and exams<br/>[models.py]")]
  node_faculty_records[("Faculty and duties<br/>[models.py]")]
end

node_admin(("Admin user"))
node_faculty_user(("Faculty user"))
node_student_user(("Student user"))

node_admin -->|"signs in"| node_login
node_faculty_user -->|"signs in"| node_login
node_student_user -->|"signs in"| node_login
node_login -->|"calls login"| node_api_client
node_admin -->|"manages seating"| node_admin_dashboard
node_admin -->|"manages allocation"| node_admin_alloc
node_admin -->|"reviews requests"| node_admin_requests
node_faculty_user -->|"sets availability"| node_faculty_avail
node_faculty_user -->|"views assignments"| node_faculty_seating
node_faculty_user -->|"views duties"| node_faculty_history
node_student_user -->|"views status"| node_student_dashboard
node_student_user -->|"views seating"| node_student_seating
node_student_user -->|"views ticket"| node_student_ticket
node_admin_dashboard -->|"uploads and manages"| node_api_client
node_admin_alloc -->|"requests allocation"| node_api_client
node_admin_requests -->|"reviews requests"| node_api_client
node_faculty_avail -->|"updates availability"| node_api_client
node_faculty_seating -->|"fetches assignments"| node_api_client
node_faculty_history -->|"fetches history"| node_api_client
node_student_ticket -->|"fetches ticket"| node_api_client
node_api_client -->|"calls exam endpoints"| node_exam_views
node_api_client -->|"calls faculty endpoints"| node_faculty_views
node_exam_views -->|"parses upload"| node_excel_parser
node_exam_views -->|"creates exam records"| node_exam_records
node_faculty_views -->|"uses allocation helpers"| node_allocation_logic
node_faculty_views -->|"reads and writes duties"| node_faculty_records
node_allocation_logic -->|"updates allocations"| node_faculty_records
node_allocation_logic -->|"reads seating data"| node_exam_records

click node_login "https://github.com/mrvatsan/kite_exam/blob/main/KGiSL-Exam-Portal/frontend/src/components/LoginClient.tsx"
click node_admin_dashboard "https://github.com/mrvatsan/kite_exam/blob/main/KGiSL-Exam-Portal/frontend/src/app/admin/dashboard/page.tsx"
click node_admin_alloc "https://github.com/mrvatsan/kite_exam/blob/main/KGiSL-Exam-Portal/frontend/src/app/admin/faculty-allocation/page.tsx"
click node_admin_requests "https://github.com/mrvatsan/kite_exam/blob/main/KGiSL-Exam-Portal/frontend/src/app/admin/faculty-requests/page.tsx"
click node_faculty_avail "https://github.com/mrvatsan/kite_exam/blob/main/KGiSL-Exam-Portal/frontend/src/app/faculty/availability/page.tsx"
click node_faculty_seating "https://github.com/mrvatsan/kite_exam/blob/main/KGiSL-Exam-Portal/frontend/src/app/faculty/seating/page.tsx"
click node_faculty_history "https://github.com/mrvatsan/kite_exam/blob/main/KGiSL-Exam-Portal/frontend/src/app/faculty/history/page.tsx"
click node_student_dashboard "https://github.com/mrvatsan/kite_exam/blob/main/KGiSL-Exam-Portal/frontend/src/app/student/dashboard/page.tsx"
click node_student_seating "https://github.com/mrvatsan/kite_exam/blob/main/KGiSL-Exam-Portal/frontend/src/app/student/hall-seating/page.tsx"
click node_student_ticket "https://github.com/mrvatsan/kite_exam/blob/main/KGiSL-Exam-Portal/frontend/src/app/student/hall-ticket/page.tsx"
click node_api_client "https://github.com/mrvatsan/kite_exam/blob/main/KGiSL-Exam-Portal/frontend/src/app/api.ts"
click node_exam_views "https://github.com/mrvatsan/kite_exam/blob/main/KGiSL-Exam-Portal/backend/apps/exams/views.py"
click node_excel_parser "https://github.com/mrvatsan/kite_exam/blob/main/KGiSL-Exam-Portal/backend/apps/exams/utils.py"
click node_faculty_views "https://github.com/mrvatsan/kite_exam/blob/main/KGiSL-Exam-Portal/backend/apps/faculty/views.py"
click node_allocation_logic "https://github.com/mrvatsan/kite_exam/blob/main/KGiSL-Exam-Portal/backend/apps/faculty/utils.py"
click node_exam_records "https://github.com/mrvatsan/kite_exam/blob/main/KGiSL-Exam-Portal/backend/apps/exams/models.py"
click node_faculty_records "https://github.com/mrvatsan/kite_exam/blob/main/KGiSL-Exam-Portal/backend/apps/faculty/models.py"

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_login,node_admin_dashboard,node_admin_alloc,node_admin_requests,node_faculty_avail,node_faculty_seating,node_faculty_history,node_student_dashboard,node_student_seating,node_student_ticket,node_api_client,node_admin,node_faculty_user,node_student_user toneBlue
class node_exam_views,node_excel_parser toneAmber
class node_faculty_views,node_allocation_logic toneMint
class node_exam_records,node_faculty_records toneRose
```

## Components

### Role-based web portal

- [Role login](https://github.com/mrvatsan/kite_exam/blob/main/KGiSL-Exam-Portal/frontend/src/components/LoginClient.tsx): `KGiSL-Exam-Portal/frontend/src/components/LoginClient.tsx`
- [Dataset dashboard](https://github.com/mrvatsan/kite_exam/blob/main/KGiSL-Exam-Portal/frontend/src/app/admin/dashboard/page.tsx): `KGiSL-Exam-Portal/frontend/src/app/admin/dashboard/page.tsx`
- [Allocation controls](https://github.com/mrvatsan/kite_exam/blob/main/KGiSL-Exam-Portal/frontend/src/app/admin/faculty-allocation/page.tsx): `KGiSL-Exam-Portal/frontend/src/app/admin/faculty-allocation/page.tsx`
- [Faculty requests](https://github.com/mrvatsan/kite_exam/blob/main/KGiSL-Exam-Portal/frontend/src/app/admin/faculty-requests/page.tsx): `KGiSL-Exam-Portal/frontend/src/app/admin/faculty-requests/page.tsx`
- [Availability](https://github.com/mrvatsan/kite_exam/blob/main/KGiSL-Exam-Portal/frontend/src/app/faculty/availability/page.tsx): `KGiSL-Exam-Portal/frontend/src/app/faculty/availability/page.tsx`
- [Faculty seating](https://github.com/mrvatsan/kite_exam/blob/main/KGiSL-Exam-Portal/frontend/src/app/faculty/seating/page.tsx): `KGiSL-Exam-Portal/frontend/src/app/faculty/seating/page.tsx`
- [Duty history](https://github.com/mrvatsan/kite_exam/blob/main/KGiSL-Exam-Portal/frontend/src/app/faculty/history/page.tsx): `KGiSL-Exam-Portal/frontend/src/app/faculty/history/page.tsx`
- [Student dashboard](https://github.com/mrvatsan/kite_exam/blob/main/KGiSL-Exam-Portal/frontend/src/app/student/dashboard/page.tsx): `KGiSL-Exam-Portal/frontend/src/app/student/dashboard/page.tsx`
- [Hall seating](https://github.com/mrvatsan/kite_exam/blob/main/KGiSL-Exam-Portal/frontend/src/app/student/hall-seating/page.tsx): `KGiSL-Exam-Portal/frontend/src/app/student/hall-seating/page.tsx`
- [Hall ticket](https://github.com/mrvatsan/kite_exam/blob/main/KGiSL-Exam-Portal/frontend/src/app/student/hall-ticket/page.tsx): `KGiSL-Exam-Portal/frontend/src/app/student/hall-ticket/page.tsx`
- [HTTP API client](https://github.com/mrvatsan/kite_exam/blob/main/KGiSL-Exam-Portal/frontend/src/app/api.ts): `KGiSL-Exam-Portal/frontend/src/app/api.ts`

### Exam and seating

- [Exam API views](https://github.com/mrvatsan/kite_exam/blob/main/KGiSL-Exam-Portal/backend/apps/exams/views.py): `KGiSL-Exam-Portal/backend/apps/exams/views.py`
- [Seating parser](https://github.com/mrvatsan/kite_exam/blob/main/KGiSL-Exam-Portal/backend/apps/exams/utils.py): `KGiSL-Exam-Portal/backend/apps/exams/utils.py`

### Faculty operations

- [Faculty API views](https://github.com/mrvatsan/kite_exam/blob/main/KGiSL-Exam-Portal/backend/apps/faculty/views.py): `KGiSL-Exam-Portal/backend/apps/faculty/views.py`
- [Allocation logic](https://github.com/mrvatsan/kite_exam/blob/main/KGiSL-Exam-Portal/backend/apps/faculty/utils.py): `KGiSL-Exam-Portal/backend/apps/faculty/utils.py`

### Persistent records

- [Datasets and exams](https://github.com/mrvatsan/kite_exam/blob/main/KGiSL-Exam-Portal/backend/apps/exams/models.py): `KGiSL-Exam-Portal/backend/apps/exams/models.py`
- [Faculty and duties](https://github.com/mrvatsan/kite_exam/blob/main/KGiSL-Exam-Portal/backend/apps/faculty/models.py): `KGiSL-Exam-Portal/backend/apps/faculty/models.py`

### Other components

- **Admin user**
- **Faculty user**
- **Student user**

## Connections

- Admin user → Role login: signs in (evidence: `KGiSL-Exam-Portal/frontend/src/components/LoginClient.tsx`)
- Faculty user → Role login: signs in (evidence: `KGiSL-Exam-Portal/frontend/src/components/LoginClient.tsx`)
- Student user → Role login: signs in (evidence: `KGiSL-Exam-Portal/frontend/src/components/LoginClient.tsx`)
- Role login → HTTP API client: calls login (evidence: `KGiSL-Exam-Portal/frontend/src/components/LoginClient.tsx`)
- Admin user → Dataset dashboard: manages seating
- Admin user → Allocation controls: manages allocation
- Admin user → Faculty requests: reviews requests
- Faculty user → Availability: sets availability
- Faculty user → Faculty seating: views assignments (evidence: `KGiSL-Exam-Portal/frontend/src/app/faculty/seating/page.tsx`)
- Faculty user → Duty history: views duties
- Student user → Student dashboard: views status
- Student user → Hall seating: views seating
- Student user → Hall ticket: views ticket
- Dataset dashboard → HTTP API client: uploads and manages (evidence: `KGiSL-Exam-Portal/frontend/src/app/admin/dashboard/page.tsx`)
- Allocation controls → HTTP API client: requests allocation (evidence: `KGiSL-Exam-Portal/frontend/src/app/admin/faculty-allocation/page.tsx`)
- Faculty requests → HTTP API client: reviews requests (evidence: `KGiSL-Exam-Portal/frontend/src/app/admin/faculty-requests/page.tsx`)
- Availability → HTTP API client: updates availability (evidence: `KGiSL-Exam-Portal/frontend/src/app/faculty/availability/page.tsx`)
- Faculty seating → HTTP API client: fetches assignments (evidence: `KGiSL-Exam-Portal/frontend/src/app/faculty/seating/page.tsx`)
- Duty history → HTTP API client: fetches history (evidence: `KGiSL-Exam-Portal/frontend/src/app/faculty/history/page.tsx`)
- Hall ticket → HTTP API client: fetches ticket (evidence: `KGiSL-Exam-Portal/frontend/src/app/student/hall-ticket/page.tsx`)
- HTTP API client → Exam API views: calls exam endpoints
- HTTP API client → Faculty API views: calls faculty endpoints
- Exam API views → Seating parser: parses upload (evidence: `KGiSL-Exam-Portal/backend/apps/exams/views.py`)
- Exam API views → Datasets and exams: creates exam records (evidence: `KGiSL-Exam-Portal/backend/apps/exams/views.py`)
- Faculty API views → Allocation logic: uses allocation helpers (evidence: `KGiSL-Exam-Portal/backend/apps/faculty/views.py`)
- Faculty API views → Faculty and duties: reads and writes duties (evidence: `KGiSL-Exam-Portal/backend/apps/faculty/views.py`)
- Allocation logic → Faculty and duties: updates allocations (evidence: `KGiSL-Exam-Portal/backend/apps/faculty/utils.py`)
- Allocation logic → Datasets and exams: reads seating data (evidence: `KGiSL-Exam-Portal/backend/apps/faculty/utils.py`)
