# yashti04choudhary/sih_2026-bis_navigator architecture

> Architecture diagram of the GitHub repository yashti04choudhary/sih_2026-bis_navigator, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-11-29). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/yashti04choudhary/sih_2026-bis_navigator
- Repository: https://github.com/yashti04choudhary/sih_2026-bis_navigator

## Overview

BISNova is a conversational Indian Standards and BIS-services assistant. Its main workflow runs from the frontend through P2’s authenticated chat endpoint, product matching and clarification, then—unless clarification is needed—an HTTP request to the separately running P1 evidence service; P2 combines the result for the user. Other documented capabilities include standards and lab browsing, accounts, chat history, feedback, and knowledge-base updates. The graph includes core modules named in the source index; unsampled subsystem links are shown only where the README documents them.

Main entry points: [`frontend/src/App.jsx`](https://github.com/yashti04choudhary/sih_2026-bis_navigator/blob/main/frontend/src/App.jsx) (Web app), [`backend/routers_chat.py`](https://github.com/yashti04choudhary/sih_2026-bis_navigator/blob/main/backend/routers_chat.py) (Chat endpoint), [`backend/main.py`](https://github.com/yashti04choudhary/sih_2026-bis_navigator/blob/main/backend/main.py) (P2 API), [`integration/orchestrator.py`](https://github.com/yashti04choudhary/sih_2026-bis_navigator/blob/main/integration/orchestrator.py) (Request orchestrator)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_ui["User experience"]
  node_frontend["Web app<br/>[App.jsx]"]
  node_auth_ui["Auth context<br/>[AuthContext.jsx]"]
  node_api_client["API client<br/>[api.js]"]
  node_catalog_ui["Labs browser"]
end

subgraph group_p2["P2 product API"]
  node_p2_api["P2 API<br/>[main.py]"]
  node_chat["Chat endpoint<br/>[routers_chat.py]"]
  node_auth["Authentication<br/>[dependencies.py]"]
  node_auth_routes["Account routes<br/>[router.py]"]
  node_database[("Supabase access<br/>[database.py]")]
  node_backend_deps["Runtime dependencies<br/>[dependencies.py]"]
  node_catalog["Standards and labs<br/>[routers_catalog.py]"]
  node_list_query["Standards list queries<br/>[list_query.py]"]
  node_kb_updates["KB update review"]
  node_feedback["Feedback capture"]
  node_history["Chat history"]
end

subgraph group_intelligence["Product intelligence"]
  node_pi["Product matching<br/>[pipeline.py]"]
end

subgraph group_integration["P1 integration"]
  node_orchestrator["Request orchestrator<br/>[orchestrator.py]"]
  node_adapter["P1 input adapter<br/>[adapter.py]"]
  node_p1_client["P1 HTTP client<br/>[p1_client.py]"]
end

subgraph group_evidence["P1 evidence service"]
  node_p1_server["P1 API<br/>[server.py]"]
  node_p1_service["Evidence service<br/>[p1_service.py]"]
  node_evidence_pipeline["Evidence pipeline"]
  node_retriever["Evidence retrieval<br/>[retriever.py]"]
  node_knowledge["Knowledge adapter<br/>[adapter.py]"]
  node_evidence_schema["Evidence records<br/>[evidence.py]"]
end

node_user(("User"))
node_external_llm{{"Gemini"}}

node_user -->|"asks or browses"| node_frontend
node_frontend -->|"uses API"| node_api_client
node_api_client -->|"sends requests"| node_p2_api
node_p2_api -->|"routes chat"| node_chat
node_p2_api -->|"routes catalog"| node_catalog
node_p2_api -->|"routes accounts"| node_auth_routes
node_chat -->|"validates user"| node_auth
node_auth_routes -->|"reads and writes users"| node_database
node_auth -->|"loads active user"| node_database
node_frontend -->|"uses auth state"| node_auth_ui
node_catalog_ui -->|"loads lab data"| node_api_client
node_catalog -->|"loads catalog data"| node_backend_deps
node_chat -->|"handles list intent"| node_list_query
node_chat -->|"gets pipeline"| node_backend_deps
node_backend_deps -->|"provides pipeline"| node_pi
node_chat -->|"runs request"| node_orchestrator
node_orchestrator -->|"matches product"| node_pi
node_orchestrator -->|"builds P1 input"| node_adapter
node_orchestrator -->|"sends P1 request"| node_p1_client
node_p1_client -->|"posts input"| node_p1_server
node_p1_server -->|"dispatches request"| node_p1_service
node_p1_service -->|"runs retrieval"| node_evidence_pipeline
node_evidence_pipeline -->|"retrieves evidence"| node_retriever
node_evidence_pipeline -->|"builds evidence"| node_knowledge
node_evidence_pipeline -.->|"generates answer"| node_external_llm
node_p1_service -->|"returns evidence records"| node_evidence_schema
node_frontend -->|"opens lab browser"| node_catalog_ui
node_user -.->|"reviews updates"| node_kb_updates
node_user -.->|"rates answers"| node_feedback
node_frontend -.->|"manages conversations"| node_history

click node_frontend "https://github.com/yashti04choudhary/sih_2026-bis_navigator/blob/main/frontend/src/App.jsx"
click node_auth_ui "https://github.com/yashti04choudhary/sih_2026-bis_navigator/blob/main/frontend/src/AuthContext.jsx"
click node_api_client "https://github.com/yashti04choudhary/sih_2026-bis_navigator/blob/main/frontend/src/api.js"
click node_catalog_ui "https://github.com/yashti04choudhary/sih_2026-bis_navigator/blob/main/frontend/src/components/TestingLabsPage.jsx"
click node_p2_api "https://github.com/yashti04choudhary/sih_2026-bis_navigator/blob/main/backend/main.py"
click node_chat "https://github.com/yashti04choudhary/sih_2026-bis_navigator/blob/main/backend/routers_chat.py"
click node_auth "https://github.com/yashti04choudhary/sih_2026-bis_navigator/blob/main/backend/auth/dependencies.py"
click node_auth_routes "https://github.com/yashti04choudhary/sih_2026-bis_navigator/blob/main/backend/auth/router.py"
click node_database "https://github.com/yashti04choudhary/sih_2026-bis_navigator/blob/main/backend/database.py"
click node_backend_deps "https://github.com/yashti04choudhary/sih_2026-bis_navigator/blob/main/backend/dependencies.py"
click node_catalog "https://github.com/yashti04choudhary/sih_2026-bis_navigator/blob/main/backend/routers_catalog.py"
click node_list_query "https://github.com/yashti04choudhary/sih_2026-bis_navigator/blob/main/backend/list_query.py"
click node_pi "https://github.com/yashti04choudhary/sih_2026-bis_navigator/blob/main/product_intelligence/src/pipeline.py"
click node_orchestrator "https://github.com/yashti04choudhary/sih_2026-bis_navigator/blob/main/integration/orchestrator.py"
click node_adapter "https://github.com/yashti04choudhary/sih_2026-bis_navigator/blob/main/integration/adapter.py"
click node_p1_client "https://github.com/yashti04choudhary/sih_2026-bis_navigator/blob/main/integration/p1_client.py"
click node_p1_server "https://github.com/yashti04choudhary/sih_2026-bis_navigator/blob/main/p1_service/api/server.py"
click node_p1_service "https://github.com/yashti04choudhary/sih_2026-bis_navigator/blob/main/p1_service/rag/service/p1_service.py"
click node_evidence_pipeline "https://github.com/yashti04choudhary/sih_2026-bis_navigator/blob/main/p1_service/rag/pipeline/evidence_pipeline.py"
click node_retriever "https://github.com/yashti04choudhary/sih_2026-bis_navigator/blob/main/p1_service/rag/retrieval/retriever.py"
click node_knowledge "https://github.com/yashti04choudhary/sih_2026-bis_navigator/blob/main/p1_service/rag/knowledge/adapter.py"
click node_evidence_schema "https://github.com/yashti04choudhary/sih_2026-bis_navigator/blob/main/p1_service/rag/schemas/evidence.py"
click node_kb_updates "https://github.com/yashti04choudhary/sih_2026-bis_navigator/tree/main/backend/kb_updater"
click node_feedback "https://github.com/yashti04choudhary/sih_2026-bis_navigator/blob/main/backend/routers_feedback.py"
click node_history "https://github.com/yashti04choudhary/sih_2026-bis_navigator/blob/main/backend/routers_chat_history.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_frontend,node_auth_ui,node_api_client,node_catalog_ui,node_user toneBlue
class node_p2_api,node_chat,node_auth,node_auth_routes,node_database,node_backend_deps,node_catalog,node_list_query,node_kb_updates,node_feedback,node_history toneAmber
class node_pi toneMint
class node_orchestrator,node_adapter,node_p1_client toneRose
class node_p1_server,node_p1_service,node_evidence_pipeline,node_retriever,node_knowledge,node_evidence_schema,node_external_llm toneIndigo
```

## Components

### User experience

- [Web app](https://github.com/yashti04choudhary/sih_2026-bis_navigator/blob/main/frontend/src/App.jsx): `frontend/src/App.jsx`
- [Auth context](https://github.com/yashti04choudhary/sih_2026-bis_navigator/blob/main/frontend/src/AuthContext.jsx): `frontend/src/AuthContext.jsx`
- [API client](https://github.com/yashti04choudhary/sih_2026-bis_navigator/blob/main/frontend/src/api.js): `frontend/src/api.js`
- [Labs browser](https://github.com/yashti04choudhary/sih_2026-bis_navigator/blob/main/frontend/src/components/TestingLabsPage.jsx): `frontend/src/components/TestingLabsPage.jsx`

### P2 product API

- [P2 API](https://github.com/yashti04choudhary/sih_2026-bis_navigator/blob/main/backend/main.py): `backend/main.py`
- [Chat endpoint](https://github.com/yashti04choudhary/sih_2026-bis_navigator/blob/main/backend/routers_chat.py): `backend/routers_chat.py`
- [Authentication](https://github.com/yashti04choudhary/sih_2026-bis_navigator/blob/main/backend/auth/dependencies.py): `backend/auth/dependencies.py`
- [Account routes](https://github.com/yashti04choudhary/sih_2026-bis_navigator/blob/main/backend/auth/router.py): `backend/auth/router.py`
- [Supabase access](https://github.com/yashti04choudhary/sih_2026-bis_navigator/blob/main/backend/database.py): `backend/database.py`
- [Runtime dependencies](https://github.com/yashti04choudhary/sih_2026-bis_navigator/blob/main/backend/dependencies.py): `backend/dependencies.py`
- [Standards and labs](https://github.com/yashti04choudhary/sih_2026-bis_navigator/blob/main/backend/routers_catalog.py): `backend/routers_catalog.py`
- [Standards list queries](https://github.com/yashti04choudhary/sih_2026-bis_navigator/blob/main/backend/list_query.py): `backend/list_query.py`
- [KB update review](https://github.com/yashti04choudhary/sih_2026-bis_navigator/tree/main/backend/kb_updater): `backend/kb_updater`
- [Feedback capture](https://github.com/yashti04choudhary/sih_2026-bis_navigator/blob/main/backend/routers_feedback.py): `backend/routers_feedback.py`
- [Chat history](https://github.com/yashti04choudhary/sih_2026-bis_navigator/blob/main/backend/routers_chat_history.py): `backend/routers_chat_history.py`

### Product intelligence

- [Product matching](https://github.com/yashti04choudhary/sih_2026-bis_navigator/blob/main/product_intelligence/src/pipeline.py): `product_intelligence/src/pipeline.py`

### P1 integration

- [Request orchestrator](https://github.com/yashti04choudhary/sih_2026-bis_navigator/blob/main/integration/orchestrator.py): `integration/orchestrator.py`
- [P1 input adapter](https://github.com/yashti04choudhary/sih_2026-bis_navigator/blob/main/integration/adapter.py): `integration/adapter.py`
- [P1 HTTP client](https://github.com/yashti04choudhary/sih_2026-bis_navigator/blob/main/integration/p1_client.py): `integration/p1_client.py`

### P1 evidence service

- [P1 API](https://github.com/yashti04choudhary/sih_2026-bis_navigator/blob/main/p1_service/api/server.py): `p1_service/api/server.py`
- [Evidence service](https://github.com/yashti04choudhary/sih_2026-bis_navigator/blob/main/p1_service/rag/service/p1_service.py): `p1_service/rag/service/p1_service.py`
- [Evidence pipeline](https://github.com/yashti04choudhary/sih_2026-bis_navigator/blob/main/p1_service/rag/pipeline/evidence_pipeline.py): `p1_service/rag/pipeline/evidence_pipeline.py`
- [Evidence retrieval](https://github.com/yashti04choudhary/sih_2026-bis_navigator/blob/main/p1_service/rag/retrieval/retriever.py): `p1_service/rag/retrieval/retriever.py`
- [Knowledge adapter](https://github.com/yashti04choudhary/sih_2026-bis_navigator/blob/main/p1_service/rag/knowledge/adapter.py): `p1_service/rag/knowledge/adapter.py`
- [Evidence records](https://github.com/yashti04choudhary/sih_2026-bis_navigator/blob/main/p1_service/rag/schemas/evidence.py): `p1_service/rag/schemas/evidence.py`

### Other components

- **User**
- **Gemini**

## Connections

- User → Web app: asks or browses (evidence: `README.md`)
- Web app → API client: uses API (evidence: `frontend/src/App.jsx`)
- API client → P2 API: sends requests (evidence: `README.md`)
- P2 API → Chat endpoint: routes chat (evidence: `backend/main.py`)
- P2 API → Standards and labs: routes catalog (evidence: `backend/main.py`)
- P2 API → Account routes: routes accounts (evidence: `backend/main.py`)
- Chat endpoint → Authentication: validates user (evidence: `backend/routers_chat.py`)
- Account routes → Supabase access: reads and writes users (evidence: `backend/auth/router.py`)
- Authentication → Supabase access: loads active user (evidence: `backend/auth/dependencies.py`)
- Web app → Auth context: uses auth state (evidence: `frontend/src/main.jsx`)
- Labs browser → API client: loads lab data (evidence: `frontend/src/components/TestingLabsPage.jsx`)
- Standards and labs → Runtime dependencies: loads catalog data (evidence: `backend/routers_catalog.py`)
- Chat endpoint → Standards list queries: handles list intent (evidence: `backend/routers_chat.py`)
- Chat endpoint → Runtime dependencies: gets pipeline (evidence: `backend/routers_chat.py`)
- Runtime dependencies → Product matching: provides pipeline (evidence: `backend/dependencies.py`)
- Chat endpoint → Request orchestrator: runs request (evidence: `backend/routers_chat.py`)
- Request orchestrator → Product matching: matches product (evidence: `integration/orchestrator.py`)
- Request orchestrator → P1 input adapter: builds P1 input (evidence: `integration/orchestrator.py`)
- Request orchestrator → P1 HTTP client: sends P1 request (evidence: `integration/orchestrator.py`)
- P1 HTTP client → P1 API: posts input (evidence: `integration/p1_client.py`)
- P1 API → Evidence service: dispatches request (evidence: `p1_service/api/server.py`)
- Evidence service → Evidence pipeline: runs retrieval (evidence: `p1_service/rag/service/p1_service.py`)
- Evidence pipeline → Evidence retrieval: retrieves evidence (evidence: `p1_service/rag/pipeline/evidence_pipeline.py`)
- Evidence pipeline → Knowledge adapter: builds evidence (evidence: `p1_service/rag/pipeline/evidence_pipeline.py`)
- Evidence pipeline → Gemini: generates answer (evidence: `p1_service/rag/pipeline/evidence_pipeline.py`)
- Evidence service → Evidence records: returns evidence records (evidence: `p1_service/rag/service/p1_service.py`)
- Web app → Labs browser: opens lab browser (evidence: `frontend/src/App.jsx`)
- User → KB update review: reviews updates (evidence: `README.md`)
- User → Feedback capture: rates answers (evidence: `README.md`)
- Web app → Chat history: manages conversations (evidence: `README.md`)
