# omargomah/automated-exam-supervision-system architecture

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

- Interactive diagram: https://gitdiagram.com/omargomah/automated-exam-supervision-system
- Repository: https://github.com/omargomah/automated-exam-supervision-system

## Overview

The repository is an early-stage IoT exam-supervision system. Its implemented workflow samples sound, RF energy, and nearby BLE devices on an ESP32, packages the readings, and posts them to a configured endpoint; a separate ESP32-CAM firmware serves camera controls and image streams. The backend currently exposes a weather-forecast example, not telemetry ingestion. README-listed AI/OpenCV and Flutter components have placeholder directories only. The graph reflects sampled firmware and backend behavior; unsampled sensor and camera details are represented only where the tree or README supports them.

Main entry points: [`src/firmware/ESP32_Telemetry/src/main.cpp`](https://github.com/omargomah/automated-exam-supervision-system/blob/main/src/firmware/ESP32_Telemetry/src/main.cpp) (Telemetry loop), [`src/firmware/ESP_CAM_Stream/CameraWebServer/app_httpd.cpp`](https://github.com/omargomah/automated-exam-supervision-system/blob/main/src/firmware/ESP_CAM_Stream/CameraWebServer/app_httpd.cpp) (Camera HTTP server), [`src/firmware/ESP32_Telemetry/src/telemetry_publisher.cpp`](https://github.com/omargomah/automated-exam-supervision-system/blob/main/src/firmware/ESP32_Telemetry/src/telemetry_publisher.cpp) (Telemetry publisher), [`src/backend/SessionManagement.API/Program.cs`](https://github.com/omargomah/automated-exam-supervision-system/blob/main/src/backend/SessionManagement.API/Program.cs) (Weather API scaffold)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_telemetry["Telemetry node"]
  node_telemetry_main["Telemetry loop<br/>[main.cpp]"]
  node_audio_sensor["Audio sensing"]
  node_rf_ble["RF and BLE<br/>[rf_ble_sniffer.cpp]"]
  node_wifi["Wi-Fi manager<br/>[wifi_manager.cpp]"]
  node_publisher["Telemetry publisher"]
end

subgraph group_camera["Camera stream"]
  node_camera_server["Camera HTTP server<br/>[app_httpd.cpp]"]
  node_camera_ui["Camera web interface<br/>[camera_index.h]"]
end

subgraph group_backend["Backend API"]
  node_backend_api["Weather API scaffold<br/>[Program.cs]"]
end

node_exam_environment(("Exam environment"))
node_ingest_endpoint["Configured ingest endpoint"]
node_camera_device(("Camera hardware"))
node_camera_user(("Camera viewer"))
node_ai_placeholder["AI/OpenCV component"]
node_mobile_placeholder["Flutter app component"]

node_telemetry_main -->|"maintains connection"| node_wifi
node_telemetry_main -->|"reads audio"| node_audio_sensor
node_telemetry_main -->|"reads RF/BLE"| node_rf_ble
node_telemetry_main -->|"publishes readings"| node_publisher
node_publisher -->|"posts JSON"| node_ingest_endpoint
node_camera_user -->|"requests stream/control"| node_camera_server
node_camera_server -->|"captures frames"| node_camera_device
node_camera_server -->|"serves interface"| node_camera_ui
node_backend_api -->|"serves forecast route"| node_camera_user

click node_telemetry_main "https://github.com/omargomah/automated-exam-supervision-system/blob/main/src/firmware/ESP32_Telemetry/src/main.cpp"
click node_audio_sensor "https://github.com/omargomah/automated-exam-supervision-system/blob/main/src/firmware/ESP32_Telemetry/src/audio_telemetry.cpp"
click node_rf_ble "https://github.com/omargomah/automated-exam-supervision-system/blob/main/src/firmware/ESP32_Telemetry/src/rf_ble_sniffer.cpp"
click node_wifi "https://github.com/omargomah/automated-exam-supervision-system/blob/main/src/firmware/ESP32_Telemetry/src/wifi_manager.cpp"
click node_publisher "https://github.com/omargomah/automated-exam-supervision-system/blob/main/src/firmware/ESP32_Telemetry/src/telemetry_publisher.cpp"
click node_camera_server "https://github.com/omargomah/automated-exam-supervision-system/blob/main/src/firmware/ESP_CAM_Stream/CameraWebServer/app_httpd.cpp"
click node_camera_ui "https://github.com/omargomah/automated-exam-supervision-system/blob/main/src/firmware/ESP_CAM_Stream/CameraWebServer/camera_index.h"
click node_backend_api "https://github.com/omargomah/automated-exam-supervision-system/blob/main/src/backend/SessionManagement.API/Program.cs"
click node_ai_placeholder "https://github.com/omargomah/automated-exam-supervision-system/tree/main/src/ai-engine"
click node_mobile_placeholder "https://github.com/omargomah/automated-exam-supervision-system/tree/main/src/mobile-app"

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_telemetry_main,node_audio_sensor,node_rf_ble,node_wifi,node_publisher,node_camera_user toneBlue
class node_camera_server,node_camera_ui toneAmber
class node_backend_api toneMint
class node_exam_environment,node_ingest_endpoint,node_camera_device toneIndigo
class node_ai_placeholder,node_mobile_placeholder toneTeal
```

## Components

### Telemetry node

- [Telemetry loop](https://github.com/omargomah/automated-exam-supervision-system/blob/main/src/firmware/ESP32_Telemetry/src/main.cpp): `src/firmware/ESP32_Telemetry/src/main.cpp`
- [Audio sensing](https://github.com/omargomah/automated-exam-supervision-system/blob/main/src/firmware/ESP32_Telemetry/src/audio_telemetry.cpp): `src/firmware/ESP32_Telemetry/src/audio_telemetry.cpp`
- [RF and BLE](https://github.com/omargomah/automated-exam-supervision-system/blob/main/src/firmware/ESP32_Telemetry/src/rf_ble_sniffer.cpp): `src/firmware/ESP32_Telemetry/src/rf_ble_sniffer.cpp`
- [Wi-Fi manager](https://github.com/omargomah/automated-exam-supervision-system/blob/main/src/firmware/ESP32_Telemetry/src/wifi_manager.cpp): `src/firmware/ESP32_Telemetry/src/wifi_manager.cpp`
- [Telemetry publisher](https://github.com/omargomah/automated-exam-supervision-system/blob/main/src/firmware/ESP32_Telemetry/src/telemetry_publisher.cpp): `src/firmware/ESP32_Telemetry/src/telemetry_publisher.cpp`

### Camera stream

- [Camera HTTP server](https://github.com/omargomah/automated-exam-supervision-system/blob/main/src/firmware/ESP_CAM_Stream/CameraWebServer/app_httpd.cpp): `src/firmware/ESP_CAM_Stream/CameraWebServer/app_httpd.cpp`
- [Camera web interface](https://github.com/omargomah/automated-exam-supervision-system/blob/main/src/firmware/ESP_CAM_Stream/CameraWebServer/camera_index.h): `src/firmware/ESP_CAM_Stream/CameraWebServer/camera_index.h`

### Backend API

- [Weather API scaffold](https://github.com/omargomah/automated-exam-supervision-system/blob/main/src/backend/SessionManagement.API/Program.cs): `src/backend/SessionManagement.API/Program.cs`

### Other components

- **Exam environment**
- **Configured ingest endpoint**
- **Camera hardware**
- **Camera viewer**
- [AI/OpenCV component](https://github.com/omargomah/automated-exam-supervision-system/tree/main/src/ai-engine): `src/ai-engine`
- [Flutter app component](https://github.com/omargomah/automated-exam-supervision-system/tree/main/src/mobile-app): `src/mobile-app`

## Connections

- Telemetry loop → Wi-Fi manager: maintains connection
- Telemetry loop → Audio sensing: reads audio
- Telemetry loop → RF and BLE: reads RF/BLE
- Telemetry loop → Telemetry publisher: publishes readings
- Telemetry publisher → Configured ingest endpoint: posts JSON
- Camera viewer → Camera HTTP server: requests stream/control
- Camera HTTP server → Camera hardware: captures frames
- Camera HTTP server → Camera web interface: serves interface
- Weather API scaffold → Camera viewer: serves forecast route
