# hrishikesh-prasad-r/info-vac architecture

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

- Interactive diagram: https://gitdiagram.com/hrishikesh-prasad-r/info-vac
- Repository: https://github.com/hrishikesh-prasad-r/info-vac

## Overview

InfoVac is a competitive-intelligence platform for researching loyalty programs. Analysts submit a program, the backend discovers and scrapes sources, extracts and verifies structured fields, then saves results and a brief for the workspace; users can also ask cited questions, compare programs, and review program evolution. The graph preserves the documented pipeline and major UI capabilities. Some connections are based on README-level architecture because the relevant implementation excerpts were not provided.

Main entry points: [`orchestrator/nodes.py`](https://github.com/hrishikesh-prasad-r/info-vac/blob/main/orchestrator/nodes.py) (Pipeline stages), [`backend/main.py`](https://github.com/hrishikesh-prasad-r/info-vac/blob/main/backend/main.py) (FastAPI endpoints), [`frontend/components/analyst/MultiFlowWorkspace.tsx`](https://github.com/hrishikesh-prasad-r/info-vac/blob/main/frontend/components/analyst/MultiFlowWorkspace.tsx) (Analyst views), [`frontend/app/page.tsx`](https://github.com/hrishikesh-prasad-r/info-vac/blob/main/frontend/app/page.tsx) (Analyst workspace)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_frontend["User workspaces"]
  node_workspace["Analyst workspace<br/>[page.tsx]"]
  node_workspace_views["Analyst views"]
  node_chat_widget["Chat widget<br/>[ChatWidget.tsx]"]
  node_evidence_drawer["Evidence drawer<br/>[EvidenceDrawer.tsx]"]
  node_exporter["PDF exporter<br/>[ExportBar.tsx]"]
  node_admin_dashboard["Admin dashboard<br/>[page.tsx]"]
  node_comparator_picker["Comparator picker"]
end

subgraph group_api["API and orchestration"]
  node_api["FastAPI endpoints<br/>[main.py]"]
  node_pipeline_graph["Pipeline graph<br/>[graph.py]"]
  node_pipeline_nodes["Pipeline stages<br/>[nodes.py]"]
  node_pipeline_events["Progress events<br/>[events.py]"]
end

subgraph group_research["Research pipeline"]
  node_retriever["Source discovery<br/>[retriever.py]"]
  node_classifier["Source classifier<br/>[classifier.py]"]
  node_extractor["Structured extraction<br/>[extractor.py]"]
  node_schemas["Extraction schemas"]
  node_verification_gate["Verification gate<br/>[gate.py]"]
  node_verifier["Confidence scoring<br/>[verifier.py]"]
end

subgraph group_analysis["Analysis services"]
  node_narrator["Executive brief<br/>[narrator.py]"]
  node_comparator["Program comparison<br/>[comparator.py]"]
  node_evolution["Program evolution<br/>[evolution.py]"]
  node_chat_service["Cited Q&amp;A<br/>[chat.py]"]
  node_llm["LLM routing<br/>[llm_client.py]"]
  node_key_broker["Key failover<br/>[key_broker.py]"]
end

subgraph group_storage["State and search"]
  node_postgres[("PostgreSQL")]
  node_embedding["Text embeddings<br/>[embeddings.py]"]
  node_qdrant[("Qdrant vector store<br/>[qdrant_client.py]")]
  node_retriever_search["RAG retrieval<br/>[retriever.py]"]
  node_models["Domain records<br/>[models.py]"]
  node_db_access["Database sessions<br/>[db.py]"]
end

node_analyst(("Analyst"))
node_admin(("Admin"))

node_analyst -->|"uses"| node_workspace
node_workspace -->|"renders"| node_workspace_views
node_workspace_views -->|"renders"| node_chat_widget
node_workspace_views -->|"renders"| node_evidence_drawer
node_workspace_views -->|"renders"| node_exporter
node_admin -->|"uses"| node_admin_dashboard
node_admin_dashboard -->|"renders"| node_comparator_picker
node_workspace -->|"requests research"| node_api
node_admin_dashboard -->|"requests analytics"| node_api
node_api -->|"starts pipeline"| node_pipeline_graph
node_pipeline_graph -->|"dispatches stages"| node_pipeline_nodes
node_pipeline_nodes -->|"discovers sources"| node_retriever
node_retriever -->|"classifies sources"| node_classifier
node_pipeline_nodes -->|"extracts fields"| node_extractor
node_extractor -->|"validates output"| node_schemas
node_pipeline_nodes -->|"checks evidence"| node_verification_gate
node_pipeline_nodes -->|"scores confidence"| node_verifier
node_pipeline_nodes -->|"generates brief"| node_narrator
node_extractor -.->|"requests completion"| node_llm
node_llm -->|"rotates keys"| node_key_broker
node_pipeline_nodes -->|"emits progress"| node_pipeline_events
node_pipeline_events -->|"writes events"| node_postgres
node_api -->|"reads and writes"| node_postgres
node_pipeline_nodes -->|"chunks and embeds"| node_embedding
node_pipeline_nodes -->|"stores vectors"| node_qdrant
node_embedding -->|"creates vectors"| node_qdrant
node_chat_widget -->|"asks questions"| node_chat_service
node_chat_service -->|"retrieves context"| node_retriever_search
node_retriever_search -.->|"searches vectors"| node_qdrant
node_comparator_picker -.->|"requests comparison"| node_api
node_api -->|"routes comparison"| node_comparator
node_api -->|"routes evolution"| node_evolution
node_evolution -->|"requests analysis"| node_llm
node_api -->|"uses records"| node_models
node_api -->|"opens sessions"| node_db_access
node_db_access -->|"connects"| node_postgres

click node_workspace "https://github.com/hrishikesh-prasad-r/info-vac/blob/main/frontend/app/page.tsx"
click node_workspace_views "https://github.com/hrishikesh-prasad-r/info-vac/blob/main/frontend/components/analyst/MultiFlowWorkspace.tsx"
click node_chat_widget "https://github.com/hrishikesh-prasad-r/info-vac/blob/main/frontend/components/analyst/ChatWidget.tsx"
click node_evidence_drawer "https://github.com/hrishikesh-prasad-r/info-vac/blob/main/frontend/components/analyst/EvidenceDrawer.tsx"
click node_exporter "https://github.com/hrishikesh-prasad-r/info-vac/blob/main/frontend/components/analyst/ExportBar.tsx"
click node_admin_dashboard "https://github.com/hrishikesh-prasad-r/info-vac/blob/main/frontend/app/admin/page.tsx"
click node_comparator_picker "https://github.com/hrishikesh-prasad-r/info-vac/blob/main/frontend/components/admin/ComparatorPicker.tsx"
click node_api "https://github.com/hrishikesh-prasad-r/info-vac/blob/main/backend/main.py"
click node_pipeline_graph "https://github.com/hrishikesh-prasad-r/info-vac/blob/main/orchestrator/graph.py"
click node_pipeline_nodes "https://github.com/hrishikesh-prasad-r/info-vac/blob/main/orchestrator/nodes.py"
click node_pipeline_events "https://github.com/hrishikesh-prasad-r/info-vac/blob/main/orchestrator/events.py"
click node_retriever "https://github.com/hrishikesh-prasad-r/info-vac/blob/main/backend/retriever.py"
click node_classifier "https://github.com/hrishikesh-prasad-r/info-vac/blob/main/backend/classifier.py"
click node_extractor "https://github.com/hrishikesh-prasad-r/info-vac/blob/main/backend/extractor.py"
click node_schemas "https://github.com/hrishikesh-prasad-r/info-vac/blob/main/backend/extraction_schemas.py"
click node_verification_gate "https://github.com/hrishikesh-prasad-r/info-vac/blob/main/backend/gate.py"
click node_verifier "https://github.com/hrishikesh-prasad-r/info-vac/blob/main/backend/verifier.py"
click node_narrator "https://github.com/hrishikesh-prasad-r/info-vac/blob/main/backend/narrator.py"
click node_comparator "https://github.com/hrishikesh-prasad-r/info-vac/blob/main/backend/comparator.py"
click node_evolution "https://github.com/hrishikesh-prasad-r/info-vac/blob/main/backend/routers/evolution.py"
click node_chat_service "https://github.com/hrishikesh-prasad-r/info-vac/blob/main/backend/chat.py"
click node_llm "https://github.com/hrishikesh-prasad-r/info-vac/blob/main/backend/llm_client.py"
click node_key_broker "https://github.com/hrishikesh-prasad-r/info-vac/blob/main/backend/key_broker.py"
click node_embedding "https://github.com/hrishikesh-prasad-r/info-vac/blob/main/backend/embeddings.py"
click node_qdrant "https://github.com/hrishikesh-prasad-r/info-vac/blob/main/backend/qdrant_client.py"
click node_retriever_search "https://github.com/hrishikesh-prasad-r/info-vac/blob/main/backend/retriever.py"
click node_models "https://github.com/hrishikesh-prasad-r/info-vac/blob/main/backend/models.py"
click node_db_access "https://github.com/hrishikesh-prasad-r/info-vac/blob/main/backend/db.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_workspace,node_workspace_views,node_chat_widget,node_evidence_drawer,node_exporter,node_admin_dashboard,node_comparator_picker toneBlue
class node_api,node_pipeline_graph,node_pipeline_nodes,node_pipeline_events toneAmber
class node_retriever,node_classifier,node_extractor,node_schemas,node_verification_gate,node_verifier toneMint
class node_narrator,node_comparator,node_evolution,node_chat_service,node_llm,node_key_broker toneRose
class node_postgres,node_embedding,node_qdrant,node_retriever_search,node_models,node_db_access,node_analyst,node_admin toneIndigo
```

## Components

### User workspaces

- [Analyst workspace](https://github.com/hrishikesh-prasad-r/info-vac/blob/main/frontend/app/page.tsx): `frontend/app/page.tsx`
- [Analyst views](https://github.com/hrishikesh-prasad-r/info-vac/blob/main/frontend/components/analyst/MultiFlowWorkspace.tsx): `frontend/components/analyst/MultiFlowWorkspace.tsx`
- [Chat widget](https://github.com/hrishikesh-prasad-r/info-vac/blob/main/frontend/components/analyst/ChatWidget.tsx): `frontend/components/analyst/ChatWidget.tsx`
- [Evidence drawer](https://github.com/hrishikesh-prasad-r/info-vac/blob/main/frontend/components/analyst/EvidenceDrawer.tsx): `frontend/components/analyst/EvidenceDrawer.tsx`
- [PDF exporter](https://github.com/hrishikesh-prasad-r/info-vac/blob/main/frontend/components/analyst/ExportBar.tsx): `frontend/components/analyst/ExportBar.tsx`
- [Admin dashboard](https://github.com/hrishikesh-prasad-r/info-vac/blob/main/frontend/app/admin/page.tsx): `frontend/app/admin/page.tsx`
- [Comparator picker](https://github.com/hrishikesh-prasad-r/info-vac/blob/main/frontend/components/admin/ComparatorPicker.tsx): `frontend/components/admin/ComparatorPicker.tsx`

### API and orchestration

- [FastAPI endpoints](https://github.com/hrishikesh-prasad-r/info-vac/blob/main/backend/main.py): `backend/main.py`
- [Pipeline graph](https://github.com/hrishikesh-prasad-r/info-vac/blob/main/orchestrator/graph.py): `orchestrator/graph.py`
- [Pipeline stages](https://github.com/hrishikesh-prasad-r/info-vac/blob/main/orchestrator/nodes.py): `orchestrator/nodes.py`
- [Progress events](https://github.com/hrishikesh-prasad-r/info-vac/blob/main/orchestrator/events.py): `orchestrator/events.py`

### Research pipeline

- [Source discovery](https://github.com/hrishikesh-prasad-r/info-vac/blob/main/backend/retriever.py): `backend/retriever.py`
- [Source classifier](https://github.com/hrishikesh-prasad-r/info-vac/blob/main/backend/classifier.py): `backend/classifier.py`
- [Structured extraction](https://github.com/hrishikesh-prasad-r/info-vac/blob/main/backend/extractor.py): `backend/extractor.py`
- [Extraction schemas](https://github.com/hrishikesh-prasad-r/info-vac/blob/main/backend/extraction_schemas.py): `backend/extraction_schemas.py`
- [Verification gate](https://github.com/hrishikesh-prasad-r/info-vac/blob/main/backend/gate.py): `backend/gate.py`
- [Confidence scoring](https://github.com/hrishikesh-prasad-r/info-vac/blob/main/backend/verifier.py): `backend/verifier.py`

### Analysis services

- [Executive brief](https://github.com/hrishikesh-prasad-r/info-vac/blob/main/backend/narrator.py): `backend/narrator.py`
- [Program comparison](https://github.com/hrishikesh-prasad-r/info-vac/blob/main/backend/comparator.py): `backend/comparator.py`
- [Program evolution](https://github.com/hrishikesh-prasad-r/info-vac/blob/main/backend/routers/evolution.py): `backend/routers/evolution.py`
- [Cited Q&A](https://github.com/hrishikesh-prasad-r/info-vac/blob/main/backend/chat.py): `backend/chat.py`
- [LLM routing](https://github.com/hrishikesh-prasad-r/info-vac/blob/main/backend/llm_client.py): `backend/llm_client.py`
- [Key failover](https://github.com/hrishikesh-prasad-r/info-vac/blob/main/backend/key_broker.py): `backend/key_broker.py`

### State and search

- **PostgreSQL**
- [Text embeddings](https://github.com/hrishikesh-prasad-r/info-vac/blob/main/backend/embeddings.py): `backend/embeddings.py`
- [Qdrant vector store](https://github.com/hrishikesh-prasad-r/info-vac/blob/main/backend/qdrant_client.py): `backend/qdrant_client.py`
- [RAG retrieval](https://github.com/hrishikesh-prasad-r/info-vac/blob/main/backend/retriever.py): `backend/retriever.py`
- [Domain records](https://github.com/hrishikesh-prasad-r/info-vac/blob/main/backend/models.py): `backend/models.py`
- [Database sessions](https://github.com/hrishikesh-prasad-r/info-vac/blob/main/backend/db.py): `backend/db.py`

### Other components

- **Analyst**
- **Admin**

## Connections

- Analyst → Analyst workspace: uses (evidence: `README.md`)
- Analyst workspace → Analyst views: renders (evidence: `frontend/app/page.tsx`)
- Analyst views → Chat widget: renders (evidence: `frontend/components/analyst/MultiFlowWorkspace.tsx`)
- Analyst views → Evidence drawer: renders (evidence: `frontend/components/analyst/MultiFlowWorkspace.tsx`)
- Analyst views → PDF exporter: renders (evidence: `frontend/components/analyst/MultiFlowWorkspace.tsx`)
- Admin → Admin dashboard: uses (evidence: `README.md`)
- Admin dashboard → Comparator picker: renders (evidence: `frontend/components/admin/ComparatorPicker.tsx`)
- Analyst workspace → FastAPI endpoints: requests research (evidence: `README.md`)
- Admin dashboard → FastAPI endpoints: requests analytics (evidence: `README.md`)
- FastAPI endpoints → Pipeline graph: starts pipeline (evidence: `backend/main.py`)
- Pipeline graph → Pipeline stages: dispatches stages (evidence: `orchestrator/graph.py`)
- Pipeline stages → Source discovery: discovers sources (evidence: `orchestrator/nodes.py`)
- Source discovery → Source classifier: classifies sources (evidence: `backend/retriever.py`)
- Pipeline stages → Structured extraction: extracts fields (evidence: `orchestrator/nodes.py`)
- Structured extraction → Extraction schemas: validates output (evidence: `backend/extractor.py`)
- Pipeline stages → Verification gate: checks evidence (evidence: `orchestrator/nodes.py`)
- Pipeline stages → Confidence scoring: scores confidence (evidence: `orchestrator/nodes.py`)
- Pipeline stages → Executive brief: generates brief (evidence: `orchestrator/nodes.py`)
- Structured extraction → LLM routing: requests completion (evidence: `backend/extractor.py`)
- LLM routing → Key failover: rotates keys (evidence: `backend/llm_client.py`)
- Pipeline stages → Progress events: emits progress (evidence: `orchestrator/nodes.py`)
- Progress events → PostgreSQL: writes events (evidence: `orchestrator/events.py`)
- FastAPI endpoints → PostgreSQL: reads and writes (evidence: `backend/main.py`)
- Pipeline stages → Text embeddings: chunks and embeds (evidence: `orchestrator/nodes.py`)
- Pipeline stages → Qdrant vector store: stores vectors (evidence: `orchestrator/nodes.py`)
- Text embeddings → Qdrant vector store: creates vectors (evidence: `README.md`)
- Chat widget → Cited Q&A: asks questions (evidence: `README.md`)
- Cited Q&A → RAG retrieval: retrieves context (evidence: `backend/chat.py`)
- RAG retrieval → Qdrant vector store: searches vectors
- Comparator picker → FastAPI endpoints: requests comparison
- FastAPI endpoints → Program comparison: routes comparison (evidence: `backend/main.py`)
- FastAPI endpoints → Program evolution: routes evolution (evidence: `backend/main.py`)
- Program evolution → LLM routing: requests analysis (evidence: `backend/routers/evolution.py`)
- FastAPI endpoints → Domain records: uses records (evidence: `backend/main.py`)
- FastAPI endpoints → Database sessions: opens sessions (evidence: `backend/main.py`)
- Database sessions → PostgreSQL: connects (evidence: `backend/db.py`)
