# imshoaibarshad/ibm-data-engineering-capstone architecture

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

- Interactive diagram: https://gitdiagram.com/imshoaibarshad/ibm-data-engineering-capstone
- Repository: https://github.com/imshoaibarshad/ibm-data-engineering-capstone

## Overview

UK Retail Analytics is a local data platform that ingests four heterogeneous sources, stages and validates them, loads a DuckDB star-schema warehouse, then produces business marts and a dashboard. The principal workflow is driven by the pipeline DAG; the CLI also exposes individual stages and status/quality operations. The README documents the broader product flow, while sampled source and index references support only selected internal call relationships.

Main entry points: [`src/retailde/pipeline.py`](https://github.com/imshoaibarshad/ibm-data-engineering-capstone/blob/main/src/retailde/pipeline.py) (Pipeline DAG), [`src/retailde/extract`](https://github.com/imshoaibarshad/ibm-data-engineering-capstone/tree/main/src/retailde/extract) (Source extraction), [`data/staging`](https://github.com/imshoaibarshad/ibm-data-engineering-capstone/tree/main/data/staging) (Staged Parquet), [`data/raw`](https://github.com/imshoaibarshad/ibm-data-engineering-capstone/tree/main/data/raw) (Raw archive)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_entry["Entry and orchestration"]
  node_cli["CLI<br/>[cli.py]"]
  node_config["Configuration<br/>[config.py]"]
  node_pipeline["Pipeline DAG<br/>[pipeline.py]"]
  node_runner["DAG runner<br/>[orchestrator.py]"]
end

subgraph group_ingest["Ingestion and staging"]
  node_extract["Source extraction"]
  node_manifest["Fetch provenance<br/>[manifest.py]"]
  node_raw[("Raw archive")]
  node_transactions["Transaction staging<br/>[transactions.py]"]
  node_weather["Weather staging<br/>[weather.py]"]
  node_fx["FX staging<br/>[fx.py]"]
  node_bankrate["Bank-rate staging<br/>[bank_rate.py]"]
  node_staging[("Staged Parquet")]
end

subgraph group_quality["Data quality"]
  node_quality["Quality gates<br/>[checks.py]"]
end

subgraph group_warehouse["Warehouse and marts"]
  node_warehouse["Star-schema loader<br/>[load.py]"]
  node_schema["Warehouse schema<br/>[schema.py]"]
  node_duckdb[("DuckDB warehouse")]
  node_marts["Business marts<br/>[build.py]"]
  node_martfiles[("Mart Parquet")]
end

subgraph group_reporting["Reporting"]
  node_dashboard["Dashboard reporting<br/>[dashboard.py]"]
  node_reports["Reports"]
end

node_user(("Engineer"))
node_uci["UCI retail workbook"]
node_meteo["Open-Meteo"]
node_ecb["Frankfurter / ECB"]
node_boe["Bank of England"]

node_user -->|"runs commands"| node_cli
node_cli -->|"loads settings"| node_config
node_cli -->|"starts pipeline"| node_pipeline
node_pipeline -->|"executes tasks"| node_runner
node_pipeline -->|"schedules fetches"| node_extract
node_pipeline -->|"schedules staging"| node_transactions
node_pipeline -->|"schedules staging"| node_weather
node_pipeline -->|"schedules staging"| node_fx
node_pipeline -->|"schedules staging"| node_bankrate
node_pipeline -->|"runs gates"| node_quality
node_pipeline -->|"schedules load"| node_warehouse
node_pipeline -->|"builds marts"| node_marts
node_pipeline -->|"publishes report"| node_dashboard
node_extract -->|"fetches"| node_uci
node_extract -->|"fetches"| node_meteo
node_extract -->|"fetches"| node_ecb
node_extract -->|"fetches"| node_boe
node_extract -->|"lands bytes"| node_raw
node_extract -->|"records provenance"| node_manifest
node_transactions -->|"reads workbook"| node_raw
node_weather -->|"reads raw data"| node_raw
node_fx -->|"reads raw data"| node_raw
node_bankrate -->|"reads HTML"| node_raw
node_transactions -->|"writes Parquet"| node_staging
node_weather -->|"writes Parquet"| node_staging
node_fx -->|"writes Parquet"| node_staging
node_bankrate -->|"writes Parquet"| node_staging
node_quality -->|"checks staged data"| node_staging
node_quality -->|"checks provenance"| node_manifest
node_warehouse -->|"loads Parquet"| node_staging
node_warehouse -->|"creates schema"| node_schema
node_warehouse -->|"writes tables"| node_duckdb
node_quality -->|"checks integrity"| node_duckdb
node_marts -->|"queries warehouse"| node_duckdb
node_marts -->|"exports Parquet"| node_martfiles
node_dashboard -->|"publishes outputs"| node_reports

click node_cli "https://github.com/imshoaibarshad/ibm-data-engineering-capstone/blob/main/src/retailde/cli.py"
click node_config "https://github.com/imshoaibarshad/ibm-data-engineering-capstone/blob/main/src/retailde/config.py"
click node_pipeline "https://github.com/imshoaibarshad/ibm-data-engineering-capstone/blob/main/src/retailde/pipeline.py"
click node_runner "https://github.com/imshoaibarshad/ibm-data-engineering-capstone/blob/main/src/retailde/orchestrator.py"
click node_extract "https://github.com/imshoaibarshad/ibm-data-engineering-capstone/tree/main/src/retailde/extract"
click node_manifest "https://github.com/imshoaibarshad/ibm-data-engineering-capstone/blob/main/src/retailde/manifest.py"
click node_raw "https://github.com/imshoaibarshad/ibm-data-engineering-capstone/tree/main/data/raw"
click node_transactions "https://github.com/imshoaibarshad/ibm-data-engineering-capstone/blob/main/src/retailde/transform/transactions.py"
click node_weather "https://github.com/imshoaibarshad/ibm-data-engineering-capstone/blob/main/src/retailde/transform/weather.py"
click node_fx "https://github.com/imshoaibarshad/ibm-data-engineering-capstone/blob/main/src/retailde/transform/fx.py"
click node_bankrate "https://github.com/imshoaibarshad/ibm-data-engineering-capstone/blob/main/src/retailde/transform/bank_rate.py"
click node_staging "https://github.com/imshoaibarshad/ibm-data-engineering-capstone/tree/main/data/staging"
click node_quality "https://github.com/imshoaibarshad/ibm-data-engineering-capstone/blob/main/src/retailde/quality/checks.py"
click node_warehouse "https://github.com/imshoaibarshad/ibm-data-engineering-capstone/blob/main/src/retailde/warehouse/load.py"
click node_schema "https://github.com/imshoaibarshad/ibm-data-engineering-capstone/blob/main/src/retailde/warehouse/schema.py"
click node_duckdb "https://github.com/imshoaibarshad/ibm-data-engineering-capstone/tree/main/data/warehouse"
click node_marts "https://github.com/imshoaibarshad/ibm-data-engineering-capstone/blob/main/src/retailde/marts/build.py"
click node_martfiles "https://github.com/imshoaibarshad/ibm-data-engineering-capstone/tree/main/data/marts"
click node_dashboard "https://github.com/imshoaibarshad/ibm-data-engineering-capstone/blob/main/src/retailde/report/dashboard.py"
click node_reports "https://github.com/imshoaibarshad/ibm-data-engineering-capstone/tree/main/data/reports"

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_cli,node_config,node_pipeline,node_runner toneBlue
class node_extract,node_manifest,node_raw,node_transactions,node_weather,node_fx,node_bankrate,node_staging toneAmber
class node_quality toneMint
class node_warehouse,node_schema,node_duckdb,node_marts,node_martfiles toneRose
class node_dashboard,node_reports,node_user,node_uci,node_meteo,node_ecb,node_boe toneIndigo
```

## Components

### Entry and orchestration

- [CLI](https://github.com/imshoaibarshad/ibm-data-engineering-capstone/blob/main/src/retailde/cli.py): `src/retailde/cli.py`
- [Configuration](https://github.com/imshoaibarshad/ibm-data-engineering-capstone/blob/main/src/retailde/config.py): `src/retailde/config.py`
- [Pipeline DAG](https://github.com/imshoaibarshad/ibm-data-engineering-capstone/blob/main/src/retailde/pipeline.py): `src/retailde/pipeline.py`
- [DAG runner](https://github.com/imshoaibarshad/ibm-data-engineering-capstone/blob/main/src/retailde/orchestrator.py): `src/retailde/orchestrator.py`

### Ingestion and staging

- [Source extraction](https://github.com/imshoaibarshad/ibm-data-engineering-capstone/tree/main/src/retailde/extract): `src/retailde/extract`
- [Fetch provenance](https://github.com/imshoaibarshad/ibm-data-engineering-capstone/blob/main/src/retailde/manifest.py): `src/retailde/manifest.py`
- [Raw archive](https://github.com/imshoaibarshad/ibm-data-engineering-capstone/tree/main/data/raw): `data/raw`
- [Transaction staging](https://github.com/imshoaibarshad/ibm-data-engineering-capstone/blob/main/src/retailde/transform/transactions.py): `src/retailde/transform/transactions.py`
- [Weather staging](https://github.com/imshoaibarshad/ibm-data-engineering-capstone/blob/main/src/retailde/transform/weather.py): `src/retailde/transform/weather.py`
- [FX staging](https://github.com/imshoaibarshad/ibm-data-engineering-capstone/blob/main/src/retailde/transform/fx.py): `src/retailde/transform/fx.py`
- [Bank-rate staging](https://github.com/imshoaibarshad/ibm-data-engineering-capstone/blob/main/src/retailde/transform/bank_rate.py): `src/retailde/transform/bank_rate.py`
- [Staged Parquet](https://github.com/imshoaibarshad/ibm-data-engineering-capstone/tree/main/data/staging): `data/staging`

### Data quality

- [Quality gates](https://github.com/imshoaibarshad/ibm-data-engineering-capstone/blob/main/src/retailde/quality/checks.py): `src/retailde/quality/checks.py`

### Warehouse and marts

- [Star-schema loader](https://github.com/imshoaibarshad/ibm-data-engineering-capstone/blob/main/src/retailde/warehouse/load.py): `src/retailde/warehouse/load.py`
- [Warehouse schema](https://github.com/imshoaibarshad/ibm-data-engineering-capstone/blob/main/src/retailde/warehouse/schema.py): `src/retailde/warehouse/schema.py`
- [DuckDB warehouse](https://github.com/imshoaibarshad/ibm-data-engineering-capstone/tree/main/data/warehouse): `data/warehouse`
- [Business marts](https://github.com/imshoaibarshad/ibm-data-engineering-capstone/blob/main/src/retailde/marts/build.py): `src/retailde/marts/build.py`
- [Mart Parquet](https://github.com/imshoaibarshad/ibm-data-engineering-capstone/tree/main/data/marts): `data/marts`

### Reporting

- [Dashboard reporting](https://github.com/imshoaibarshad/ibm-data-engineering-capstone/blob/main/src/retailde/report/dashboard.py): `src/retailde/report/dashboard.py`
- [Reports](https://github.com/imshoaibarshad/ibm-data-engineering-capstone/tree/main/data/reports): `data/reports`

### Other components

- **Engineer**
- **UCI retail workbook**
- **Open-Meteo**
- **Frankfurter / ECB**
- **Bank of England**

## Connections

- Engineer → CLI: runs commands (evidence: `README.md`)
- CLI → Configuration: loads settings (evidence: `src/retailde/cli.py`)
- CLI → Pipeline DAG: starts pipeline (evidence: `src/retailde/cli.py`)
- Pipeline DAG → DAG runner: executes tasks (evidence: `src/retailde/pipeline.py`)
- Pipeline DAG → Source extraction: schedules fetches (evidence: `src/retailde/pipeline.py`)
- Pipeline DAG → Transaction staging: schedules staging (evidence: `src/retailde/pipeline.py`)
- Pipeline DAG → Weather staging: schedules staging (evidence: `src/retailde/pipeline.py`)
- Pipeline DAG → FX staging: schedules staging (evidence: `src/retailde/pipeline.py`)
- Pipeline DAG → Bank-rate staging: schedules staging (evidence: `src/retailde/pipeline.py`)
- Pipeline DAG → Quality gates: runs gates (evidence: `src/retailde/pipeline.py`)
- Pipeline DAG → Star-schema loader: schedules load (evidence: `src/retailde/pipeline.py`)
- Pipeline DAG → Business marts: builds marts (evidence: `README.md`)
- Pipeline DAG → Dashboard reporting: publishes report (evidence: `README.md`)
- Source extraction → UCI retail workbook: fetches (evidence: `README.md`)
- Source extraction → Open-Meteo: fetches (evidence: `README.md`)
- Source extraction → Frankfurter / ECB: fetches (evidence: `README.md`)
- Source extraction → Bank of England: fetches (evidence: `README.md`)
- Source extraction → Raw archive: lands bytes (evidence: `README.md`)
- Source extraction → Fetch provenance: records provenance (evidence: `src/retailde/extract/__init__.py`)
- Transaction staging → Raw archive: reads workbook (evidence: `README.md`)
- Weather staging → Raw archive: reads raw data (evidence: `README.md`)
- FX staging → Raw archive: reads raw data (evidence: `README.md`)
- Bank-rate staging → Raw archive: reads HTML (evidence: `src/retailde/transform/bank_rate.py`)
- Transaction staging → Staged Parquet: writes Parquet (evidence: `src/retailde/transform/transactions.py`)
- Weather staging → Staged Parquet: writes Parquet (evidence: `README.md`)
- FX staging → Staged Parquet: writes Parquet (evidence: `README.md`)
- Bank-rate staging → Staged Parquet: writes Parquet (evidence: `src/retailde/transform/bank_rate.py`)
- Quality gates → Staged Parquet: checks staged data (evidence: `README.md`)
- Quality gates → Fetch provenance: checks provenance (evidence: `src/retailde/quality/checks.py`)
- Star-schema loader → Staged Parquet: loads Parquet (evidence: `README.md`)
- Star-schema loader → Warehouse schema: creates schema (evidence: `src/retailde/warehouse/load.py`)
- Star-schema loader → DuckDB warehouse: writes tables (evidence: `README.md`)
- Quality gates → DuckDB warehouse: checks integrity (evidence: `README.md`)
- Business marts → DuckDB warehouse: queries warehouse (evidence: `src/retailde/marts/build.py`)
- Business marts → Mart Parquet: exports Parquet (evidence: `src/retailde/marts/build.py`)
- Dashboard reporting → Reports: publishes outputs (evidence: `README.md`)
