# omarelfadaly1/my_projects architecture

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

- Interactive diagram: https://gitdiagram.com/omarelfadaly1/my_projects
- Repository: https://github.com/omarelfadaly1/my_projects

## Overview

This repository contains three independent image/video-AI applications: fire monitoring, oral-disease classification, and road-damage detection. Fire monitoring takes a video through the desktop UI, tracks detections, raises alerts, and presents saved alert history. The other apps classify uploaded oral images or detect road damage in uploaded images. The map reflects sampled source and the source index; the README is empty, and training notebooks are excluded. Road-model weights referenced by its server are not present in the tree.

Main entry points: [`Fire_Alert_System/gui/app.py`](https://github.com/omarelfadaly1/my_projects/blob/main/Fire_Alert_System/gui/app.py) (Monitoring UI), [`Fire_Alert_System/src/alert.py`](https://github.com/omarelfadaly1/my_projects/blob/main/Fire_Alert_System/src/alert.py) (Alert manager), [`Fire_Alert_System/src/tracker.py`](https://github.com/omarelfadaly1/my_projects/blob/main/Fire_Alert_System/src/tracker.py) (Fire tracker), [`Road Damage Detection/deployment/static/js/app.js`](https://github.com/omarelfadaly1/my_projects/blob/main/Road%20Damage%20Detection/deployment/static/js/app.js) (Web interface)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_fire["Fire Alert System"]
  node_fire_entry["Desktop entry<br/>[main.py]"]
  node_fire_ui["Monitoring UI<br/>[app.py]"]
  node_fire_config["App configuration<br/>[config.py]"]
  node_fire_video["Video worker<br/>[video.py]"]
  node_fire_detector["Fire tracker<br/>[tracker.py]"]
  node_fire_model["Detection weights<br/>[best.pt]"]
  node_fire_alert["Alert manager<br/>[alert.py]"]
  node_fire_db[("Alert records<br/>[db.py]")]
  node_fire_screenshots["Alert screenshots"]
end

subgraph group_oral["Oral Disease Classifier"]
  node_oral_app["Classification app<br/>[app.py]"]
  node_oral_model["ResNet50 model"]
end

subgraph group_road["Road Damage Detection"]
  node_road_ui["Web interface<br/>[app.js]"]
  node_road_template["Web page<br/>[index.html]"]
  node_road_server["Prediction server<br/>[app.py]"]
  node_road_models["YOLO models"]
end

node_fire_user(("Operator"))
node_oral_user(("Image uploader"))
node_road_user(("Image analyst"))

node_fire_user -->|"starts"| node_fire_entry
node_fire_entry -->|"launches"| node_fire_ui
node_fire_ui -->|"reads settings"| node_fire_config
node_fire_ui -->|"starts video"| node_fire_video
node_fire_ui -->|"creates"| node_fire_detector
node_fire_ui -->|"creates"| node_fire_alert
node_fire_ui -->|"loads history"| node_fire_db
node_fire_video -->|"processes frames"| node_fire_detector
node_fire_video -->|"sends events"| node_fire_alert
node_fire_detector -->|"loads weights"| node_fire_model
node_fire_detector -->|"reads settings"| node_fire_config
node_fire_alert -->|"inserts alerts"| node_fire_db
node_fire_alert -->|"writes images"| node_fire_screenshots
node_fire_alert -->|"notifies callback"| node_fire_ui
node_fire_user -->|"uploads image"| node_oral_app
node_oral_app -->|"loads and predicts"| node_oral_model
node_road_user -->|"selects image"| node_road_ui
node_road_template -.->|"hosts interface"| node_road_ui
node_road_ui -->|"requests models"| node_road_server
node_road_ui -->|"posts prediction"| node_road_server
node_road_server -->|"loads and predicts"| node_road_models

click node_fire_entry "https://github.com/omarelfadaly1/my_projects/blob/main/Fire_Alert_System/main.py"
click node_fire_ui "https://github.com/omarelfadaly1/my_projects/blob/main/Fire_Alert_System/gui/app.py"
click node_fire_config "https://github.com/omarelfadaly1/my_projects/blob/main/Fire_Alert_System/config.py"
click node_fire_video "https://github.com/omarelfadaly1/my_projects/blob/main/Fire_Alert_System/src/video.py"
click node_fire_detector "https://github.com/omarelfadaly1/my_projects/blob/main/Fire_Alert_System/src/tracker.py"
click node_fire_model "https://github.com/omarelfadaly1/my_projects/blob/main/Fire_Alert_System/model/best.pt"
click node_fire_alert "https://github.com/omarelfadaly1/my_projects/blob/main/Fire_Alert_System/src/alert.py"
click node_fire_db "https://github.com/omarelfadaly1/my_projects/blob/main/Fire_Alert_System/src/db.py"
click node_fire_screenshots "https://github.com/omarelfadaly1/my_projects/tree/main/Fire_Alert_System/alerts/screenshots"
click node_oral_app "https://github.com/omarelfadaly1/my_projects/blob/main/Oral_Disease_Classification/app.py"
click node_road_ui "https://github.com/omarelfadaly1/my_projects/blob/main/Road%20Damage%20Detection/deployment/static/js/app.js"
click node_road_template "https://github.com/omarelfadaly1/my_projects/blob/main/Road%20Damage%20Detection/deployment/templates/index.html"
click node_road_server "https://github.com/omarelfadaly1/my_projects/blob/main/Road%20Damage%20Detection/deployment/app.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_fire_entry,node_fire_ui,node_fire_config,node_fire_video,node_fire_detector,node_fire_model,node_fire_alert,node_fire_db,node_fire_screenshots toneBlue
class node_oral_app,node_oral_model toneAmber
class node_road_ui,node_road_template,node_road_server,node_road_models toneMint
class node_fire_user,node_oral_user,node_road_user toneIndigo
```

## Components

### Fire Alert System

- [Desktop entry](https://github.com/omarelfadaly1/my_projects/blob/main/Fire_Alert_System/main.py): `Fire_Alert_System/main.py`
- [Monitoring UI](https://github.com/omarelfadaly1/my_projects/blob/main/Fire_Alert_System/gui/app.py): `Fire_Alert_System/gui/app.py`
- [App configuration](https://github.com/omarelfadaly1/my_projects/blob/main/Fire_Alert_System/config.py): `Fire_Alert_System/config.py`
- [Video worker](https://github.com/omarelfadaly1/my_projects/blob/main/Fire_Alert_System/src/video.py): `Fire_Alert_System/src/video.py`
- [Fire tracker](https://github.com/omarelfadaly1/my_projects/blob/main/Fire_Alert_System/src/tracker.py): `Fire_Alert_System/src/tracker.py`
- [Detection weights](https://github.com/omarelfadaly1/my_projects/blob/main/Fire_Alert_System/model/best.pt): `Fire_Alert_System/model/best.pt`
- [Alert manager](https://github.com/omarelfadaly1/my_projects/blob/main/Fire_Alert_System/src/alert.py): `Fire_Alert_System/src/alert.py`
- [Alert records](https://github.com/omarelfadaly1/my_projects/blob/main/Fire_Alert_System/src/db.py): `Fire_Alert_System/src/db.py`
- [Alert screenshots](https://github.com/omarelfadaly1/my_projects/tree/main/Fire_Alert_System/alerts/screenshots): `Fire_Alert_System/alerts/screenshots`

### Oral Disease Classifier

- [Classification app](https://github.com/omarelfadaly1/my_projects/blob/main/Oral_Disease_Classification/app.py): `Oral_Disease_Classification/app.py`
- **ResNet50 model**

### Road Damage Detection

- [Web interface](https://github.com/omarelfadaly1/my_projects/blob/main/Road%20Damage%20Detection/deployment/static/js/app.js): `Road Damage Detection/deployment/static/js/app.js`
- [Web page](https://github.com/omarelfadaly1/my_projects/blob/main/Road%20Damage%20Detection/deployment/templates/index.html): `Road Damage Detection/deployment/templates/index.html`
- [Prediction server](https://github.com/omarelfadaly1/my_projects/blob/main/Road%20Damage%20Detection/deployment/app.py): `Road Damage Detection/deployment/app.py`
- **YOLO models**

### Other components

- **Operator**
- **Image uploader**
- **Image analyst**

## Connections

- Operator → Desktop entry: starts (evidence: `Fire_Alert_System/main.py`)
- Desktop entry → Monitoring UI: launches (evidence: `Fire_Alert_System/main.py`)
- Monitoring UI → App configuration: reads settings (evidence: `Fire_Alert_System/gui/app.py`)
- Monitoring UI → Video worker: starts video (evidence: `Fire_Alert_System/gui/app.py`)
- Monitoring UI → Fire tracker: creates (evidence: `Fire_Alert_System/gui/app.py`)
- Monitoring UI → Alert manager: creates (evidence: `Fire_Alert_System/gui/app.py`)
- Monitoring UI → Alert records: loads history (evidence: `Fire_Alert_System/gui/app.py`)
- Video worker → Fire tracker: processes frames (evidence: `Fire_Alert_System/src/video.py`)
- Video worker → Alert manager: sends events (evidence: `Fire_Alert_System/src/video.py`)
- Fire tracker → Detection weights: loads weights (evidence: `Fire_Alert_System/src/tracker.py`)
- Fire tracker → App configuration: reads settings (evidence: `Fire_Alert_System/src/tracker.py`)
- Alert manager → Alert records: inserts alerts (evidence: `Fire_Alert_System/src/alert.py`)
- Alert manager → Alert screenshots: writes images (evidence: `Fire_Alert_System/src/alert.py`)
- Alert manager → Monitoring UI: notifies callback (evidence: `Fire_Alert_System/src/alert.py`)
- Operator → Classification app: uploads image (evidence: `Oral_Disease_Classification/app.py`)
- Classification app → ResNet50 model: loads and predicts (evidence: `Oral_Disease_Classification/app.py`)
- Image analyst → Web interface: selects image (evidence: `Road Damage Detection/deployment/static/js/app.js`)
- Web page → Web interface: hosts interface
- Web interface → Prediction server: requests models (evidence: `Road Damage Detection/deployment/static/js/app.js`)
- Web interface → Prediction server: posts prediction (evidence: `Road Damage Detection/deployment/static/js/app.js`)
- Prediction server → YOLO models: loads and predicts (evidence: `Road Damage Detection/deployment/app.py`)
