# roksolana-shendiukh/realtime-flight-pipeline architecture

> Architecture diagram of the GitHub repository roksolana-shendiukh/realtime-flight-pipeline, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-12-05). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/roksolana-shendiukh/realtime-flight-pipeline
- Repository: https://github.com/roksolana-shendiukh/realtime-flight-pipeline

## Overview

AirShero is a real-time flight-data pipeline: it polls OpenSky, transports raw flight records through Kafka, and processes them into Bronze, Silver, and Gold Delta tables for analytics and safety monitoring. The README documents the four workflow stages and dashboard capabilities; the available source excerpts verify Silver-to-Gold table reads and writes, but do not expose the producer or streaming notebook implementations. Those workflow links are therefore cited to the README. The dashboard is shown as a documented consumer, not as an inspected implementation.

Main entry points: [`aggregate_gold.py`](https://github.com/roksolana-shendiukh/realtime-flight-pipeline/blob/main/aggregate_gold.py) (Gold Aggregation), [`producer.py.ipynb`](https://github.com/roksolana-shendiukh/realtime-flight-pipeline/blob/main/producer.py.ipynb) (Flight Producer), [`main_streaming.py.ipynb`](https://github.com/roksolana-shendiukh/realtime-flight-pipeline/blob/main/main_streaming.py.ipynb) (Kafka Stream), [`transform_silver.py`](https://github.com/roksolana-shendiukh/realtime-flight-pipeline/blob/main/transform_silver.py) (Silver Transform)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_ingestion["Ingestion"]
  node_producer["Flight Producer<br/>[producer.py.ipynb]"]
  node_config["Kafka Config<br/>[config.py]"]
  node_kafka["Confluent Kafka"]
end

subgraph group_bronze["Bronze Streaming"]
  node_flight_schema["Flight Schema<br/>[schemas.py]"]
  node_streaming["Kafka Stream"]
  node_bronze_table[("Bronze Flights")]
end

subgraph group_refinement["Data Refinement"]
  node_silver_transform["Silver Transform"]
  node_silver_table[("Silver Flights")]
end

subgraph group_analytics["Analytics"]
  node_gold_aggregation["Gold Aggregation<br/>[aggregate_gold.py]"]
  node_gold_metrics[("Fleet Statistics<br/>[aggregate_gold.py]")]
  node_safety_alerts[("Low-Altitude Alerts<br/>[aggregate_gold.py]")]
end

node_opensky(("OpenSky API"))
node_dashboard["Databricks Dashboard"]

node_opensky -->|"provides flight data"| node_producer
node_producer -->|"produces records"| node_kafka
node_config -->|"configures access"| node_kafka
node_kafka -->|"streams records"| node_streaming
node_streaming -->|"writes raw data"| node_bronze_table
node_bronze_table -->|"reads table"| node_silver_transform
node_silver_transform -->|"writes cleaned data"| node_silver_table
node_silver_table -->|"reads table"| node_gold_aggregation
node_gold_aggregation -->|"writes metrics"| node_gold_metrics
node_gold_aggregation -->|"writes alerts"| node_safety_alerts
node_gold_metrics -->|"feeds analytics"| node_dashboard
node_safety_alerts -->|"feeds safety view"| node_dashboard

click node_producer "https://github.com/roksolana-shendiukh/realtime-flight-pipeline/blob/main/producer.py.ipynb"
click node_config "https://github.com/roksolana-shendiukh/realtime-flight-pipeline/blob/main/config.py"
click node_flight_schema "https://github.com/roksolana-shendiukh/realtime-flight-pipeline/blob/main/schemas.py"
click node_streaming "https://github.com/roksolana-shendiukh/realtime-flight-pipeline/blob/main/main_streaming.py.ipynb"
click node_bronze_table "https://github.com/roksolana-shendiukh/realtime-flight-pipeline/blob/main/main_streaming.py.ipynb"
click node_silver_transform "https://github.com/roksolana-shendiukh/realtime-flight-pipeline/blob/main/transform_silver.py"
click node_silver_table "https://github.com/roksolana-shendiukh/realtime-flight-pipeline/blob/main/transform_silver.py"
click node_gold_aggregation "https://github.com/roksolana-shendiukh/realtime-flight-pipeline/blob/main/aggregate_gold.py"
click node_gold_metrics "https://github.com/roksolana-shendiukh/realtime-flight-pipeline/blob/main/aggregate_gold.py"
click node_safety_alerts "https://github.com/roksolana-shendiukh/realtime-flight-pipeline/blob/main/aggregate_gold.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_producer,node_config,node_kafka toneBlue
class node_flight_schema,node_streaming,node_bronze_table toneAmber
class node_silver_transform,node_silver_table,node_opensky toneMint
class node_gold_aggregation,node_gold_metrics,node_safety_alerts toneRose
class node_dashboard toneIndigo
```

## Components

### Ingestion

- [Flight Producer](https://github.com/roksolana-shendiukh/realtime-flight-pipeline/blob/main/producer.py.ipynb): `producer.py.ipynb`
- [Kafka Config](https://github.com/roksolana-shendiukh/realtime-flight-pipeline/blob/main/config.py): `config.py`
- **Confluent Kafka**

### Bronze Streaming

- [Flight Schema](https://github.com/roksolana-shendiukh/realtime-flight-pipeline/blob/main/schemas.py): `schemas.py`
- [Kafka Stream](https://github.com/roksolana-shendiukh/realtime-flight-pipeline/blob/main/main_streaming.py.ipynb): `main_streaming.py.ipynb`
- [Bronze Flights](https://github.com/roksolana-shendiukh/realtime-flight-pipeline/blob/main/main_streaming.py.ipynb): `main_streaming.py.ipynb`

### Data Refinement

- [Silver Transform](https://github.com/roksolana-shendiukh/realtime-flight-pipeline/blob/main/transform_silver.py): `transform_silver.py`
- [Silver Flights](https://github.com/roksolana-shendiukh/realtime-flight-pipeline/blob/main/transform_silver.py): `transform_silver.py`

### Analytics

- [Gold Aggregation](https://github.com/roksolana-shendiukh/realtime-flight-pipeline/blob/main/aggregate_gold.py): `aggregate_gold.py`
- [Fleet Statistics](https://github.com/roksolana-shendiukh/realtime-flight-pipeline/blob/main/aggregate_gold.py): `aggregate_gold.py`
- [Low-Altitude Alerts](https://github.com/roksolana-shendiukh/realtime-flight-pipeline/blob/main/aggregate_gold.py): `aggregate_gold.py`

### Other components

- **OpenSky API**
- **Databricks Dashboard**

## Connections

- OpenSky API → Flight Producer: provides flight data (evidence: `README.md`)
- Flight Producer → Confluent Kafka: produces records (evidence: `README.md`)
- Kafka Config → Confluent Kafka: configures access (evidence: `config.py`)
- Confluent Kafka → Kafka Stream: streams records (evidence: `README.md`)
- Kafka Stream → Bronze Flights: writes raw data (evidence: `README.md`)
- Bronze Flights → Silver Transform: reads table (evidence: `transform_silver.py`)
- Silver Transform → Silver Flights: writes cleaned data (evidence: `transform_silver.py`)
- Silver Flights → Gold Aggregation: reads table (evidence: `aggregate_gold.py`)
- Gold Aggregation → Fleet Statistics: writes metrics (evidence: `aggregate_gold.py`)
- Gold Aggregation → Low-Altitude Alerts: writes alerts (evidence: `aggregate_gold.py`)
- Fleet Statistics → Databricks Dashboard: feeds analytics (evidence: `README.md`)
- Low-Altitude Alerts → Databricks Dashboard: feeds safety view (evidence: `README.md`)
