# gandhamvinaykumar/zepto-ai-ml-capstone-project architecture

> Architecture diagram of the GitHub repository gandhamvinaykumar/zepto-ai-ml-capstone-project, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-09-25). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/gandhamvinaykumar/zepto-ai-ml-capstone-project
- Repository: https://github.com/gandhamvinaykumar/zepto-ai-ml-capstone-project

## Overview

Zepto AI/ML Capstone combines three independent workflows: book collection and relational storage, Titanic analysis and prediction, and policy-question answering through a local RAG service. In the data pipeline, one script owns scraping, cleaning, SQLite loading, and SQL examples. Analytics separates exploratory analysis from modeling and model reload. The support API routes policy questions through retrieval and answer generation, while general questions receive a direct response. The support implementation is sampled; some analytics modeling details and artifacts are documented but not present in the tree.

Main entry points: [`support_assistant/main.py`](https://github.com/gandhamvinaykumar/zepto-ai-ml-capstone-project/blob/main/support_assistant/main.py) (Ask API and response), [`data_pipeline/pipeline.py`](https://github.com/gandhamvinaykumar/zepto-ai-ml-capstone-project/blob/main/data_pipeline/pipeline.py) (Scrape and clean books), [`analytics/01_eda.py`](https://github.com/gandhamvinaykumar/zepto-ai-ml-capstone-project/blob/main/analytics/01_eda.py) (EDA and profiling), [`analytics/titanic.csv`](https://github.com/gandhamvinaykumar/zepto-ai-ml-capstone-project/blob/main/analytics/titanic.csv) (Titanic dataset)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_books["Book pipeline"]
  node_collector["Scrape and clean books<br/>[pipeline.py]"]
  node_sqlite[("Books SQLite database<br/>[pipeline.py]")]
  node_queries["SQL query examples<br/>[pipeline.py]"]
end

subgraph group_analytics["Titanic analytics"]
  node_eda["EDA and profiling<br/>[01_eda.py]"]
  node_titanicdata["Titanic dataset<br/>[titanic.csv]"]
  node_cleaneddata["Cleaned Titanic data<br/>[clean_titanic.csv]"]
  node_modeling["Classification and regression<br/>[02_modeling.py]"]
  node_modelreload["Model reload check"]
end

subgraph group_assistant["Policy assistant"]
  node_api["Ask API and response<br/>[main.py]"]
  node_routing["Intent routing<br/>[main.py]"]
  node_direct["General-question response<br/>[main.py]"]
  node_retrieval["Policy retrieval and answer<br/>[main.py]"]
end

subgraph group_supportdata["Assistant data"]
  node_policies["Policy documents"]
  node_vectorstore[("Persistent embeddings<br/>[main.py]")]
end

node_booksite(("Books website"))
node_user(("Questioner"))

node_booksite -->|"serves pages"| node_collector
node_collector -->|"writes books"| node_sqlite
node_collector -->|"runs SQL"| node_queries
node_titanicdata -->|"loads dataset"| node_eda
node_eda -->|"saves cleaned data"| node_cleaneddata
node_cleaneddata -->|"loads data"| node_modeling
node_modeling -->|"saves pipeline"| node_modelreload
node_modelreload -->|"reads sample"| node_titanicdata
node_user -->|"submits query"| node_api
node_api -->|"invokes graph"| node_routing
node_routing -->|"routes general"| node_direct
node_routing -->|"routes policy"| node_retrieval
node_retrieval -->|"queries embeddings"| node_vectorstore
node_policies -->|"bootstraps documents"| node_vectorstore
node_direct -->|"returns response"| node_api
node_retrieval -->|"returns response"| node_api

click node_collector "https://github.com/gandhamvinaykumar/zepto-ai-ml-capstone-project/blob/main/data_pipeline/pipeline.py"
click node_sqlite "https://github.com/gandhamvinaykumar/zepto-ai-ml-capstone-project/blob/main/data_pipeline/pipeline.py"
click node_queries "https://github.com/gandhamvinaykumar/zepto-ai-ml-capstone-project/blob/main/data_pipeline/pipeline.py"
click node_eda "https://github.com/gandhamvinaykumar/zepto-ai-ml-capstone-project/blob/main/analytics/01_eda.py"
click node_titanicdata "https://github.com/gandhamvinaykumar/zepto-ai-ml-capstone-project/blob/main/analytics/titanic.csv"
click node_cleaneddata "https://github.com/gandhamvinaykumar/zepto-ai-ml-capstone-project/blob/main/analytics/clean_titanic.csv"
click node_modeling "https://github.com/gandhamvinaykumar/zepto-ai-ml-capstone-project/blob/main/analytics/02_modeling.py"
click node_modelreload "https://github.com/gandhamvinaykumar/zepto-ai-ml-capstone-project/blob/main/analytics/reload_pipeline_check.py"
click node_api "https://github.com/gandhamvinaykumar/zepto-ai-ml-capstone-project/blob/main/support_assistant/main.py"
click node_routing "https://github.com/gandhamvinaykumar/zepto-ai-ml-capstone-project/blob/main/support_assistant/main.py"
click node_direct "https://github.com/gandhamvinaykumar/zepto-ai-ml-capstone-project/blob/main/support_assistant/main.py"
click node_retrieval "https://github.com/gandhamvinaykumar/zepto-ai-ml-capstone-project/blob/main/support_assistant/main.py"
click node_policies "https://github.com/gandhamvinaykumar/zepto-ai-ml-capstone-project/tree/main/support_assistant/docs"
click node_vectorstore "https://github.com/gandhamvinaykumar/zepto-ai-ml-capstone-project/blob/main/support_assistant/main.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_collector,node_sqlite,node_queries toneBlue
class node_eda,node_titanicdata,node_cleaneddata,node_modeling,node_modelreload toneAmber
class node_api,node_routing,node_direct,node_retrieval toneMint
class node_policies,node_vectorstore toneRose
class node_booksite,node_user toneIndigo
```

## Components

### Book pipeline

- [Scrape and clean books](https://github.com/gandhamvinaykumar/zepto-ai-ml-capstone-project/blob/main/data_pipeline/pipeline.py): `data_pipeline/pipeline.py`
- [Books SQLite database](https://github.com/gandhamvinaykumar/zepto-ai-ml-capstone-project/blob/main/data_pipeline/pipeline.py): `data_pipeline/pipeline.py`
- [SQL query examples](https://github.com/gandhamvinaykumar/zepto-ai-ml-capstone-project/blob/main/data_pipeline/pipeline.py): `data_pipeline/pipeline.py`

### Titanic analytics

- [EDA and profiling](https://github.com/gandhamvinaykumar/zepto-ai-ml-capstone-project/blob/main/analytics/01_eda.py): `analytics/01_eda.py`
- [Titanic dataset](https://github.com/gandhamvinaykumar/zepto-ai-ml-capstone-project/blob/main/analytics/titanic.csv): `analytics/titanic.csv`
- [Cleaned Titanic data](https://github.com/gandhamvinaykumar/zepto-ai-ml-capstone-project/blob/main/analytics/clean_titanic.csv): `analytics/clean_titanic.csv`
- [Classification and regression](https://github.com/gandhamvinaykumar/zepto-ai-ml-capstone-project/blob/main/analytics/02_modeling.py): `analytics/02_modeling.py`
- [Model reload check](https://github.com/gandhamvinaykumar/zepto-ai-ml-capstone-project/blob/main/analytics/reload_pipeline_check.py): `analytics/reload_pipeline_check.py`

### Policy assistant

- [Ask API and response](https://github.com/gandhamvinaykumar/zepto-ai-ml-capstone-project/blob/main/support_assistant/main.py): `support_assistant/main.py`
- [Intent routing](https://github.com/gandhamvinaykumar/zepto-ai-ml-capstone-project/blob/main/support_assistant/main.py): `support_assistant/main.py`
- [General-question response](https://github.com/gandhamvinaykumar/zepto-ai-ml-capstone-project/blob/main/support_assistant/main.py): `support_assistant/main.py`
- [Policy retrieval and answer](https://github.com/gandhamvinaykumar/zepto-ai-ml-capstone-project/blob/main/support_assistant/main.py): `support_assistant/main.py`

### Assistant data

- [Policy documents](https://github.com/gandhamvinaykumar/zepto-ai-ml-capstone-project/tree/main/support_assistant/docs): `support_assistant/docs`
- [Persistent embeddings](https://github.com/gandhamvinaykumar/zepto-ai-ml-capstone-project/blob/main/support_assistant/main.py): `support_assistant/main.py`

### Other components

- **Books website**
- **Questioner**

## Connections

- Books website → Scrape and clean books: serves pages
- Scrape and clean books → Books SQLite database: writes books
- Scrape and clean books → SQL query examples: runs SQL
- Titanic dataset → EDA and profiling: loads dataset
- EDA and profiling → Cleaned Titanic data: saves cleaned data
- Cleaned Titanic data → Classification and regression: loads data
- Classification and regression → Model reload check: saves pipeline
- Model reload check → Titanic dataset: reads sample
- Questioner → Ask API and response: submits query
- Ask API and response → Intent routing: invokes graph
- Intent routing → General-question response: routes general
- Intent routing → Policy retrieval and answer: routes policy
- Policy retrieval and answer → Persistent embeddings: queries embeddings
- Policy documents → Persistent embeddings: bootstraps documents
- General-question response → Ask API and response: returns response
- Policy retrieval and answer → Ask API and response: returns response
