# royan04/online-exam-proctoring-system architecture

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

- Interactive diagram: https://gitdiagram.com/royan04/online-exam-proctoring-system
- Repository: https://github.com/royan04/online-exam-proctoring-system

## Overview

This is a Django online-examination platform with a separate Flask AI-proctoring service. Students browse exams, submit answers and receive recorded results; teachers manage exams and questions, while administrators manage users, courses, questions and marks. The proctoring service accepts a start request and processes submitted frames for identity, behavior and object alerts. Edges reflect calls shown in excerpts or relationships documented in the README; unsampled templates and routing details limit further connection claims.

Main entry points: [`student/views.py`](https://github.com/royan04/online-exam-proctoring-system/blob/main/student/views.py) (Student exam workflow), [`testing/app.py`](https://github.com/royan04/online-exam-proctoring-system/blob/main/testing/app.py) (Proctoring API), [`quiz/views.py`](https://github.com/royan04/online-exam-proctoring-system/blob/main/quiz/views.py) (Admin exam tools), [`teacher/views.py`](https://github.com/royan04/online-exam-proctoring-system/blob/main/teacher/views.py) (Teacher exam tools)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_exam["Exam management"]
  node_admin_exam["Admin exam tools<br/>[views.py]"]
  node_exam_forms["Exam forms<br/>[forms.py]"]
  node_exam_data[("Courses, questions, results<br/>[models.py]")]
  node_student_exam["Student exam workflow<br/>[views.py]"]
  node_teacher_exam["Teacher exam tools<br/>[views.py]"]
end

subgraph group_people["User management"]
  node_student_forms["Student forms<br/>[forms.py]"]
  node_student_data[("Student profiles<br/>[models.py]")]
  node_teacher_forms["Teacher forms<br/>[forms.py]"]
  node_teacher_data[("Teacher profiles<br/>[models.py]")]
end

subgraph group_proctor["AI proctoring"]
  node_proctor_service["Proctoring API<br/>[app.py]"]
  node_frame_stream["Camera frame stream<br/>[app.py]"]
  node_detection["Identity and behavior detection"]
  node_activity_log["Suspicious activity log"]
end

subgraph group_web["Web entry points"]
  node_web_routes["Django routes<br/>[urls.py]"]
  node_student_routes["Student routes<br/>[urls.py]"]
  node_teacher_routes["Teacher routes<br/>[urls.py]"]
end

node_student_actor(("Student"))
node_teacher_actor(("Teacher"))
node_admin_actor(("Administrator"))

node_student_actor -->|"requests exams"| node_student_routes
node_teacher_actor -->|"manages exams"| node_teacher_routes
node_admin_actor -->|"uses admin"| node_web_routes
node_web_routes -->|"routes to"| node_admin_exam
node_student_routes -->|"routes to"| node_student_exam
node_teacher_routes -->|"routes to"| node_teacher_exam
node_admin_exam -->|"uses forms"| node_exam_forms
node_admin_exam -->|"reads and writes"| node_exam_data
node_teacher_exam -->|"uses forms"| node_exam_forms
node_teacher_exam -->|"reads and writes"| node_exam_data
node_student_exam -->|"reads and writes"| node_exam_data
node_student_exam -->|"reads profile"| node_student_data
node_student_exam -->|"starts via HTTP"| node_proctor_service
node_student_actor -.->|"submits frames"| node_proctor_service
node_proctor_service -->|"serves frames"| node_frame_stream
node_proctor_service -->|"processes frames"| node_detection
node_detection -->|"appends events"| node_activity_log

click node_web_routes "https://github.com/royan04/online-exam-proctoring-system/blob/main/onlinequiz/urls.py"
click node_student_routes "https://github.com/royan04/online-exam-proctoring-system/blob/main/student/urls.py"
click node_teacher_routes "https://github.com/royan04/online-exam-proctoring-system/blob/main/teacher/urls.py"
click node_admin_exam "https://github.com/royan04/online-exam-proctoring-system/blob/main/quiz/views.py"
click node_exam_forms "https://github.com/royan04/online-exam-proctoring-system/blob/main/quiz/forms.py"
click node_exam_data "https://github.com/royan04/online-exam-proctoring-system/blob/main/quiz/models.py"
click node_student_exam "https://github.com/royan04/online-exam-proctoring-system/blob/main/student/views.py"
click node_student_forms "https://github.com/royan04/online-exam-proctoring-system/blob/main/student/forms.py"
click node_student_data "https://github.com/royan04/online-exam-proctoring-system/blob/main/student/models.py"
click node_teacher_exam "https://github.com/royan04/online-exam-proctoring-system/blob/main/teacher/views.py"
click node_teacher_forms "https://github.com/royan04/online-exam-proctoring-system/blob/main/teacher/forms.py"
click node_teacher_data "https://github.com/royan04/online-exam-proctoring-system/blob/main/teacher/models.py"
click node_proctor_service "https://github.com/royan04/online-exam-proctoring-system/blob/main/testing/app.py"
click node_frame_stream "https://github.com/royan04/online-exam-proctoring-system/blob/main/testing/app.py"
click node_detection "https://github.com/royan04/online-exam-proctoring-system/blob/main/testing/proctoring_logic.py"
click node_activity_log "https://github.com/royan04/online-exam-proctoring-system/blob/main/testing/proctoring_logic.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_admin_exam,node_exam_forms,node_exam_data,node_student_exam,node_teacher_exam toneBlue
class node_student_forms,node_student_data,node_teacher_forms,node_teacher_data toneAmber
class node_proctor_service,node_frame_stream,node_detection,node_activity_log toneMint
class node_web_routes,node_student_routes,node_teacher_routes toneRose
class node_student_actor,node_teacher_actor,node_admin_actor toneIndigo
```

## Components

### Exam management

- [Admin exam tools](https://github.com/royan04/online-exam-proctoring-system/blob/main/quiz/views.py): `quiz/views.py`
- [Exam forms](https://github.com/royan04/online-exam-proctoring-system/blob/main/quiz/forms.py): `quiz/forms.py`
- [Courses, questions, results](https://github.com/royan04/online-exam-proctoring-system/blob/main/quiz/models.py): `quiz/models.py`
- [Student exam workflow](https://github.com/royan04/online-exam-proctoring-system/blob/main/student/views.py): `student/views.py`
- [Teacher exam tools](https://github.com/royan04/online-exam-proctoring-system/blob/main/teacher/views.py): `teacher/views.py`

### User management

- [Student forms](https://github.com/royan04/online-exam-proctoring-system/blob/main/student/forms.py): `student/forms.py`
- [Student profiles](https://github.com/royan04/online-exam-proctoring-system/blob/main/student/models.py): `student/models.py`
- [Teacher forms](https://github.com/royan04/online-exam-proctoring-system/blob/main/teacher/forms.py): `teacher/forms.py`
- [Teacher profiles](https://github.com/royan04/online-exam-proctoring-system/blob/main/teacher/models.py): `teacher/models.py`

### AI proctoring

- [Proctoring API](https://github.com/royan04/online-exam-proctoring-system/blob/main/testing/app.py): `testing/app.py`
- [Camera frame stream](https://github.com/royan04/online-exam-proctoring-system/blob/main/testing/app.py): `testing/app.py`
- [Identity and behavior detection](https://github.com/royan04/online-exam-proctoring-system/blob/main/testing/proctoring_logic.py): `testing/proctoring_logic.py`
- [Suspicious activity log](https://github.com/royan04/online-exam-proctoring-system/blob/main/testing/proctoring_logic.py): `testing/proctoring_logic.py`

### Web entry points

- [Django routes](https://github.com/royan04/online-exam-proctoring-system/blob/main/onlinequiz/urls.py): `onlinequiz/urls.py`
- [Student routes](https://github.com/royan04/online-exam-proctoring-system/blob/main/student/urls.py): `student/urls.py`
- [Teacher routes](https://github.com/royan04/online-exam-proctoring-system/blob/main/teacher/urls.py): `teacher/urls.py`

### Other components

- **Student**
- **Teacher**
- **Administrator**

## Connections

- Student → Student routes: requests exams (evidence: `student/urls.py`)
- Teacher → Teacher routes: manages exams (evidence: `teacher/urls.py`)
- Administrator → Django routes: uses admin (evidence: `onlinequiz/urls.py`)
- Django routes → Admin exam tools: routes to (evidence: `onlinequiz/urls.py`)
- Student routes → Student exam workflow: routes to (evidence: `student/urls.py`)
- Teacher routes → Teacher exam tools: routes to (evidence: `teacher/urls.py`)
- Admin exam tools → Exam forms: uses forms (evidence: `quiz/views.py`)
- Admin exam tools → Courses, questions, results: reads and writes (evidence: `quiz/views.py`)
- Teacher exam tools → Exam forms: uses forms (evidence: `teacher/views.py`)
- Teacher exam tools → Courses, questions, results: reads and writes (evidence: `teacher/views.py`)
- Student exam workflow → Courses, questions, results: reads and writes (evidence: `student/views.py`)
- Student exam workflow → Student profiles: reads profile (evidence: `student/views.py`)
- Student exam workflow → Proctoring API: starts via HTTP (evidence: `student/views.py`)
- Student → Proctoring API: submits frames (evidence: `README.md`)
- Proctoring API → Camera frame stream: serves frames (evidence: `testing/app.py`)
- Proctoring API → Identity and behavior detection: processes frames (evidence: `testing/app.py`)
- Identity and behavior detection → Suspicious activity log: appends events (evidence: `testing/proctoring_logic.py`)
