# amidarkcoder/medallion-orders-pipeline architecture

> Architecture diagram of the GitHub repository amidarkcoder/medallion-orders-pipeline, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-09-30). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/amidarkcoder/medallion-orders-pipeline
- Repository: https://github.com/amidarkcoder/medallion-orders-pipeline

## Overview

This repository implements a scheduled customer-order analytics pipeline: Airflow runs synthetic order generation, incremental bronze ingestion, silver cleanup, and gold aggregation against PostgreSQL. Gold produces sales, logistics, and buyer marts. The Superset configuration indicates a separate dashboarding capability, but the empty README and unsampled deployment files leave its connection to the pipeline unverified.

Main entry points: [`customer_data_pipeline.py`](https://github.com/amidarkcoder/medallion-orders-pipeline/blob/main/customer_data_pipeline.py) (Airflow DAG), [`moke_data.py`](https://github.com/amidarkcoder/medallion-orders-pipeline/blob/main/moke_data.py) (Order Generator), [`raw.py`](https://github.com/amidarkcoder/medallion-orders-pipeline/blob/main/raw.py) (Bronze Ingestion), [`silver.py`](https://github.com/amidarkcoder/medallion-orders-pipeline/blob/main/silver.py) (Silver Cleanup)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_orchestration["Orchestration"]
  node_scheduler["Airflow DAG"]
end

subgraph group_data["Order Data"]
  node_generator["Order Generator<br/>[moke_data.py]"]
  node_postgres[("PostgreSQL")]
end

subgraph group_warehouse["Analytics Warehouse"]
  node_bronze["Bronze Ingestion<br/>[raw.py]"]
  node_silver["Silver Cleanup<br/>[silver.py]"]
  node_gold["Gold Marts<br/>[gold.py]"]
end

subgraph group_visualization["Visualization"]
  node_superset_config["Superset Config<br/>[superset_config.py]"]
  node_superset["Superset"]
end

node_scheduler -->|"runs first"| node_generator
node_scheduler -->|"runs second"| node_bronze
node_scheduler -->|"runs third"| node_silver
node_scheduler -->|"runs fourth"| node_gold
node_generator -->|"writes orders"| node_postgres
node_scheduler -->|"gets connection"| node_postgres
node_bronze -->|"writes bronze"| node_postgres
node_silver -->|"reads bronze; writes silver"| node_postgres
node_gold -->|"reads silver; writes marts"| node_postgres
node_superset_config -.->|"configures"| node_superset

click node_scheduler "https://github.com/amidarkcoder/medallion-orders-pipeline/blob/main/customer_data_pipeline.py"
click node_generator "https://github.com/amidarkcoder/medallion-orders-pipeline/blob/main/moke_data.py"
click node_bronze "https://github.com/amidarkcoder/medallion-orders-pipeline/blob/main/raw.py"
click node_silver "https://github.com/amidarkcoder/medallion-orders-pipeline/blob/main/silver.py"
click node_gold "https://github.com/amidarkcoder/medallion-orders-pipeline/blob/main/gold.py"
click node_superset_config "https://github.com/amidarkcoder/medallion-orders-pipeline/blob/main/superset_config.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_scheduler toneBlue
class node_generator,node_postgres toneAmber
class node_bronze,node_silver,node_gold toneMint
class node_superset_config,node_superset toneRose
```

## Components

### Orchestration

- [Airflow DAG](https://github.com/amidarkcoder/medallion-orders-pipeline/blob/main/customer_data_pipeline.py): `customer_data_pipeline.py`

### Order Data

- [Order Generator](https://github.com/amidarkcoder/medallion-orders-pipeline/blob/main/moke_data.py): `moke_data.py`
- **PostgreSQL**

### Analytics Warehouse

- [Bronze Ingestion](https://github.com/amidarkcoder/medallion-orders-pipeline/blob/main/raw.py): `raw.py`
- [Silver Cleanup](https://github.com/amidarkcoder/medallion-orders-pipeline/blob/main/silver.py): `silver.py`
- [Gold Marts](https://github.com/amidarkcoder/medallion-orders-pipeline/blob/main/gold.py): `gold.py`

### Visualization

- [Superset Config](https://github.com/amidarkcoder/medallion-orders-pipeline/blob/main/superset_config.py): `superset_config.py`
- **Superset**

## Connections

- Airflow DAG → Order Generator: runs first (evidence: `customer_data_pipeline.py`)
- Airflow DAG → Bronze Ingestion: runs second (evidence: `customer_data_pipeline.py`)
- Airflow DAG → Silver Cleanup: runs third (evidence: `customer_data_pipeline.py`)
- Airflow DAG → Gold Marts: runs fourth (evidence: `customer_data_pipeline.py`)
- Order Generator → PostgreSQL: writes orders (evidence: `moke_data.py`)
- Airflow DAG → PostgreSQL: gets connection (evidence: `customer_data_pipeline.py`)
- Bronze Ingestion → PostgreSQL: writes bronze (evidence: `raw.py`)
- Silver Cleanup → PostgreSQL: reads bronze; writes silver (evidence: `silver.py`)
- Gold Marts → PostgreSQL: reads silver; writes marts (evidence: `gold.py`)
- Superset Config → Superset: configures
