# amritaa1603/smart-retail-ai-platform architecture

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

- Interactive diagram: https://gitdiagram.com/amritaa1603/smart-retail-ai-platform
- Repository: https://github.com/amritaa1603/smart-retail-ai-platform

## Overview

This repository is a notebook-based smart-retail demo. Its documented user flow is client or dashboard request → FastAPI endpoint → unified pipeline → relevant vision, sentiment, or chatbot capability → response; face visits and aggregate dashboard statistics also use logs. The README describes these relationships and capabilities, but no notebook source excerpts were provided, so the graph reflects documented architecture rather than verified call sites.

Main entry points: [`Smart_Retail_AI_Platform.ipynb`](https://github.com/amritaa1603/smart-retail-ai-platform/blob/main/Smart_Retail_AI_Platform.ipynb) (Retail Pipeline)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_interface["Client Interfaces"]
  node_dashboard["Gradio Dashboard"]
  node_swagger["Swagger UI"]
end

subgraph group_serving["API and Pipeline"]
  node_gateway["FastAPI Gateway"]
  node_pipeline["Retail Pipeline"]
end

subgraph group_intelligence["Retail Intelligence"]
  node_cv["Computer Vision"]
  node_face["Face Recognition"]
  node_product["Product Classifier"]
  node_text["Text Preprocessing"]
  node_sentiment["Sentiment Analysis"]
  node_chatbot["FAQ Chatbot"]
end

subgraph group_state["Models and Records"]
  node_models[("Serialized Models")]
  node_logs[("Visit and Chat Logs")]
end

node_client(("API Clients"))
node_ngrok["ngrok Tunnel"]

node_client -->|"sends requests"| node_gateway
node_dashboard -.->|"provides interface"| node_gateway
node_client -->|"views API docs"| node_swagger
node_gateway -->|"serves models"| node_pipeline
node_pipeline -->|"combines models"| node_cv
node_pipeline -->|"combines models"| node_text
node_pipeline -->|"combines models"| node_chatbot
node_cv -->|"supports recognition"| node_face
node_cv -->|"supports classification"| node_product
node_text -->|"preprocesses reviews"| node_sentiment
node_gateway -->|"reports statistics"| node_logs
node_face -->|"logs visits"| node_logs
node_pipeline -->|"loads models"| node_models
node_ngrok -->|"exposes API"| node_gateway

click node_dashboard "https://github.com/amritaa1603/smart-retail-ai-platform/blob/main/Smart_Retail_AI_Platform.ipynb"
click node_swagger "https://github.com/amritaa1603/smart-retail-ai-platform/blob/main/Smart_Retail_AI_Platform.ipynb"
click node_gateway "https://github.com/amritaa1603/smart-retail-ai-platform/blob/main/Smart_Retail_AI_Platform.ipynb"
click node_pipeline "https://github.com/amritaa1603/smart-retail-ai-platform/blob/main/Smart_Retail_AI_Platform.ipynb"
click node_cv "https://github.com/amritaa1603/smart-retail-ai-platform/blob/main/Smart_Retail_AI_Platform.ipynb"
click node_face "https://github.com/amritaa1603/smart-retail-ai-platform/blob/main/Smart_Retail_AI_Platform.ipynb"
click node_product "https://github.com/amritaa1603/smart-retail-ai-platform/blob/main/Smart_Retail_AI_Platform.ipynb"
click node_text "https://github.com/amritaa1603/smart-retail-ai-platform/blob/main/Smart_Retail_AI_Platform.ipynb"
click node_sentiment "https://github.com/amritaa1603/smart-retail-ai-platform/blob/main/Smart_Retail_AI_Platform.ipynb"
click node_chatbot "https://github.com/amritaa1603/smart-retail-ai-platform/blob/main/Smart_Retail_AI_Platform.ipynb"
click node_models "https://github.com/amritaa1603/smart-retail-ai-platform/blob/main/Smart_Retail_AI_Platform.ipynb"
click node_logs "https://github.com/amritaa1603/smart-retail-ai-platform/blob/main/Smart_Retail_AI_Platform.ipynb"

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_dashboard,node_swagger,node_client toneBlue
class node_gateway,node_pipeline toneAmber
class node_cv,node_face,node_product,node_text,node_sentiment,node_chatbot toneMint
class node_models,node_logs toneRose
class node_ngrok toneIndigo
```

## Components

### Client Interfaces

- [Gradio Dashboard](https://github.com/amritaa1603/smart-retail-ai-platform/blob/main/Smart_Retail_AI_Platform.ipynb): `Smart_Retail_AI_Platform.ipynb`
- [Swagger UI](https://github.com/amritaa1603/smart-retail-ai-platform/blob/main/Smart_Retail_AI_Platform.ipynb): `Smart_Retail_AI_Platform.ipynb`

### API and Pipeline

- [FastAPI Gateway](https://github.com/amritaa1603/smart-retail-ai-platform/blob/main/Smart_Retail_AI_Platform.ipynb): `Smart_Retail_AI_Platform.ipynb`
- [Retail Pipeline](https://github.com/amritaa1603/smart-retail-ai-platform/blob/main/Smart_Retail_AI_Platform.ipynb): `Smart_Retail_AI_Platform.ipynb`

### Retail Intelligence

- [Computer Vision](https://github.com/amritaa1603/smart-retail-ai-platform/blob/main/Smart_Retail_AI_Platform.ipynb): `Smart_Retail_AI_Platform.ipynb`
- [Face Recognition](https://github.com/amritaa1603/smart-retail-ai-platform/blob/main/Smart_Retail_AI_Platform.ipynb): `Smart_Retail_AI_Platform.ipynb`
- [Product Classifier](https://github.com/amritaa1603/smart-retail-ai-platform/blob/main/Smart_Retail_AI_Platform.ipynb): `Smart_Retail_AI_Platform.ipynb`
- [Text Preprocessing](https://github.com/amritaa1603/smart-retail-ai-platform/blob/main/Smart_Retail_AI_Platform.ipynb): `Smart_Retail_AI_Platform.ipynb`
- [Sentiment Analysis](https://github.com/amritaa1603/smart-retail-ai-platform/blob/main/Smart_Retail_AI_Platform.ipynb): `Smart_Retail_AI_Platform.ipynb`
- [FAQ Chatbot](https://github.com/amritaa1603/smart-retail-ai-platform/blob/main/Smart_Retail_AI_Platform.ipynb): `Smart_Retail_AI_Platform.ipynb`

### Models and Records

- [Serialized Models](https://github.com/amritaa1603/smart-retail-ai-platform/blob/main/Smart_Retail_AI_Platform.ipynb): `Smart_Retail_AI_Platform.ipynb`
- [Visit and Chat Logs](https://github.com/amritaa1603/smart-retail-ai-platform/blob/main/Smart_Retail_AI_Platform.ipynb): `Smart_Retail_AI_Platform.ipynb`

### Other components

- **API Clients**
- **ngrok Tunnel**

## Connections

- API Clients → FastAPI Gateway: sends requests (evidence: `README.md`)
- Gradio Dashboard → FastAPI Gateway: provides interface
- API Clients → Swagger UI: views API docs (evidence: `README.md`)
- FastAPI Gateway → Retail Pipeline: serves models (evidence: `README.md`)
- Retail Pipeline → Computer Vision: combines models (evidence: `README.md`)
- Retail Pipeline → Text Preprocessing: combines models (evidence: `README.md`)
- Retail Pipeline → FAQ Chatbot: combines models (evidence: `README.md`)
- Computer Vision → Face Recognition: supports recognition (evidence: `README.md`)
- Computer Vision → Product Classifier: supports classification (evidence: `README.md`)
- Text Preprocessing → Sentiment Analysis: preprocesses reviews (evidence: `README.md`)
- FastAPI Gateway → Visit and Chat Logs: reports statistics (evidence: `README.md`)
- Face Recognition → Visit and Chat Logs: logs visits (evidence: `README.md`)
- Retail Pipeline → Serialized Models: loads models (evidence: `README.md`)
- ngrok Tunnel → FastAPI Gateway: exposes API (evidence: `README.md`)
