# adminfarhanaftab/aegis architecture

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

- Interactive diagram: https://gitdiagram.com/adminfarhanaftab/aegis
- Repository: https://github.com/adminfarhanaftab/aegis

## Overview

This is a multi-organization exam platform: administrators create and schedule exams, candidates take them, evaluators review outcomes, and proctors monitor sessions; administrators also inspect analytics. Exam generation is a distinct backend workflow that creates question content, encrypts it for timed release, and publishes it back to the worker. The README is empty, so several UI-to-API connections and unsampled feature details are shown as unverified rather than asserted as source-confirmed calls.

Main entry points: [`worker.js`](https://github.com/adminfarhanaftab/aegis/blob/main/worker.js) (API and routing), [`generator.py`](https://github.com/adminfarhanaftab/aegis/blob/main/generator.py) (Question generation), [`migrations/schema.sql`](https://github.com/adminfarhanaftab/aegis/blob/main/migrations/schema.sql) (Exam database), [`public/assets/app.js`](https://github.com/adminfarhanaftab/aegis/blob/main/public/assets/app.js) (Shared browser logic)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_clients["User interfaces"]
  node_landing["Landing page<br/>[index.html]"]
  node_admin["Administration<br/>[admin.html]"]
  node_candidate["Candidate exam<br/>[candidate.html]"]
  node_evaluator["Evaluation view<br/>[evaluator.html]"]
  node_proctor["Proctor console<br/>[proctor.html]"]
  node_analytics["Analytics view<br/>[analytics.html]"]
  node_browser_app["Shared browser logic<br/>[app.js]"]
end

subgraph group_platform["Exam platform"]
  node_api["API and routing<br/>[worker.js]"]
  node_authentication["Authentication and SSO<br/>[worker.js]"]
  node_exam_management["Exam management<br/>[worker.js]"]
  node_exam_delivery["Exam delivery<br/>[worker.js]"]
  node_proctoring["Live proctoring<br/>[worker.js]"]
  node_reporting["Analytics and reports<br/>[worker.js]"]
end

subgraph group_generation["Exam generation"]
  node_generator["Question generation<br/>[generator.py]"]
  node_encryption["Timed encryption<br/>[generator.py]"]
  node_publishing["Exam publishing<br/>[generator.py]"]
end

subgraph group_state["Platform state and services"]
  node_database[("Exam database<br/>[schema.sql]")]
  node_cache[("Analytics cache")]
  node_ai_services["AI providers"]
  node_rtc_service["Cloudflare RTC"]
end

node_users(("Platform users"))

node_users -.->|"opens"| node_landing
node_users -.->|"manages exams"| node_admin
node_users -.->|"takes exam"| node_candidate
node_users -.->|"evaluates"| node_evaluator
node_users -.->|"monitors"| node_proctor
node_users -.->|"views reports"| node_analytics
node_browser_app -.->|"calls API"| node_api
node_api -.->|"routes requests"| node_authentication
node_api -.->|"routes requests"| node_exam_management
node_api -.->|"routes requests"| node_exam_delivery
node_api -.->|"routes requests"| node_proctoring
node_api -.->|"routes requests"| node_reporting
node_api -->|"queries and writes"| node_database
node_api -->|"reads and writes"| node_cache
node_generator -->|"requests questions"| node_ai_services
node_generator -->|"encrypts payload"| node_encryption
node_generator -->|"publishes payload"| node_publishing
node_publishing -->|"posts exam data"| node_api
node_api -->|"requests tracks"| node_rtc_service
node_proctoring -.->|"updates sessions"| node_database

click node_landing "https://github.com/adminfarhanaftab/aegis/blob/main/public/index.html"
click node_admin "https://github.com/adminfarhanaftab/aegis/blob/main/public/admin.html"
click node_candidate "https://github.com/adminfarhanaftab/aegis/blob/main/public/candidate.html"
click node_evaluator "https://github.com/adminfarhanaftab/aegis/blob/main/public/evaluator.html"
click node_proctor "https://github.com/adminfarhanaftab/aegis/blob/main/public/proctor.html"
click node_analytics "https://github.com/adminfarhanaftab/aegis/blob/main/public/analytics.html"
click node_browser_app "https://github.com/adminfarhanaftab/aegis/blob/main/public/assets/app.js"
click node_api "https://github.com/adminfarhanaftab/aegis/blob/main/worker.js"
click node_authentication "https://github.com/adminfarhanaftab/aegis/blob/main/worker.js"
click node_exam_management "https://github.com/adminfarhanaftab/aegis/blob/main/worker.js"
click node_exam_delivery "https://github.com/adminfarhanaftab/aegis/blob/main/worker.js"
click node_proctoring "https://github.com/adminfarhanaftab/aegis/blob/main/worker.js"
click node_reporting "https://github.com/adminfarhanaftab/aegis/blob/main/worker.js"
click node_generator "https://github.com/adminfarhanaftab/aegis/blob/main/generator.py"
click node_encryption "https://github.com/adminfarhanaftab/aegis/blob/main/generator.py"
click node_publishing "https://github.com/adminfarhanaftab/aegis/blob/main/generator.py"
click node_database "https://github.com/adminfarhanaftab/aegis/blob/main/migrations/schema.sql"

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_landing,node_admin,node_candidate,node_evaluator,node_proctor,node_analytics,node_browser_app,node_users toneBlue
class node_api,node_authentication,node_exam_management,node_exam_delivery,node_proctoring,node_reporting toneAmber
class node_generator,node_encryption,node_publishing toneMint
class node_database,node_cache,node_ai_services,node_rtc_service toneRose
```

## Components

### User interfaces

- [Landing page](https://github.com/adminfarhanaftab/aegis/blob/main/public/index.html): `public/index.html`
- [Administration](https://github.com/adminfarhanaftab/aegis/blob/main/public/admin.html): `public/admin.html`
- [Candidate exam](https://github.com/adminfarhanaftab/aegis/blob/main/public/candidate.html): `public/candidate.html`
- [Evaluation view](https://github.com/adminfarhanaftab/aegis/blob/main/public/evaluator.html): `public/evaluator.html`
- [Proctor console](https://github.com/adminfarhanaftab/aegis/blob/main/public/proctor.html): `public/proctor.html`
- [Analytics view](https://github.com/adminfarhanaftab/aegis/blob/main/public/analytics.html): `public/analytics.html`
- [Shared browser logic](https://github.com/adminfarhanaftab/aegis/blob/main/public/assets/app.js): `public/assets/app.js`

### Exam platform

- [API and routing](https://github.com/adminfarhanaftab/aegis/blob/main/worker.js): `worker.js`
- [Authentication and SSO](https://github.com/adminfarhanaftab/aegis/blob/main/worker.js): `worker.js`
- [Exam management](https://github.com/adminfarhanaftab/aegis/blob/main/worker.js): `worker.js`
- [Exam delivery](https://github.com/adminfarhanaftab/aegis/blob/main/worker.js): `worker.js`
- [Live proctoring](https://github.com/adminfarhanaftab/aegis/blob/main/worker.js): `worker.js`
- [Analytics and reports](https://github.com/adminfarhanaftab/aegis/blob/main/worker.js): `worker.js`

### Exam generation

- [Question generation](https://github.com/adminfarhanaftab/aegis/blob/main/generator.py): `generator.py`
- [Timed encryption](https://github.com/adminfarhanaftab/aegis/blob/main/generator.py): `generator.py`
- [Exam publishing](https://github.com/adminfarhanaftab/aegis/blob/main/generator.py): `generator.py`

### Platform state and services

- [Exam database](https://github.com/adminfarhanaftab/aegis/blob/main/migrations/schema.sql): `migrations/schema.sql`
- **Analytics cache**
- **AI providers**
- **Cloudflare RTC**

### Other components

- **Platform users**

## Connections

- Platform users → Landing page: opens
- Platform users → Administration: manages exams
- Platform users → Candidate exam: takes exam
- Platform users → Evaluation view: evaluates
- Platform users → Proctor console: monitors
- Platform users → Analytics view: views reports
- Shared browser logic → API and routing: calls API
- API and routing → Authentication and SSO: routes requests (evidence: `worker.js`)
- API and routing → Exam management: routes requests (evidence: `worker.js`)
- API and routing → Exam delivery: routes requests (evidence: `worker.js`)
- API and routing → Live proctoring: routes requests (evidence: `worker.js`)
- API and routing → Analytics and reports: routes requests (evidence: `worker.js`)
- API and routing → Exam database: queries and writes (evidence: `worker.js`)
- API and routing → Analytics cache: reads and writes (evidence: `worker.js`)
- Question generation → AI providers: requests questions (evidence: `generator.py`)
- Question generation → Timed encryption: encrypts payload (evidence: `generator.py`)
- Question generation → Exam publishing: publishes payload (evidence: `generator.py`)
- Exam publishing → API and routing: posts exam data (evidence: `generator.py`)
- API and routing → Cloudflare RTC: requests tracks (evidence: `worker.js`)
- Live proctoring → Exam database: updates sessions
