# madhan-4413/projects architecture

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

- Interactive diagram: https://gitdiagram.com/madhan-4413/projects
- Repository: https://github.com/madhan-4413/projects

## Overview

This tree contains a PDF-chat RAG application and a separate Walmart sales-forecasting notebook project. The main user workflow is PDF upload, text extraction and indexing, then either retrieval-based Q&A or full-document summarization. The sampled app shows these paths and their Gemini integration; the forecasting notebook and its CSV are present but unsampled, so their internal stages and connections are not inferred. A standalone changelog PDF generator is also a core file, but its partial excerpt does not establish how it is invoked.

Main entry points: [`document-chat-rag/app.py`](https://github.com/madhan-4413/projects/blob/main/document-chat-rag/app.py) (Chat interface)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_rag["Document Chat RAG"]
  node_app["Chat interface<br/>[app.py]"]
  node_pdf["Uploaded PDF"]
  node_extract["Text extraction<br/>[app.py]"]
  node_fulltext["Full document text<br/>[app.py]"]
  node_embed["Embedding model<br/>[app.py]"]
  node_index[("Vector index<br/>[app.py]")]
  node_query["RAG query engine<br/>[app.py]"]
  node_summary["Summary routing<br/>[app.py]"]
end

subgraph group_forecast["Sales Forecasting"]
  node_forecast_notebook["Forecast notebook"]
  node_sales_data["Walmart sales data"]
end

subgraph group_changelog["Changelog PDF"]
  node_changelog["PDF generator"]
end

node_user(("Document user"))
node_gemini["Gemini API"]

node_user -->|"uploads and asks"| node_app
node_app -->|"accepts upload"| node_pdf
node_app -->|"loads PDF"| node_extract
node_extract -->|"stores extracted text"| node_fulltext
node_app -->|"configures embeddings"| node_embed
node_app -->|"builds index"| node_index
node_app -->|"creates query engine"| node_query
node_app -->|"routes summary requests"| node_summary
node_app -->|"requests summaries"| node_gemini
node_query -->|"uses configured LLM"| node_gemini

click node_app "https://github.com/madhan-4413/projects/blob/main/document-chat-rag/app.py"
click node_extract "https://github.com/madhan-4413/projects/blob/main/document-chat-rag/app.py"
click node_fulltext "https://github.com/madhan-4413/projects/blob/main/document-chat-rag/app.py"
click node_embed "https://github.com/madhan-4413/projects/blob/main/document-chat-rag/app.py"
click node_index "https://github.com/madhan-4413/projects/blob/main/document-chat-rag/app.py"
click node_query "https://github.com/madhan-4413/projects/blob/main/document-chat-rag/app.py"
click node_summary "https://github.com/madhan-4413/projects/blob/main/document-chat-rag/app.py"
click node_forecast_notebook "https://github.com/madhan-4413/projects/blob/main/Machine%20Learning/Walmart-Sales-Forecasting/notebooks%20code/walmart_sales_forecasting.ipynb"
click node_sales_data "https://github.com/madhan-4413/projects/blob/main/Machine%20Learning/Walmart-Sales-Forecasting/data/walmart_sales.csv.csv"
click node_changelog "https://github.com/madhan-4413/projects/blob/main/document-chat-rag/generate_changelog.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_app,node_pdf,node_extract,node_fulltext,node_embed,node_index,node_query,node_summary,node_user toneBlue
class node_forecast_notebook,node_sales_data toneAmber
class node_changelog,node_gemini toneMint
```

## Components

### Document Chat RAG

- [Chat interface](https://github.com/madhan-4413/projects/blob/main/document-chat-rag/app.py): `document-chat-rag/app.py`
- **Uploaded PDF**
- [Text extraction](https://github.com/madhan-4413/projects/blob/main/document-chat-rag/app.py): `document-chat-rag/app.py`
- [Full document text](https://github.com/madhan-4413/projects/blob/main/document-chat-rag/app.py): `document-chat-rag/app.py`
- [Embedding model](https://github.com/madhan-4413/projects/blob/main/document-chat-rag/app.py): `document-chat-rag/app.py`
- [Vector index](https://github.com/madhan-4413/projects/blob/main/document-chat-rag/app.py): `document-chat-rag/app.py`
- [RAG query engine](https://github.com/madhan-4413/projects/blob/main/document-chat-rag/app.py): `document-chat-rag/app.py`
- [Summary routing](https://github.com/madhan-4413/projects/blob/main/document-chat-rag/app.py): `document-chat-rag/app.py`

### Sales Forecasting

- [Forecast notebook](https://github.com/madhan-4413/projects/blob/main/Machine%20Learning/Walmart-Sales-Forecasting/notebooks%20code/walmart_sales_forecasting.ipynb): `Machine Learning/Walmart-Sales-Forecasting/notebooks code/walmart_sales_forecasting.ipynb`
- [Walmart sales data](https://github.com/madhan-4413/projects/blob/main/Machine%20Learning/Walmart-Sales-Forecasting/data/walmart_sales.csv.csv): `Machine Learning/Walmart-Sales-Forecasting/data/walmart_sales.csv.csv`

### Changelog PDF

- [PDF generator](https://github.com/madhan-4413/projects/blob/main/document-chat-rag/generate_changelog.py): `document-chat-rag/generate_changelog.py`

### Other components

- **Document user**
- **Gemini API**

## Connections

- Document user → Chat interface: uploads and asks (evidence: `document-chat-rag/app.py`)
- Chat interface → Uploaded PDF: accepts upload (evidence: `document-chat-rag/app.py`)
- Chat interface → Text extraction: loads PDF (evidence: `document-chat-rag/app.py`)
- Text extraction → Full document text: stores extracted text (evidence: `document-chat-rag/app.py`)
- Chat interface → Embedding model: configures embeddings (evidence: `document-chat-rag/app.py`)
- Chat interface → Vector index: builds index (evidence: `document-chat-rag/app.py`)
- Chat interface → RAG query engine: creates query engine (evidence: `document-chat-rag/app.py`)
- Chat interface → Summary routing: routes summary requests (evidence: `document-chat-rag/app.py`)
- Chat interface → Gemini API: requests summaries (evidence: `document-chat-rag/app.py`)
- RAG query engine → Gemini API: uses configured LLM (evidence: `document-chat-rag/app.py`)
