# vijay-rodge/bis_manak architecture

> Architecture diagram of the GitHub repository vijay-rodge/bis_manak, 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/vijay-rodge/bis_manak
- Repository: https://github.com/vijay-rodge/bis_manak

## Overview

This is a Streamlit assistant for finding Indian Standards and explaining related BIS certification and consumer guidance. Its primary workflow takes a product or standard query, optionally scrapes and stores live BIS results, ranks matching standards, and produces a technical extraction followed by a conversational answer. Separate UI branches support manual scraping, database exploration, and reference guides. The README documents these capabilities; some unsampled UI wiring and internal LLM-stage details are represented only where documented.

Main entry points: [`app.py`](https://github.com/vijay-rodge/bis_manak/blob/main/app.py) (Streamlit App), [`search_loop.py`](https://github.com/vijay-rodge/bis_manak/blob/main/search_loop.py) (Search Orchestrator), [`scraper.py`](https://github.com/vijay-rodge/bis_manak/blob/main/scraper.py) (Portal Scraper), [`ui/tab_scraper.py`](https://github.com/vijay-rodge/bis_manak/blob/main/ui/tab_scraper.py) (Scraper Tab)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_experience["User Experience"]
  node_app["Streamlit App<br/>[app.py]"]
  node_chat["Assistant Chat<br/>[tab_chat.py]"]
  node_scraper_ui["Scraper Tab<br/>[tab_scraper.py]"]
  node_database_ui["Database Explorer<br/>[tab_database.py]"]
  node_guide_ui["BIS Guide<br/>[tab_guide.py]"]
end

subgraph group_discovery["Standards Discovery"]
  node_loop["Search Orchestrator<br/>[search_loop.py]"]
  node_scraper["Portal Scraper<br/>[scraper.py]"]
  node_retriever["Standards Matcher<br/>[retriever.py]"]
  node_technical["Technical Extractor<br/>[llm_pipeline.py]"]
  node_advisor["BIS Advisor<br/>[llm_pipeline.py]"]
end

subgraph group_knowledge["BIS Knowledge"]
  node_domain_knowledge["BIS Domain Guides<br/>[bis_knowledge.py]"]
end

subgraph group_persistence["Standards Data"]
  node_standards_store[("Standards Store<br/>[db.py]")]
  node_standards_csv[("Standards Dataset<br/>[standards_data.csv]")]
  node_seeder["Database Seeder<br/>[seed_database.py]"]
end

node_user(("User"))
node_bis_portal{{"BIS Standards Portal"}}
node_model_services{{"LLM Providers"}}

node_user -->|"opens"| node_app
node_app -->|"shows"| node_chat
node_app -->|"shows"| node_scraper_ui
node_app -->|"shows"| node_database_ui
node_app -->|"shows"| node_guide_ui
node_chat -->|"runs query"| node_loop
node_loop -->|"scrapes"| node_scraper
node_scraper -->|"fetches results"| node_bis_portal
node_scraper -->|"saves records"| node_standards_csv
node_loop -->|"saves records"| node_standards_store
node_loop -->|"ranks candidates"| node_retriever
node_retriever -->|"loads records"| node_standards_store
node_loop -->|"runs extraction"| node_technical
node_technical -->|"supplies findings"| node_advisor
node_advisor -->|"uses scheme rules"| node_domain_knowledge
node_technical -.->|"calls model"| node_model_services
node_advisor -.->|"calls model"| node_model_services
node_scraper_ui -->|"scrapes on demand"| node_scraper
node_scraper_ui -->|"saves records"| node_standards_csv
node_database_ui -->|"explores data"| node_standards_csv
node_guide_ui -->|"presents guides"| node_domain_knowledge
node_seeder -->|"uses scraper"| node_scraper

click node_app "https://github.com/vijay-rodge/bis_manak/blob/main/app.py"
click node_chat "https://github.com/vijay-rodge/bis_manak/blob/main/ui/tab_chat.py"
click node_scraper_ui "https://github.com/vijay-rodge/bis_manak/blob/main/ui/tab_scraper.py"
click node_database_ui "https://github.com/vijay-rodge/bis_manak/blob/main/ui/tab_database.py"
click node_guide_ui "https://github.com/vijay-rodge/bis_manak/blob/main/ui/tab_guide.py"
click node_loop "https://github.com/vijay-rodge/bis_manak/blob/main/search_loop.py"
click node_scraper "https://github.com/vijay-rodge/bis_manak/blob/main/scraper.py"
click node_retriever "https://github.com/vijay-rodge/bis_manak/blob/main/retriever.py"
click node_technical "https://github.com/vijay-rodge/bis_manak/blob/main/llm_pipeline.py"
click node_advisor "https://github.com/vijay-rodge/bis_manak/blob/main/llm_pipeline.py"
click node_domain_knowledge "https://github.com/vijay-rodge/bis_manak/blob/main/bis_knowledge.py"
click node_standards_store "https://github.com/vijay-rodge/bis_manak/blob/main/db.py"
click node_standards_csv "https://github.com/vijay-rodge/bis_manak/blob/main/standards_data.csv"
click node_seeder "https://github.com/vijay-rodge/bis_manak/blob/main/seed_database.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_chat,node_scraper_ui,node_database_ui,node_guide_ui,node_user toneBlue
class node_loop,node_scraper,node_retriever,node_technical,node_advisor toneAmber
class node_domain_knowledge toneMint
class node_standards_store,node_standards_csv,node_seeder toneRose
class node_bis_portal,node_model_services toneIndigo
```

## Components

### User Experience

- [Streamlit App](https://github.com/vijay-rodge/bis_manak/blob/main/app.py): `app.py`
- [Assistant Chat](https://github.com/vijay-rodge/bis_manak/blob/main/ui/tab_chat.py): `ui/tab_chat.py`
- [Scraper Tab](https://github.com/vijay-rodge/bis_manak/blob/main/ui/tab_scraper.py): `ui/tab_scraper.py`
- [Database Explorer](https://github.com/vijay-rodge/bis_manak/blob/main/ui/tab_database.py): `ui/tab_database.py`
- [BIS Guide](https://github.com/vijay-rodge/bis_manak/blob/main/ui/tab_guide.py): `ui/tab_guide.py`

### Standards Discovery

- [Search Orchestrator](https://github.com/vijay-rodge/bis_manak/blob/main/search_loop.py): `search_loop.py`
- [Portal Scraper](https://github.com/vijay-rodge/bis_manak/blob/main/scraper.py): `scraper.py`
- [Standards Matcher](https://github.com/vijay-rodge/bis_manak/blob/main/retriever.py): `retriever.py`
- [Technical Extractor](https://github.com/vijay-rodge/bis_manak/blob/main/llm_pipeline.py): `llm_pipeline.py`
- [BIS Advisor](https://github.com/vijay-rodge/bis_manak/blob/main/llm_pipeline.py): `llm_pipeline.py`

### BIS Knowledge

- [BIS Domain Guides](https://github.com/vijay-rodge/bis_manak/blob/main/bis_knowledge.py): `bis_knowledge.py`

### Standards Data

- [Standards Store](https://github.com/vijay-rodge/bis_manak/blob/main/db.py): `db.py`
- [Standards Dataset](https://github.com/vijay-rodge/bis_manak/blob/main/standards_data.csv): `standards_data.csv`
- [Database Seeder](https://github.com/vijay-rodge/bis_manak/blob/main/seed_database.py): `seed_database.py`

### Other components

- **User**
- **BIS Standards Portal**
- **LLM Providers**

## Connections

- User → Streamlit App: opens (evidence: `README.md`)
- Streamlit App → Assistant Chat: shows (evidence: `README.md`)
- Streamlit App → Scraper Tab: shows (evidence: `README.md`)
- Streamlit App → Database Explorer: shows (evidence: `README.md`)
- Streamlit App → BIS Guide: shows (evidence: `README.md`)
- Assistant Chat → Search Orchestrator: runs query (evidence: `ui/tab_chat.py`)
- Search Orchestrator → Portal Scraper: scrapes (evidence: `search_loop.py`)
- Portal Scraper → BIS Standards Portal: fetches results (evidence: `scraper.py`)
- Portal Scraper → Standards Dataset: saves records (evidence: `scraper.py`)
- Search Orchestrator → Standards Store: saves records (evidence: `search_loop.py`)
- Search Orchestrator → Standards Matcher: ranks candidates (evidence: `search_loop.py`)
- Standards Matcher → Standards Store: loads records (evidence: `retriever.py`)
- Search Orchestrator → Technical Extractor: runs extraction (evidence: `README.md`)
- Technical Extractor → BIS Advisor: supplies findings (evidence: `README.md`)
- BIS Advisor → BIS Domain Guides: uses scheme rules (evidence: `llm_pipeline.py`)
- Technical Extractor → LLM Providers: calls model (evidence: `llm_pipeline.py`)
- BIS Advisor → LLM Providers: calls model (evidence: `llm_pipeline.py`)
- Scraper Tab → Portal Scraper: scrapes on demand (evidence: `ui/tab_scraper.py`)
- Scraper Tab → Standards Dataset: saves records (evidence: `ui/tab_scraper.py`)
- Database Explorer → Standards Dataset: explores data (evidence: `README.md`)
- BIS Guide → BIS Domain Guides: presents guides (evidence: `README.md`)
- Database Seeder → Portal Scraper: uses scraper (evidence: `seed_database.py`)
