# muthuram3010/hyperverge-hackathon architecture

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

- Interactive diagram: https://gitdiagram.com/muthuram3010/hyperverge-hackathon
- Repository: https://github.com/muthuram3010/hyperverge-hackathon

## Overview

The product is a filing-grounded financial auditor. Users upload SEC-style PDFs or query indexed filings; ingestion extracts and chunks documents into Chroma, then the API and either UI expose chunk inspection, single-company RAG, financial time series, comparative analysis, and citation/PDF access. The separate CLI auditor performs structured metric extraction and validation. The README documents major features not fully visible in the excerpts; edges for those are documented at the API boundary rather than implying unobserved internal call chains.

Main entry points: [`api_service.py`](https://github.com/muthuram3010/hyperverge-hackathon/blob/main/api_service.py) (FastAPI service), [`auditor_engine.py`](https://github.com/muthuram3010/hyperverge-hackathon/blob/main/auditor_engine.py) (Auditor engine), [`ingestion_pipeline.py`](https://github.com/muthuram3010/hyperverge-hackathon/blob/main/ingestion_pipeline.py) (Chunk and metadata), [`web/src/App.tsx`](https://github.com/muthuram3010/hyperverge-hackathon/blob/main/web/src/App.tsx) (React application)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_ingest["Filing ingestion"]
  node_pdfs["PDF filings"]
  node_azure_di["Document Intelligence"]
  node_chunking["Chunk and metadata"]
  node_chroma[("Chroma index")]
end

subgraph group_service["Auditing services"]
  node_api["FastAPI service<br/>[api_service.py]"]
  node_engine["Auditor engine<br/>[auditor_engine.py]"]
  node_rag["Scoped RAG<br/>[auditor_engine.py]"]
  node_comparative["Comparative audit<br/>[auditor_engine.py]"]
  node_time_series["Financial time series<br/>[auditor_engine.py]"]
  node_cli_auditor["CLI metric auditor<br/>[auditor_agent.py]"]
  node_bedrock["Amazon Bedrock"]
  node_pdf_service["PDF serving<br/>[api_service.py]"]
end

subgraph group_webui["React interface"]
  node_react["React application<br/>[App.tsx]"]
  node_web_api["Web API client<br/>[api.ts]"]
  node_citation_links["PDF citation links<br/>[pdfLinks.ts]"]
end

subgraph group_altui["Streamlit interface"]
  node_streamlit["Streamlit application<br/>[app.py]"]
end

node_filing_user(("Filing user"))

node_filing_user -->|"uploads or queries"| node_react
node_filing_user -->|"uses"| node_streamlit
node_react -->|"calls"| node_web_api
node_web_api -->|"sends requests"| node_api
node_api -->|"uses"| node_engine
node_api -->|"starts ingestion"| node_chunking
node_api -->|"serves citations"| node_pdf_service
node_filing_user -->|"provides filings"| node_pdfs
node_pdfs -->|"extracts and chunks"| node_chunking
node_chunking -->|"extracts layout"| node_azure_di
node_chunking -->|"upserts chunks"| node_chroma
node_engine -->|"queries index"| node_chroma
node_engine -->|"generates answers"| node_bedrock
node_engine -->|"provides retrieval"| node_rag
node_engine -->|"provides comparisons"| node_comparative
node_engine -->|"provides metrics"| node_time_series
node_api -->|"routes questions"| node_rag
node_api -->|"routes comparisons"| node_comparative
node_api -->|"routes time series"| node_time_series
node_cli_auditor -->|"retrieves chunks"| node_chroma
node_cli_auditor -->|"extracts metrics"| node_bedrock
node_streamlit -->|"uses auditor flows"| node_engine
node_react -->|"builds PDF links"| node_citation_links
node_citation_links -->|"opens citations"| node_pdf_service

click node_pdfs "https://github.com/muthuram3010/hyperverge-hackathon/tree/main/data"
click node_chunking "https://github.com/muthuram3010/hyperverge-hackathon/blob/main/ingestion_pipeline.py"
click node_api "https://github.com/muthuram3010/hyperverge-hackathon/blob/main/api_service.py"
click node_engine "https://github.com/muthuram3010/hyperverge-hackathon/blob/main/auditor_engine.py"
click node_rag "https://github.com/muthuram3010/hyperverge-hackathon/blob/main/auditor_engine.py"
click node_comparative "https://github.com/muthuram3010/hyperverge-hackathon/blob/main/auditor_engine.py"
click node_time_series "https://github.com/muthuram3010/hyperverge-hackathon/blob/main/auditor_engine.py"
click node_cli_auditor "https://github.com/muthuram3010/hyperverge-hackathon/blob/main/auditor_agent.py"
click node_pdf_service "https://github.com/muthuram3010/hyperverge-hackathon/blob/main/api_service.py"
click node_react "https://github.com/muthuram3010/hyperverge-hackathon/blob/main/web/src/App.tsx"
click node_web_api "https://github.com/muthuram3010/hyperverge-hackathon/blob/main/web/src/api.ts"
click node_citation_links "https://github.com/muthuram3010/hyperverge-hackathon/blob/main/web/src/pdfLinks.ts"
click node_streamlit "https://github.com/muthuram3010/hyperverge-hackathon/blob/main/app.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_pdfs,node_azure_di,node_chunking,node_chroma,node_filing_user toneBlue
class node_api,node_engine,node_rag,node_comparative,node_time_series,node_cli_auditor,node_bedrock,node_pdf_service toneAmber
class node_react,node_web_api,node_citation_links toneMint
class node_streamlit toneRose
```

## Components

### Filing ingestion

- [PDF filings](https://github.com/muthuram3010/hyperverge-hackathon/tree/main/data): `data`
- **Document Intelligence**
- [Chunk and metadata](https://github.com/muthuram3010/hyperverge-hackathon/blob/main/ingestion_pipeline.py): `ingestion_pipeline.py`
- **Chroma index**

### Auditing services

- [FastAPI service](https://github.com/muthuram3010/hyperverge-hackathon/blob/main/api_service.py): `api_service.py`
- [Auditor engine](https://github.com/muthuram3010/hyperverge-hackathon/blob/main/auditor_engine.py): `auditor_engine.py`
- [Scoped RAG](https://github.com/muthuram3010/hyperverge-hackathon/blob/main/auditor_engine.py): `auditor_engine.py`
- [Comparative audit](https://github.com/muthuram3010/hyperverge-hackathon/blob/main/auditor_engine.py): `auditor_engine.py`
- [Financial time series](https://github.com/muthuram3010/hyperverge-hackathon/blob/main/auditor_engine.py): `auditor_engine.py`
- [CLI metric auditor](https://github.com/muthuram3010/hyperverge-hackathon/blob/main/auditor_agent.py): `auditor_agent.py`
- **Amazon Bedrock**
- [PDF serving](https://github.com/muthuram3010/hyperverge-hackathon/blob/main/api_service.py): `api_service.py`

### React interface

- [React application](https://github.com/muthuram3010/hyperverge-hackathon/blob/main/web/src/App.tsx): `web/src/App.tsx`
- [Web API client](https://github.com/muthuram3010/hyperverge-hackathon/blob/main/web/src/api.ts): `web/src/api.ts`
- [PDF citation links](https://github.com/muthuram3010/hyperverge-hackathon/blob/main/web/src/pdfLinks.ts): `web/src/pdfLinks.ts`

### Streamlit interface

- [Streamlit application](https://github.com/muthuram3010/hyperverge-hackathon/blob/main/app.py): `app.py`

### Other components

- **Filing user**

## Connections

- Filing user → React application: uploads or queries (evidence: `README.md`)
- Filing user → Streamlit application: uses (evidence: `README.md`)
- React application → Web API client: calls (evidence: `web/src/App.tsx`)
- Web API client → FastAPI service: sends requests (evidence: `web/src/api.ts`)
- FastAPI service → Auditor engine: uses (evidence: `api_service.py`)
- FastAPI service → Chunk and metadata: starts ingestion (evidence: `README.md`)
- FastAPI service → PDF serving: serves citations (evidence: `README.md`)
- Filing user → PDF filings: provides filings (evidence: `README.md`)
- PDF filings → Chunk and metadata: extracts and chunks (evidence: `ingestion_pipeline.py`)
- Chunk and metadata → Document Intelligence: extracts layout (evidence: `ingestion_pipeline.py`)
- Chunk and metadata → Chroma index: upserts chunks (evidence: `ingestion_pipeline.py`)
- Auditor engine → Chroma index: queries index (evidence: `README.md`)
- Auditor engine → Amazon Bedrock: generates answers (evidence: `README.md`)
- Auditor engine → Scoped RAG: provides retrieval (evidence: `auditor_engine.py`)
- Auditor engine → Comparative audit: provides comparisons (evidence: `README.md`)
- Auditor engine → Financial time series: provides metrics (evidence: `README.md`)
- FastAPI service → Scoped RAG: routes questions (evidence: `README.md`)
- FastAPI service → Comparative audit: routes comparisons (evidence: `api_service.py`)
- FastAPI service → Financial time series: routes time series (evidence: `README.md`)
- CLI metric auditor → Chroma index: retrieves chunks (evidence: `auditor_agent.py`)
- CLI metric auditor → Amazon Bedrock: extracts metrics (evidence: `auditor_agent.py`)
- Streamlit application → Auditor engine: uses auditor flows (evidence: `app.py`)
- React application → PDF citation links: builds PDF links (evidence: `web/src/App.tsx`)
- PDF citation links → PDF serving: opens citations (evidence: `README.md`)
