# armanjr/mehrabad-fids architecture

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

- Interactive diagram: https://gitdiagram.com/armanjr/mehrabad-fids
- Repository: https://github.com/armanjr/mehrabad-fids

## Overview

Mehrabad FIDS is a small flight-information display: the ESP32 periodically obtains flight data from the Flask server and shows it on a 1602 LCD. The server’s `/fids` handler queries FlightRadar24 and returns flight fields; `wsgi.py` provides an alternate way to run the Flask app. The device-side implementation and deployment guides are listed but were not excerpted, so device interactions are based on the README rather than inspected code.

Main entry points: [`server/app.py`](https://github.com/armanjr/mehrabad-fids/blob/main/server/app.py) (FIDS Flask app), [`esp32/esp32-code.ino`](https://github.com/armanjr/mehrabad-fids/blob/main/esp32/esp32-code.ino) (ESP32 client), [`server/wsgi.py`](https://github.com/armanjr/mehrabad-fids/blob/main/server/wsgi.py) (WSGI runner)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_device["Display device"]
  node_esp32["ESP32 client<br/>[esp32-code.ino]"]
  node_lcd["1602 LCD"]
end

subgraph group_server["Flight data server"]
  node_flask["FIDS Flask app<br/>[app.py]"]
  node_wsgi["WSGI runner<br/>[wsgi.py]"]
end

node_fr_api["FlightRadar24 API"]

node_esp32 -->|"requests flight data"| node_flask
node_flask -->|"queries flights"| node_fr_api
node_flask -->|"returns flight fields"| node_esp32
node_esp32 -->|"displays flight data"| node_lcd
node_wsgi -->|"runs app"| node_flask

click node_esp32 "https://github.com/armanjr/mehrabad-fids/blob/main/esp32/esp32-code.ino"
click node_flask "https://github.com/armanjr/mehrabad-fids/blob/main/server/app.py"
click node_wsgi "https://github.com/armanjr/mehrabad-fids/blob/main/server/wsgi.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_esp32,node_lcd toneBlue
class node_flask,node_wsgi toneAmber
class node_fr_api toneMint
```

## Components

### Display device

- [ESP32 client](https://github.com/armanjr/mehrabad-fids/blob/main/esp32/esp32-code.ino): `esp32/esp32-code.ino`
- **1602 LCD**

### Flight data server

- [FIDS Flask app](https://github.com/armanjr/mehrabad-fids/blob/main/server/app.py): `server/app.py`
- [WSGI runner](https://github.com/armanjr/mehrabad-fids/blob/main/server/wsgi.py): `server/wsgi.py`

### Other components

- **FlightRadar24 API**

## Connections

- ESP32 client → FIDS Flask app: requests flight data (evidence: `readme.md`)
- FIDS Flask app → FlightRadar24 API: queries flights (evidence: `server/app.py`)
- FIDS Flask app → ESP32 client: returns flight fields (evidence: `readme.md`)
- ESP32 client → 1602 LCD: displays flight data (evidence: `readme.md`)
- WSGI runner → FIDS Flask app: runs app (evidence: `server/wsgi.py`)
