# ujjaldas-11/online-exam-system architecture

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

- Interactive diagram: https://gitdiagram.com/ujjaldas-11/online-exam-system
- Repository: https://github.com/ujjaldas-11/online-exam-system

## Overview

Examify is a LAN-focused college examination platform. Its main workflow runs from faculty curriculum and question-bank setup, through exam scheduling and student timed attempts, to automated grading and published results with review. Administration also covers cohorts, faculty, audit and live proctoring; students register, manage profiles and retrieve scorecards. The graph includes security, database and real-time layers, plus documented CSV/XLSX and PDF capabilities. Several portal implementations were not sampled, so links between those features are limited to documented behavior; the database is shown as shared state, not as a guessed schema.

Main entry points: [`admin/admin-dashboard.php`](https://github.com/ujjaldas-11/online-exam-system/blob/main/admin/admin-dashboard.php) (Administration), [`student/exam.php`](https://github.com/ujjaldas-11/online-exam-system/blob/main/student/exam.php) (Exam Session), [`services/ExamEngine.php`](https://github.com/ujjaldas-11/online-exam-system/blob/main/services/ExamEngine.php) (Exam Engine), [`lib/websocket/Server.php`](https://github.com/ujjaldas-11/online-exam-system/blob/main/lib/websocket/Server.php) (WebSocket & IPC)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_portals["User Portals"]
  node_admin_portal["Administration"]
  node_question_bank["Question Bank"]
  node_curriculum_admin["Curriculum Setup"]
  node_exam_admin["Exam Scheduling<br/>[manage-exam.php]"]
  node_cohort_admin["Cohort Management"]
  node_live_proctor["Live Proctoring<br/>[proctor-exam.php]"]
  node_student_access["Student Access<br/>[login.php]"]
  node_student_dashboard["Exam Discovery<br/>[check-exams.php]"]
  node_exam_room["Exam Session<br/>[exam.php]"]
  node_student_results["Results &amp; Review<br/>[review-exam.php]"]
  node_admin_export["PDF Export Route<br/>[export-pdf.php]"]
  node_student_card["Student Scorecard<br/>[download-card.php]"]
end

subgraph group_exam["Exam Domain"]
  node_engine["Exam Engine<br/>[ExamEngine.php]"]
  node_curriculum["Curriculum Service"]
  node_database_config["Database Connection<br/>[database.php]"]
  node_database[("MySQL Database")]
end

subgraph group_integrity["Integrity &amp; Realtime"]
  node_auth["Authentication &amp; RBAC<br/>[auth.php]"]
  node_device_gate["Device &amp; Integrity<br/>[device.php]"]
  node_violation["Violation Logging<br/>[log-violation.php]"]
  node_websocket_entry["Realtime Daemon Entry"]
  node_websocket["WebSocket &amp; IPC<br/>[Server.php]"]
  node_push["Event Push Helper"]
end

subgraph group_outputs["Exports &amp; Results"]
  node_csv["CSV &amp; XLSX Operations<br/>[CsvService.php]"]
  node_pdf["PDF Generation<br/>[PdfService.php]"]
end

node_faculty(("Faculty &amp; Admin"))
node_candidate(("Student Candidate"))

node_faculty -->|"uses"| node_admin_portal
node_admin_portal -->|"manages curriculum"| node_curriculum_admin
node_admin_portal -->|"manages questions"| node_question_bank
node_admin_portal -->|"schedules exams"| node_exam_admin
node_admin_portal -->|"manages cohorts"| node_cohort_admin
node_exam_admin -->|"exam operations"| node_engine
node_curriculum_admin -->|"curriculum access"| node_curriculum
node_question_bank -->|"imports and exports"| node_csv
node_candidate -->|"signs in"| node_student_access
node_student_access -->|"checks identity"| node_auth
node_student_dashboard -->|"starts attempt"| node_exam_room
node_exam_room -->|"checks device"| node_device_gate
node_exam_room -->|"saves answers"| node_engine
node_engine -->|"reads and writes"| node_database
node_curriculum -->|"reads curriculum"| node_database
node_auth -->|"checks sessions and roles"| node_database
node_engine -->|"provides review data"| node_student_results
node_student_results -->|"generates answer sheet"| node_pdf
node_admin_export -->|"generates reports"| node_pdf
node_student_card -->|"generates scorecard"| node_pdf
node_admin_portal -->|"opens monitoring"| node_live_proctor
node_live_proctor -->|"monitors sessions"| node_websocket
node_websocket_entry -->|"starts daemon"| node_websocket
node_push -->|"pushes IPC events"| node_websocket
node_violation -.->|"sends alerts"| node_push
node_exam_room -->|"reports violations"| node_violation
node_websocket -.->|"broadcasts updates"| node_candidate
node_database_config -->|"connects"| node_database

click node_admin_portal "https://github.com/ujjaldas-11/online-exam-system/blob/main/admin/admin-dashboard.php"
click node_question_bank "https://github.com/ujjaldas-11/online-exam-system/blob/main/admin/manage-questions.php"
click node_curriculum_admin "https://github.com/ujjaldas-11/online-exam-system/blob/main/admin/manage-subjects.php"
click node_exam_admin "https://github.com/ujjaldas-11/online-exam-system/blob/main/admin/manage-exam.php"
click node_cohort_admin "https://github.com/ujjaldas-11/online-exam-system/blob/main/admin/manage-students.php"
click node_live_proctor "https://github.com/ujjaldas-11/online-exam-system/blob/main/admin/proctor-exam.php"
click node_student_access "https://github.com/ujjaldas-11/online-exam-system/blob/main/student/login.php"
click node_student_dashboard "https://github.com/ujjaldas-11/online-exam-system/blob/main/student/check-exams.php"
click node_exam_room "https://github.com/ujjaldas-11/online-exam-system/blob/main/student/exam.php"
click node_student_results "https://github.com/ujjaldas-11/online-exam-system/blob/main/student/review-exam.php"
click node_engine "https://github.com/ujjaldas-11/online-exam-system/blob/main/services/ExamEngine.php"
click node_curriculum "https://github.com/ujjaldas-11/online-exam-system/blob/main/services/CurriculumService.php"
click node_auth "https://github.com/ujjaldas-11/online-exam-system/blob/main/utils/auth.php"
click node_device_gate "https://github.com/ujjaldas-11/online-exam-system/blob/main/utils/device.php"
click node_violation "https://github.com/ujjaldas-11/online-exam-system/blob/main/student/log-violation.php"
click node_websocket_entry "https://github.com/ujjaldas-11/online-exam-system/blob/main/bin/websocket-server.php"
click node_websocket "https://github.com/ujjaldas-11/online-exam-system/blob/main/lib/websocket/Server.php"
click node_push "https://github.com/ujjaldas-11/online-exam-system/blob/main/utils/websocket-pusher.php"
click node_database_config "https://github.com/ujjaldas-11/online-exam-system/blob/main/config/database.php"
click node_csv "https://github.com/ujjaldas-11/online-exam-system/blob/main/services/CsvService.php"
click node_pdf "https://github.com/ujjaldas-11/online-exam-system/blob/main/services/PdfService.php"
click node_admin_export "https://github.com/ujjaldas-11/online-exam-system/blob/main/admin/export-pdf.php"
click node_student_card "https://github.com/ujjaldas-11/online-exam-system/blob/main/student/download-card.php"

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_admin_portal,node_question_bank,node_curriculum_admin,node_exam_admin,node_cohort_admin,node_live_proctor,node_student_access,node_student_dashboard,node_exam_room,node_student_results,node_admin_export,node_student_card toneBlue
class node_engine,node_curriculum,node_database_config,node_database toneAmber
class node_auth,node_device_gate,node_violation,node_websocket_entry,node_websocket,node_push toneMint
class node_csv,node_pdf toneRose
class node_faculty,node_candidate toneIndigo
```

## Components

### User Portals

- [Administration](https://github.com/ujjaldas-11/online-exam-system/blob/main/admin/admin-dashboard.php): `admin/admin-dashboard.php`
- [Question Bank](https://github.com/ujjaldas-11/online-exam-system/blob/main/admin/manage-questions.php): `admin/manage-questions.php`
- [Curriculum Setup](https://github.com/ujjaldas-11/online-exam-system/blob/main/admin/manage-subjects.php): `admin/manage-subjects.php`
- [Exam Scheduling](https://github.com/ujjaldas-11/online-exam-system/blob/main/admin/manage-exam.php): `admin/manage-exam.php`
- [Cohort Management](https://github.com/ujjaldas-11/online-exam-system/blob/main/admin/manage-students.php): `admin/manage-students.php`
- [Live Proctoring](https://github.com/ujjaldas-11/online-exam-system/blob/main/admin/proctor-exam.php): `admin/proctor-exam.php`
- [Student Access](https://github.com/ujjaldas-11/online-exam-system/blob/main/student/login.php): `student/login.php`
- [Exam Discovery](https://github.com/ujjaldas-11/online-exam-system/blob/main/student/check-exams.php): `student/check-exams.php`
- [Exam Session](https://github.com/ujjaldas-11/online-exam-system/blob/main/student/exam.php): `student/exam.php`
- [Results & Review](https://github.com/ujjaldas-11/online-exam-system/blob/main/student/review-exam.php): `student/review-exam.php`
- [PDF Export Route](https://github.com/ujjaldas-11/online-exam-system/blob/main/admin/export-pdf.php): `admin/export-pdf.php`
- [Student Scorecard](https://github.com/ujjaldas-11/online-exam-system/blob/main/student/download-card.php): `student/download-card.php`

### Exam Domain

- [Exam Engine](https://github.com/ujjaldas-11/online-exam-system/blob/main/services/ExamEngine.php): `services/ExamEngine.php`
- [Curriculum Service](https://github.com/ujjaldas-11/online-exam-system/blob/main/services/CurriculumService.php): `services/CurriculumService.php`
- [Database Connection](https://github.com/ujjaldas-11/online-exam-system/blob/main/config/database.php): `config/database.php`
- **MySQL Database**

### Integrity & Realtime

- [Authentication & RBAC](https://github.com/ujjaldas-11/online-exam-system/blob/main/utils/auth.php): `utils/auth.php`
- [Device & Integrity](https://github.com/ujjaldas-11/online-exam-system/blob/main/utils/device.php): `utils/device.php`
- [Violation Logging](https://github.com/ujjaldas-11/online-exam-system/blob/main/student/log-violation.php): `student/log-violation.php`
- [Realtime Daemon Entry](https://github.com/ujjaldas-11/online-exam-system/blob/main/bin/websocket-server.php): `bin/websocket-server.php`
- [WebSocket & IPC](https://github.com/ujjaldas-11/online-exam-system/blob/main/lib/websocket/Server.php): `lib/websocket/Server.php`
- [Event Push Helper](https://github.com/ujjaldas-11/online-exam-system/blob/main/utils/websocket-pusher.php): `utils/websocket-pusher.php`

### Exports & Results

- [CSV & XLSX Operations](https://github.com/ujjaldas-11/online-exam-system/blob/main/services/CsvService.php): `services/CsvService.php`
- [PDF Generation](https://github.com/ujjaldas-11/online-exam-system/blob/main/services/PdfService.php): `services/PdfService.php`

### Other components

- **Faculty & Admin**
- **Student Candidate**

## Connections

- Faculty & Admin → Administration: uses
- Administration → Curriculum Setup: manages curriculum
- Administration → Question Bank: manages questions
- Administration → Exam Scheduling: schedules exams
- Administration → Cohort Management: manages cohorts
- Exam Scheduling → Exam Engine: exam operations
- Curriculum Setup → Curriculum Service: curriculum access
- Question Bank → CSV & XLSX Operations: imports and exports
- Student Candidate → Student Access: signs in
- Student Access → Authentication & RBAC: checks identity
- Exam Discovery → Exam Session: starts attempt
- Exam Session → Device & Integrity: checks device
- Exam Session → Exam Engine: saves answers
- Exam Engine → MySQL Database: reads and writes
- Curriculum Service → MySQL Database: reads curriculum
- Authentication & RBAC → MySQL Database: checks sessions and roles
- Exam Engine → Results & Review: provides review data
- Results & Review → PDF Generation: generates answer sheet
- PDF Export Route → PDF Generation: generates reports
- Student Scorecard → PDF Generation: generates scorecard
- Administration → Live Proctoring: opens monitoring
- Live Proctoring → WebSocket & IPC: monitors sessions
- Realtime Daemon Entry → WebSocket & IPC: starts daemon
- Event Push Helper → WebSocket & IPC: pushes IPC events
- Violation Logging → Event Push Helper: sends alerts
- Exam Session → Violation Logging: reports violations
- WebSocket & IPC → Student Candidate: broadcasts updates
- Database Connection → MySQL Database: connects
