# islamhasib953/retailpulse-enterprise-data-platform-edp- architecture

> Architecture diagram of the GitHub repository islamhasib953/retailpulse-enterprise-data-platform-edp-, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-11). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/islamhasib953/retailpulse-enterprise-data-platform-edp-
- Repository: https://github.com/islamhasib953/retailpulse-enterprise-data-platform-edp-

## Overview

RetailPulse is an e-commerce data platform with parallel historical-batch and real-time-streaming workflows. Batch ingestion lands external sales and currency data in MinIO; Spark transforms it through Bronze, Silver, and Gold before loading PostgreSQL. Separately, generated orders flow through Kafka and Spark to Elasticsearch and a raw MinIO lake; Airflow later loads lake records into PostgreSQL, where dbt unifies live and batch sales. Kibana and Grafana provide search and dashboards. The README documents these integrations; some orchestration and visualization wiring is documented rather than visible in sampled application source.

Main entry points: [`src/processing/batch_processing.py`](https://github.com/islamhasib953/retailpulse-enterprise-data-platform-edp-/blob/main/src/processing/batch_processing.py) (Spark batch), [`src/processing/stream_processing.py`](https://github.com/islamhasib953/retailpulse-enterprise-data-platform-edp-/blob/main/src/processing/stream_processing.py) (Spark streaming), [`dbt_project/models`](https://github.com/islamhasib953/retailpulse-enterprise-data-platform-edp-/tree/main/dbt_project/models) (dbt models), [`src/ingestion/batch_ingest.py`](https://github.com/islamhasib953/retailpulse-enterprise-data-platform-edp-/blob/main/src/ingestion/batch_ingest.py) (Bronze ingestion)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_batch["Batch analytics"]
  node_batch_dag["Batch schedule<br/>[batch_pipeline.py]"]
  node_batch_ingest["Bronze ingestion<br/>[batch_ingest.py]"]
  node_batch_process["Spark batch"]
  node_minio[("MinIO data lake<br/>[minio_client.py]")]
  node_silver_gold["Silver and Gold models"]
end

subgraph group_stream["Live orders"]
  node_stream_producer["Order generator<br/>[stream_producer.py]"]
  node_kafka["Kafka topic"]
  node_stream_process["Spark streaming"]
  node_raw_lake[("Raw order lake")]
end

subgraph group_warehouse["Warehouse and orchestration"]
  node_daily_dag["Lake load schedule"]
  node_dbt_dag["Analytics schedule<br/>[dbt_pipeline.py]"]
  node_dbt_models["dbt models"]
  node_warehouse_db[("PostgreSQL warehouse")]
  node_unified_fact[("Unified sales fact")]
  node_dimensions[("Analytics dimensions")]
end

subgraph group_search["Search and dashboards"]
  node_elasticsearch[("Elasticsearch")]
  node_es_index["Search index setup<br/>[es_setup.py]"]
  node_search_demo["Order search<br/>[es_search_demo.py]"]
  node_kibana["Kibana discovery"]
  node_grafana["Grafana dashboards"]
end

subgraph group_config["Shared configuration"]
  node_settings["Runtime settings<br/>[settings.py]"]
end

node_sales_source(("Sales and FX APIs"))

node_batch_dag -->|"runs ingestion"| node_batch_ingest
node_batch_dag -->|"runs processing"| node_batch_process
node_sales_source -->|"provides source data"| node_batch_ingest
node_batch_ingest -->|"uploads Bronze"| node_minio
node_batch_process -->|"reads Bronze"| node_minio
node_batch_process -->|"transforms data"| node_silver_gold
node_silver_gold -->|"writes parquet"| node_minio
node_batch_process -->|"loads fact sales"| node_warehouse_db
node_stream_producer -->|"publishes orders"| node_kafka
node_kafka -->|"streams messages"| node_stream_process
node_stream_process -->|"indexes orders"| node_elasticsearch
node_stream_process -->|"writes raw JSON"| node_raw_lake
node_daily_dag -->|"reads lake files"| node_raw_lake
node_daily_dag -->|"inserts raw orders"| node_warehouse_db
node_dbt_dag -->|"waits for load"| node_daily_dag
node_dbt_dag -->|"waits for batch"| node_batch_dag
node_dbt_dag -->|"runs models"| node_dbt_models
node_dbt_models -->|"transforms tables"| node_warehouse_db
node_dbt_models -->|"builds unified fact"| node_unified_fact
node_dbt_models -->|"builds dimensions"| node_dimensions
node_elasticsearch -->|"serves discovery"| node_kibana
node_warehouse_db -->|"serves dashboards"| node_grafana
node_elasticsearch -->|"answers searches"| node_search_demo
node_es_index -->|"creates index"| node_elasticsearch
node_batch_ingest -->|"loads endpoints"| node_settings
node_stream_producer -->|"loads broker config"| node_settings
node_stream_process -->|"loads stream config"| node_settings

click node_batch_dag "https://github.com/islamhasib953/retailpulse-enterprise-data-platform-edp-/blob/main/dags/batch_pipeline.py"
click node_batch_ingest "https://github.com/islamhasib953/retailpulse-enterprise-data-platform-edp-/blob/main/src/ingestion/batch_ingest.py"
click node_batch_process "https://github.com/islamhasib953/retailpulse-enterprise-data-platform-edp-/blob/main/src/processing/batch_processing.py"
click node_stream_producer "https://github.com/islamhasib953/retailpulse-enterprise-data-platform-edp-/blob/main/src/ingestion/stream_producer.py"
click node_stream_process "https://github.com/islamhasib953/retailpulse-enterprise-data-platform-edp-/blob/main/src/processing/stream_processing.py"
click node_daily_dag "https://github.com/islamhasib953/retailpulse-enterprise-data-platform-edp-/blob/main/dags/daily_lake_to_dwh.py"
click node_dbt_dag "https://github.com/islamhasib953/retailpulse-enterprise-data-platform-edp-/blob/main/dags/dbt_pipeline.py"
click node_dbt_models "https://github.com/islamhasib953/retailpulse-enterprise-data-platform-edp-/tree/main/dbt_project/models"
click node_minio "https://github.com/islamhasib953/retailpulse-enterprise-data-platform-edp-/blob/main/src/core/minio_client.py"
click node_silver_gold "https://github.com/islamhasib953/retailpulse-enterprise-data-platform-edp-/blob/main/src/processing/batch_processing.py"
click node_unified_fact "https://github.com/islamhasib953/retailpulse-enterprise-data-platform-edp-/blob/main/dbt_project/models/fact_sales_unified.sql"
click node_dimensions "https://github.com/islamhasib953/retailpulse-enterprise-data-platform-edp-/blob/main/dbt_project/models/dim_top_countries.sql"
click node_es_index "https://github.com/islamhasib953/retailpulse-enterprise-data-platform-edp-/blob/main/src/core/es_setup.py"
click node_search_demo "https://github.com/islamhasib953/retailpulse-enterprise-data-platform-edp-/blob/main/src/core/es_search_demo.py"
click node_grafana "https://github.com/islamhasib953/retailpulse-enterprise-data-platform-edp-/tree/main/grafana/provisioning"
click node_settings "https://github.com/islamhasib953/retailpulse-enterprise-data-platform-edp-/blob/main/src/config/settings.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_batch_dag,node_batch_ingest,node_batch_process,node_minio,node_silver_gold toneBlue
class node_stream_producer,node_kafka,node_stream_process,node_raw_lake toneAmber
class node_daily_dag,node_dbt_dag,node_dbt_models,node_warehouse_db,node_unified_fact,node_dimensions,node_sales_source toneMint
class node_elasticsearch,node_es_index,node_search_demo,node_kibana,node_grafana toneRose
class node_settings toneIndigo
```

## Components

### Batch analytics

- [Batch schedule](https://github.com/islamhasib953/retailpulse-enterprise-data-platform-edp-/blob/main/dags/batch_pipeline.py): `dags/batch_pipeline.py`
- [Bronze ingestion](https://github.com/islamhasib953/retailpulse-enterprise-data-platform-edp-/blob/main/src/ingestion/batch_ingest.py): `src/ingestion/batch_ingest.py`
- [Spark batch](https://github.com/islamhasib953/retailpulse-enterprise-data-platform-edp-/blob/main/src/processing/batch_processing.py): `src/processing/batch_processing.py`
- [MinIO data lake](https://github.com/islamhasib953/retailpulse-enterprise-data-platform-edp-/blob/main/src/core/minio_client.py): `src/core/minio_client.py`
- [Silver and Gold models](https://github.com/islamhasib953/retailpulse-enterprise-data-platform-edp-/blob/main/src/processing/batch_processing.py): `src/processing/batch_processing.py`

### Live orders

- [Order generator](https://github.com/islamhasib953/retailpulse-enterprise-data-platform-edp-/blob/main/src/ingestion/stream_producer.py): `src/ingestion/stream_producer.py`
- **Kafka topic**
- [Spark streaming](https://github.com/islamhasib953/retailpulse-enterprise-data-platform-edp-/blob/main/src/processing/stream_processing.py): `src/processing/stream_processing.py`
- **Raw order lake**

### Warehouse and orchestration

- [Lake load schedule](https://github.com/islamhasib953/retailpulse-enterprise-data-platform-edp-/blob/main/dags/daily_lake_to_dwh.py): `dags/daily_lake_to_dwh.py`
- [Analytics schedule](https://github.com/islamhasib953/retailpulse-enterprise-data-platform-edp-/blob/main/dags/dbt_pipeline.py): `dags/dbt_pipeline.py`
- [dbt models](https://github.com/islamhasib953/retailpulse-enterprise-data-platform-edp-/tree/main/dbt_project/models): `dbt_project/models`
- **PostgreSQL warehouse**
- [Unified sales fact](https://github.com/islamhasib953/retailpulse-enterprise-data-platform-edp-/blob/main/dbt_project/models/fact_sales_unified.sql): `dbt_project/models/fact_sales_unified.sql`
- [Analytics dimensions](https://github.com/islamhasib953/retailpulse-enterprise-data-platform-edp-/blob/main/dbt_project/models/dim_top_countries.sql): `dbt_project/models/dim_top_countries.sql`

### Search and dashboards

- **Elasticsearch**
- [Search index setup](https://github.com/islamhasib953/retailpulse-enterprise-data-platform-edp-/blob/main/src/core/es_setup.py): `src/core/es_setup.py`
- [Order search](https://github.com/islamhasib953/retailpulse-enterprise-data-platform-edp-/blob/main/src/core/es_search_demo.py): `src/core/es_search_demo.py`
- **Kibana discovery**
- [Grafana dashboards](https://github.com/islamhasib953/retailpulse-enterprise-data-platform-edp-/tree/main/grafana/provisioning): `grafana/provisioning`

### Shared configuration

- [Runtime settings](https://github.com/islamhasib953/retailpulse-enterprise-data-platform-edp-/blob/main/src/config/settings.py): `src/config/settings.py`

### Other components

- **Sales and FX APIs**

## Connections

- Batch schedule → Bronze ingestion: runs ingestion (evidence: `dags/batch_pipeline.py`)
- Batch schedule → Spark batch: runs processing (evidence: `dags/batch_pipeline.py`)
- Sales and FX APIs → Bronze ingestion: provides source data (evidence: `README.md`)
- Bronze ingestion → MinIO data lake: uploads Bronze (evidence: `src/ingestion/batch_ingest.py`)
- Spark batch → MinIO data lake: reads Bronze (evidence: `src/processing/batch_processing.py`)
- Spark batch → Silver and Gold models: transforms data (evidence: `src/processing/batch_processing.py`)
- Silver and Gold models → MinIO data lake: writes parquet (evidence: `src/processing/batch_processing.py`)
- Spark batch → PostgreSQL warehouse: loads fact sales (evidence: `src/processing/batch_processing.py`)
- Order generator → Kafka topic: publishes orders (evidence: `src/ingestion/stream_producer.py`)
- Kafka topic → Spark streaming: streams messages (evidence: `src/processing/stream_processing.py`)
- Spark streaming → Elasticsearch: indexes orders (evidence: `src/processing/stream_processing.py`)
- Spark streaming → Raw order lake: writes raw JSON (evidence: `src/processing/stream_processing.py`)
- Lake load schedule → Raw order lake: reads lake files (evidence: `dags/daily_lake_to_dwh.py`)
- Lake load schedule → PostgreSQL warehouse: inserts raw orders (evidence: `dags/daily_lake_to_dwh.py`)
- Analytics schedule → Lake load schedule: waits for load (evidence: `dags/dbt_pipeline.py`)
- Analytics schedule → Batch schedule: waits for batch (evidence: `dags/dbt_pipeline.py`)
- Analytics schedule → dbt models: runs models (evidence: `dags/dbt_pipeline.py`)
- dbt models → PostgreSQL warehouse: transforms tables (evidence: `README.md`)
- dbt models → Unified sales fact: builds unified fact (evidence: `README.md`)
- dbt models → Analytics dimensions: builds dimensions (evidence: `README.md`)
- Elasticsearch → Kibana discovery: serves discovery (evidence: `README.md`)
- PostgreSQL warehouse → Grafana dashboards: serves dashboards (evidence: `README.md`)
- Elasticsearch → Order search: answers searches (evidence: `src/core/es_search_demo.py`)
- Search index setup → Elasticsearch: creates index (evidence: `src/core/es_setup.py`)
- Bronze ingestion → Runtime settings: loads endpoints (evidence: `src/ingestion/batch_ingest.py`)
- Order generator → Runtime settings: loads broker config (evidence: `src/ingestion/stream_producer.py`)
- Spark streaming → Runtime settings: loads stream config (evidence: `src/processing/stream_processing.py`)
