# amidarkcoder/predictive-supply-chain-customer-control-tower architecture

> Architecture diagram of the GitHub repository amidarkcoder/predictive-supply-chain-customer-control-tower, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-11-27). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/amidarkcoder/predictive-supply-chain-customer-control-tower
- Repository: https://github.com/amidarkcoder/predictive-supply-chain-customer-control-tower

## Overview

This repository combines a synthetic retail supply-chain data generator with a dbt analytics project. The main workflow is generating monthly raw datasets and reference data, transforming them through bronze, silver, and gold models, then exploring business questions in notebooks. The tree also shows snapshot models and reusable SQL macros. Generator behavior is only partially excerpted, and the README provides no usable architecture details, so dbt-stage relationships are shown as unverified rather than asserted as inspected calls.

Main entry points: [`dbt_susanta/analyses`](https://github.com/amidarkcoder/predictive-supply-chain-customer-control-tower/tree/main/dbt_susanta/analyses) (Analysis notebooks), [`generator/generator_data.py`](https://github.com/amidarkcoder/predictive-supply-chain-customer-control-tower/blob/main/generator/generator_data.py) (Dataset generator), [`dbt_susanta/models/bronze`](https://github.com/amidarkcoder/predictive-supply-chain-customer-control-tower/tree/main/dbt_susanta/models/bronze) (Bronze models), [`dbt_susanta/models/gold`](https://github.com/amidarkcoder/predictive-supply-chain-customer-control-tower/tree/main/dbt_susanta/models/gold) (Gold marts)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_generation["Data generation"]
  node_generator["Dataset generator<br/>[generator_data.py]"]
  node_raw[("Raw datasets")]
end

subgraph group_transform["dbt transformations"]
  node_bronze["Bronze models"]
  node_silver["Silver inventory<br/>[inventory_data.sql]"]
  node_gold["Gold marts"]
  node_macros["SQL macros"]
end

subgraph group_state["Reference and history"]
  node_answers[("Answer-key data")]
  node_snapshots[("Snapshots")]
end

subgraph group_analysis["Analytics"]
  node_notebooks["Analysis notebooks"]
end

node_operator(("Data analyst"))

node_operator -->|"configures run"| node_generator
node_generator -.->|"generates datasets"| node_raw
node_generator -.->|"generates profiles"| node_answers
node_raw -.->|"loads sources"| node_bronze
node_bronze -.->|"refines inventory"| node_silver
node_silver -.->|"feeds marts"| node_gold
node_bronze -.->|"feeds marts"| node_gold
node_gold -.->|"supports analysis"| node_notebooks
node_answers -.->|"benchmarks results"| node_notebooks
node_snapshots -.->|"supports history analysis"| node_notebooks
node_operator -.->|"explores results"| node_notebooks

click node_generator "https://github.com/amidarkcoder/predictive-supply-chain-customer-control-tower/blob/main/generator/generator_data.py"
click node_raw "https://github.com/amidarkcoder/predictive-supply-chain-customer-control-tower/tree/main/dbt_susanta/seeds/raw"
click node_answers "https://github.com/amidarkcoder/predictive-supply-chain-customer-control-tower/tree/main/dbt_susanta/seeds/answer_key"
click node_bronze "https://github.com/amidarkcoder/predictive-supply-chain-customer-control-tower/tree/main/dbt_susanta/models/bronze"
click node_silver "https://github.com/amidarkcoder/predictive-supply-chain-customer-control-tower/blob/main/dbt_susanta/models/silver/inventory_data.sql"
click node_gold "https://github.com/amidarkcoder/predictive-supply-chain-customer-control-tower/tree/main/dbt_susanta/models/gold"
click node_snapshots "https://github.com/amidarkcoder/predictive-supply-chain-customer-control-tower/tree/main/dbt_susanta/snapshots"
click node_macros "https://github.com/amidarkcoder/predictive-supply-chain-customer-control-tower/tree/main/dbt_susanta/macros"
click node_notebooks "https://github.com/amidarkcoder/predictive-supply-chain-customer-control-tower/tree/main/dbt_susanta/analyses"

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_generator,node_raw toneBlue
class node_bronze,node_silver,node_gold,node_macros toneAmber
class node_answers,node_snapshots toneMint
class node_notebooks toneRose
class node_operator toneIndigo
```

## Components

### Data generation

- [Dataset generator](https://github.com/amidarkcoder/predictive-supply-chain-customer-control-tower/blob/main/generator/generator_data.py): `generator/generator_data.py`
- [Raw datasets](https://github.com/amidarkcoder/predictive-supply-chain-customer-control-tower/tree/main/dbt_susanta/seeds/raw): `dbt_susanta/seeds/raw`

### dbt transformations

- [Bronze models](https://github.com/amidarkcoder/predictive-supply-chain-customer-control-tower/tree/main/dbt_susanta/models/bronze): `dbt_susanta/models/bronze`
- [Silver inventory](https://github.com/amidarkcoder/predictive-supply-chain-customer-control-tower/blob/main/dbt_susanta/models/silver/inventory_data.sql): `dbt_susanta/models/silver/inventory_data.sql`
- [Gold marts](https://github.com/amidarkcoder/predictive-supply-chain-customer-control-tower/tree/main/dbt_susanta/models/gold): `dbt_susanta/models/gold`
- [SQL macros](https://github.com/amidarkcoder/predictive-supply-chain-customer-control-tower/tree/main/dbt_susanta/macros): `dbt_susanta/macros`

### Reference and history

- [Answer-key data](https://github.com/amidarkcoder/predictive-supply-chain-customer-control-tower/tree/main/dbt_susanta/seeds/answer_key): `dbt_susanta/seeds/answer_key`
- [Snapshots](https://github.com/amidarkcoder/predictive-supply-chain-customer-control-tower/tree/main/dbt_susanta/snapshots): `dbt_susanta/snapshots`

### Analytics

- [Analysis notebooks](https://github.com/amidarkcoder/predictive-supply-chain-customer-control-tower/tree/main/dbt_susanta/analyses): `dbt_susanta/analyses`

### Other components

- **Data analyst**

## Connections

- Data analyst → Dataset generator: configures run (evidence: `generator/generator_data.py`)
- Dataset generator → Raw datasets: generates datasets
- Dataset generator → Answer-key data: generates profiles
- Raw datasets → Bronze models: loads sources
- Bronze models → Silver inventory: refines inventory
- Silver inventory → Gold marts: feeds marts
- Bronze models → Gold marts: feeds marts
- Gold marts → Analysis notebooks: supports analysis
- Answer-key data → Analysis notebooks: benchmarks results
- Snapshots → Analysis notebooks: supports history analysis
- Data analyst → Analysis notebooks: explores results
