# rajnityanand/dukaan-ai architecture

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

- Interactive diagram: https://gitdiagram.com/rajnityanand/dukaan-ai
- Repository: https://github.com/rajnityanand/dukaan-ai

## Overview

DukaanAI is an early-stage retail intelligence project: its documented workflow runs from auditing and preparing inventory data through analysis, feature engineering, baseline modeling, evaluation, and eventual dashboard presentation. The Streamlit app is currently an overview prototype; forecasting, segmentation, inventory insights, and the ML Lab are documented as planned areas, not implemented pages. The reusable pipeline modules are present but empty in the supplied excerpts, so their runtime connections cannot be verified. Edges below reflect README-documented workflow only.

Main entry points: [`app/app.py`](https://github.com/rajnityanand/dukaan-ai/blob/main/app/app.py) (Overview prototype), [`src/dukaanai/models/evaluate.py`](https://github.com/rajnityanand/dukaan-ai/blob/main/src/dukaanai/models/evaluate.py) (Model evaluation), [`notebooks/01_data_audit.ipynb`](https://github.com/rajnityanand/dukaan-ai/blob/main/notebooks/01_data_audit.ipynb) (Data audit), [`notebooks/02_data_cleaning.ipynb`](https://github.com/rajnityanand/dukaan-ai/blob/main/notebooks/02_data_cleaning.ipynb) (Data cleaning)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_data["Data workflow"]
  node_audit["Data audit"]
  node_clean["Data cleaning"]
  node_explore["Exploratory analysis<br/>[03_eda.ipynb]"]
end

subgraph group_modeling["Modeling"]
  node_features["Feature engineering<br/>[build_features.py]"]
  node_train["Baseline training<br/>[train.py]"]
  node_predict["Prediction<br/>[predict.py]"]
  node_evaluate["Model evaluation<br/>[evaluate.py]"]
end

subgraph group_product["Dashboard and insights"]
  node_overview["Overview prototype<br/>[app.py]"]
  node_forecast["Demand forecasting<br/>[app.py]"]
  node_segmentation["Product segmentation<br/>[app.py]"]
  node_inventory["Inventory insights<br/>[app.py]"]
  node_ml_lab["ML Lab<br/>[app.py]"]
end

node_analyst(("Project user"))

node_analyst -->|"audits data"| node_audit
node_audit -->|"precedes cleaning"| node_clean
node_clean -->|"precedes analysis"| node_explore
node_explore -->|"precedes engineering"| node_features
node_features -->|"precedes modeling"| node_train
node_train -->|"precedes evaluation"| node_evaluate
node_evaluate -.->|"integrates outputs"| node_overview
node_analyst -->|"views overview"| node_overview
node_overview -->|"references planned page"| node_forecast
node_overview -->|"references planned page"| node_segmentation
node_overview -->|"references planned page"| node_inventory
node_overview -->|"references planned page"| node_ml_lab
node_evaluate -.->|"planned experiment review"| node_ml_lab
node_predict -.->|"planned forecast display"| node_forecast

click node_audit "https://github.com/rajnityanand/dukaan-ai/blob/main/notebooks/01_data_audit.ipynb"
click node_clean "https://github.com/rajnityanand/dukaan-ai/blob/main/notebooks/02_data_cleaning.ipynb"
click node_explore "https://github.com/rajnityanand/dukaan-ai/blob/main/notebooks/03_eda.ipynb"
click node_features "https://github.com/rajnityanand/dukaan-ai/blob/main/src/dukaanai/features/build_features.py"
click node_train "https://github.com/rajnityanand/dukaan-ai/blob/main/src/dukaanai/models/train.py"
click node_predict "https://github.com/rajnityanand/dukaan-ai/blob/main/src/dukaanai/models/predict.py"
click node_evaluate "https://github.com/rajnityanand/dukaan-ai/blob/main/src/dukaanai/models/evaluate.py"
click node_overview "https://github.com/rajnityanand/dukaan-ai/blob/main/app/app.py"
click node_forecast "https://github.com/rajnityanand/dukaan-ai/blob/main/app/app.py"
click node_segmentation "https://github.com/rajnityanand/dukaan-ai/blob/main/app/app.py"
click node_inventory "https://github.com/rajnityanand/dukaan-ai/blob/main/app/app.py"
click node_ml_lab "https://github.com/rajnityanand/dukaan-ai/blob/main/app/app.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_audit,node_clean,node_explore,node_analyst toneBlue
class node_features,node_train,node_predict,node_evaluate toneAmber
class node_overview,node_forecast,node_segmentation,node_inventory,node_ml_lab toneMint
```

## Components

### Data workflow

- [Data audit](https://github.com/rajnityanand/dukaan-ai/blob/main/notebooks/01_data_audit.ipynb): `notebooks/01_data_audit.ipynb`
- [Data cleaning](https://github.com/rajnityanand/dukaan-ai/blob/main/notebooks/02_data_cleaning.ipynb): `notebooks/02_data_cleaning.ipynb`
- [Exploratory analysis](https://github.com/rajnityanand/dukaan-ai/blob/main/notebooks/03_eda.ipynb): `notebooks/03_eda.ipynb`

### Modeling

- [Feature engineering](https://github.com/rajnityanand/dukaan-ai/blob/main/src/dukaanai/features/build_features.py): `src/dukaanai/features/build_features.py`
- [Baseline training](https://github.com/rajnityanand/dukaan-ai/blob/main/src/dukaanai/models/train.py): `src/dukaanai/models/train.py`
- [Prediction](https://github.com/rajnityanand/dukaan-ai/blob/main/src/dukaanai/models/predict.py): `src/dukaanai/models/predict.py`
- [Model evaluation](https://github.com/rajnityanand/dukaan-ai/blob/main/src/dukaanai/models/evaluate.py): `src/dukaanai/models/evaluate.py`

### Dashboard and insights

- [Overview prototype](https://github.com/rajnityanand/dukaan-ai/blob/main/app/app.py): `app/app.py`
- [Demand forecasting](https://github.com/rajnityanand/dukaan-ai/blob/main/app/app.py): `app/app.py`
- [Product segmentation](https://github.com/rajnityanand/dukaan-ai/blob/main/app/app.py): `app/app.py`
- [Inventory insights](https://github.com/rajnityanand/dukaan-ai/blob/main/app/app.py): `app/app.py`
- [ML Lab](https://github.com/rajnityanand/dukaan-ai/blob/main/app/app.py): `app/app.py`

### Other components

- **Project user**

## Connections

- Project user → Data audit: audits data (evidence: `README.md`)
- Data audit → Data cleaning: precedes cleaning (evidence: `README.md`)
- Data cleaning → Exploratory analysis: precedes analysis (evidence: `README.md`)
- Exploratory analysis → Feature engineering: precedes engineering (evidence: `README.md`)
- Feature engineering → Baseline training: precedes modeling (evidence: `README.md`)
- Baseline training → Model evaluation: precedes evaluation (evidence: `README.md`)
- Model evaluation → Overview prototype: integrates outputs (evidence: `README.md`)
- Project user → Overview prototype: views overview (evidence: `README.md`)
- Overview prototype → Demand forecasting: references planned page (evidence: `app/app.py`)
- Overview prototype → Product segmentation: references planned page (evidence: `app/app.py`)
- Overview prototype → Inventory insights: references planned page (evidence: `app/app.py`)
- Overview prototype → ML Lab: references planned page (evidence: `app/app.py`)
- Model evaluation → ML Lab: planned experiment review (evidence: `README.md`)
- Prediction → Demand forecasting: planned forecast display (evidence: `README.md`)
