# mudabs/proctor architecture

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

- Interactive diagram: https://gitdiagram.com/mudabs/proctor
- Repository: https://github.com/mudabs/proctor

## Overview

Proctor is a Flask exam-management application with browser-assisted proctoring. Users authenticate, manage courses and assessments, take quizzes, and review results; during an exam, the browser uploads frames to an authenticated session endpoint, which runs detection and returns the latest result. The map includes administration and the inference/session-state layers. README capabilities are represented where documented; unsampled route details and legacy sensor or graph behavior are not expanded.

Main entry points: [`app.py`](https://github.com/mudabs/proctor/blob/main/app.py) (Flask app), [`proctor/proctoring/routes.py`](https://github.com/mudabs/proctor/blob/main/proctor/proctoring/routes.py) (Proctor sessions), [`proctor/models.py`](https://github.com/mudabs/proctor/blob/main/proctor/models.py) (Domain models), [`proctor/auth/routes.py`](https://github.com/mudabs/proctor/blob/main/proctor/auth/routes.py) (Authentication)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_web["Web application"]
  node_app["Flask app<br/>[app.py]"]
  node_auth["Authentication<br/>[routes.py]"]
  node_admin["Administration<br/>[routes.py]"]
  node_templates["Web pages"]
end

subgraph group_learning["Courses and exams"]
  node_courses["Course management<br/>[routes.py]"]
  node_assessment["Quizzes and results<br/>[routes.py]"]
end

subgraph group_proctoring["Browser proctoring"]
  node_proctor_routes["Proctor sessions<br/>[routes.py]"]
  node_detection["Frame detection<br/>[detection.py]"]
  node_session_state[("Session state<br/>[state.py]")]
end

subgraph group_platform["Data and inference"]
  node_models["Domain models<br/>[models.py]"]
  node_extensions["Flask extensions<br/>[extensions.py]"]
  node_config["App configuration<br/>[config.py]"]
  node_inference["Inference setup<br/>[inference.py]"]
end

node_student(("Student browser"))
node_mariadb[("MariaDB")]

node_student -->|"uses"| node_app
node_app -->|"registers"| node_auth
node_app -->|"registers"| node_admin
node_app -->|"registers"| node_courses
node_app -->|"registers"| node_proctor_routes
node_app -->|"initializes"| node_extensions
node_app -->|"loads"| node_models
node_auth -->|"reads/writes"| node_models
node_auth -->|"uses"| node_session_state
node_admin -->|"reads/writes"| node_models
node_courses -->|"reads/writes"| node_models
node_assessment -->|"reads/writes"| node_models
node_proctor_routes -->|"manages"| node_session_state
node_proctor_routes -->|"processes frames"| node_detection
node_detection -->|"selects device"| node_inference
node_proctor_routes -->|"receives frames"| node_student
node_proctor_routes -->|"returns results"| node_student
node_proctor_routes -->|"renders page"| node_templates
node_app -.->|"renders pages"| node_templates
node_models -->|"uses ORM"| node_extensions
node_extensions -.->|"connects to"| node_mariadb
node_app -.->|"loads settings"| node_config

click node_app "https://github.com/mudabs/proctor/blob/main/app.py"
click node_auth "https://github.com/mudabs/proctor/blob/main/proctor/auth/routes.py"
click node_admin "https://github.com/mudabs/proctor/blob/main/proctor/admin/routes.py"
click node_templates "https://github.com/mudabs/proctor/tree/main/templates"
click node_courses "https://github.com/mudabs/proctor/blob/main/proctor/courses/routes.py"
click node_assessment "https://github.com/mudabs/proctor/blob/main/proctor/courses/routes.py"
click node_proctor_routes "https://github.com/mudabs/proctor/blob/main/proctor/proctoring/routes.py"
click node_detection "https://github.com/mudabs/proctor/blob/main/proctor/proctoring/detection.py"
click node_session_state "https://github.com/mudabs/proctor/blob/main/proctor/state.py"
click node_models "https://github.com/mudabs/proctor/blob/main/proctor/models.py"
click node_extensions "https://github.com/mudabs/proctor/blob/main/proctor/extensions.py"
click node_config "https://github.com/mudabs/proctor/blob/main/proctor/config.py"
click node_inference "https://github.com/mudabs/proctor/blob/main/proctor/inference.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_app,node_auth,node_admin,node_templates,node_student toneBlue
class node_courses,node_assessment,node_mariadb toneAmber
class node_proctor_routes,node_detection,node_session_state toneMint
class node_models,node_extensions,node_config,node_inference toneRose
```

## Components

### Web application

- [Flask app](https://github.com/mudabs/proctor/blob/main/app.py): `app.py`
- [Authentication](https://github.com/mudabs/proctor/blob/main/proctor/auth/routes.py): `proctor/auth/routes.py`
- [Administration](https://github.com/mudabs/proctor/blob/main/proctor/admin/routes.py): `proctor/admin/routes.py`
- [Web pages](https://github.com/mudabs/proctor/tree/main/templates): `templates`

### Courses and exams

- [Course management](https://github.com/mudabs/proctor/blob/main/proctor/courses/routes.py): `proctor/courses/routes.py`
- [Quizzes and results](https://github.com/mudabs/proctor/blob/main/proctor/courses/routes.py): `proctor/courses/routes.py`

### Browser proctoring

- [Proctor sessions](https://github.com/mudabs/proctor/blob/main/proctor/proctoring/routes.py): `proctor/proctoring/routes.py`
- [Frame detection](https://github.com/mudabs/proctor/blob/main/proctor/proctoring/detection.py): `proctor/proctoring/detection.py`
- [Session state](https://github.com/mudabs/proctor/blob/main/proctor/state.py): `proctor/state.py`

### Data and inference

- [Domain models](https://github.com/mudabs/proctor/blob/main/proctor/models.py): `proctor/models.py`
- [Flask extensions](https://github.com/mudabs/proctor/blob/main/proctor/extensions.py): `proctor/extensions.py`
- [App configuration](https://github.com/mudabs/proctor/blob/main/proctor/config.py): `proctor/config.py`
- [Inference setup](https://github.com/mudabs/proctor/blob/main/proctor/inference.py): `proctor/inference.py`

### Other components

- **Student browser**
- **MariaDB**

## Connections

- Student browser → Flask app: uses (evidence: `README.md`)
- Flask app → Authentication: registers (evidence: `app.py`)
- Flask app → Administration: registers (evidence: `app.py`)
- Flask app → Course management: registers (evidence: `app.py`)
- Flask app → Proctor sessions: registers (evidence: `app.py`)
- Flask app → Flask extensions: initializes (evidence: `app.py`)
- Flask app → Domain models: loads (evidence: `app.py`)
- Authentication → Domain models: reads/writes (evidence: `proctor/auth/routes.py`)
- Authentication → Session state: uses (evidence: `proctor/auth/routes.py`)
- Administration → Domain models: reads/writes (evidence: `proctor/admin/routes.py`)
- Course management → Domain models: reads/writes (evidence: `proctor/courses/routes.py`)
- Quizzes and results → Domain models: reads/writes (evidence: `proctor/courses/routes.py`)
- Proctor sessions → Session state: manages (evidence: `proctor/proctoring/routes.py`)
- Proctor sessions → Frame detection: processes frames (evidence: `proctor/proctoring/routes.py`)
- Frame detection → Inference setup: selects device (evidence: `proctor/proctoring/detection.py`)
- Proctor sessions → Student browser: receives frames (evidence: `README.md`)
- Proctor sessions → Student browser: returns results (evidence: `proctor/proctoring/routes.py`)
- Proctor sessions → Web pages: renders page (evidence: `proctor/proctoring/routes.py`)
- Flask app → Web pages: renders pages
- Domain models → Flask extensions: uses ORM (evidence: `proctor/models.py`)
- Flask extensions → MariaDB: connects to (evidence: `README.md`)
- Flask app → App configuration: loads settings (evidence: `app.py`)
