# 22071a0473-blip/quantmind architecture

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

- Interactive diagram: https://gitdiagram.com/22071a0473-blip/quantmind
- Repository: https://github.com/22071a0473-blip/quantmind

## Overview

QuantMind is an evidence-grounded research terminal for equities, ETFs, and crypto, not a trading system. Users search the asset universe, open a stock research view, and receive a report combining live market evidence, deterministic signals and confidence coverage, historical precedent, and a cautious narrative. The core orchestration and memory lifecycle are visible in the engine excerpts; README documents SEC/event backfill and additional research capabilities whose runtime wiring is not fully sampled. Edges reflect shown calls or explicit README architecture, with unsampled links omitted.

Main entry points: [`quantmind/engine.py`](https://github.com/22071a0473-blip/quantmind/blob/main/quantmind/engine.py) (Research engine), [`web/src/main.tsx`](https://github.com/22071a0473-blip/quantmind/blob/main/web/src/main.tsx) (Web terminal), [`quantmind/memory.py`](https://github.com/22071a0473-blip/quantmind/blob/main/quantmind/memory.py) (Hindsight adapter), [`web/src/lib/api.ts`](https://github.com/22071a0473-blip/quantmind/blob/main/web/src/lib/api.ts) (Web API client)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_web["Research interface"]
  node_webapp["Web terminal<br/>[main.tsx]"]
  node_search["Asset search<br/>[SearchPalette.tsx]"]
  node_api_client["Web API client<br/>[api.ts]"]
  node_stock_page["Stock research view<br/>[StockPage.tsx]"]
  node_memory_page["Memory view<br/>[MemoryPage.tsx]"]
  node_home_page["Research home<br/>[HomePage.tsx]"]
end

subgraph group_api["API and orchestration"]
  node_fastapi["FastAPI routes<br/>[app.py]"]
  node_engine["Research engine<br/>[engine.py]"]
  node_models["Report models<br/>[models.py]"]
end

subgraph group_research["Evidence and analysis"]
  node_market_sources["Live market sources<br/>[sources.py]"]
  node_analytics["Deterministic analytics<br/>[analytics.py]"]
  node_confidence["Confidence audit"]
  node_synthesis["Evidence synthesis<br/>[llm.py]"]
  node_event_records["Event records<br/>[events.py]"]
  node_sec_events["SEC event extraction<br/>[sec_events.py]"]
  node_event_taxonomy["Event taxonomy<br/>[taxonomy.py]"]
  node_curated_events["Curated event labels<br/>[curated_events.py]"]
  node_universe[("Asset universe<br/>[universe.py]")]
  node_groq["Groq"]
  node_market_providers["Market data providers"]
  node_sec_edgar["SEC EDGAR"]
end

subgraph group_memory["Historical memory"]
  node_memory_adapter["Hindsight adapter<br/>[memory.py]"]
  node_event_memory["Event memory format<br/>[event_memory.py]"]
  node_hindsight[("Hindsight Cloud")]
end

node_researcher(("Market researcher"))

node_researcher -.->|"uses"| node_webapp
node_webapp -->|"hosts"| node_search
node_webapp -->|"routes"| node_home_page
node_webapp -->|"routes"| node_stock_page
node_webapp -->|"routes"| node_memory_page
node_search -->|"searches via"| node_api_client
node_stock_page -.->|"loads research via"| node_api_client
node_memory_page -.->|"loads memory via"| node_api_client
node_api_client -.->|"requests"| node_fastapi
node_fastapi -->|"requests research"| node_engine
node_fastapi -->|"lists assets"| node_universe
node_engine -->|"gathers evidence"| node_market_sources
node_market_sources -.->|"fetches data"| node_market_providers
node_engine -->|"recalls history"| node_memory_adapter
node_engine -->|"calculates signals"| node_analytics
node_engine -->|"audits coverage"| node_confidence
node_engine -->|"synthesizes report"| node_synthesis
node_synthesis -->|"calls model"| node_groq
node_engine -->|"retains report"| node_memory_adapter
node_engine -->|"requests reflection"| node_memory_adapter
node_memory_adapter -->|"recalls and retains"| node_hindsight
node_memory_adapter -->|"builds precedent"| node_models
node_engine -->|"returns report"| node_models
node_sec_events -.->|"reads filings"| node_sec_edgar
node_sec_events -->|"classifies events"| node_event_taxonomy
node_event_records -->|"uses categories"| node_event_taxonomy
node_curated_events -->|"uses categories"| node_event_taxonomy
node_event_memory -.->|"stores precedents"| node_hindsight
node_event_memory -.->|"records events"| node_event_records

click node_webapp "https://github.com/22071a0473-blip/quantmind/blob/main/web/src/main.tsx"
click node_search "https://github.com/22071a0473-blip/quantmind/blob/main/web/src/components/SearchPalette.tsx"
click node_api_client "https://github.com/22071a0473-blip/quantmind/blob/main/web/src/lib/api.ts"
click node_stock_page "https://github.com/22071a0473-blip/quantmind/blob/main/web/src/pages/StockPage.tsx"
click node_memory_page "https://github.com/22071a0473-blip/quantmind/blob/main/web/src/pages/MemoryPage.tsx"
click node_home_page "https://github.com/22071a0473-blip/quantmind/blob/main/web/src/pages/HomePage.tsx"
click node_fastapi "https://github.com/22071a0473-blip/quantmind/blob/main/quantmind/app.py"
click node_engine "https://github.com/22071a0473-blip/quantmind/blob/main/quantmind/engine.py"
click node_models "https://github.com/22071a0473-blip/quantmind/blob/main/quantmind/models.py"
click node_market_sources "https://github.com/22071a0473-blip/quantmind/blob/main/quantmind/sources.py"
click node_analytics "https://github.com/22071a0473-blip/quantmind/blob/main/quantmind/analytics.py"
click node_confidence "https://github.com/22071a0473-blip/quantmind/blob/main/quantmind/confidence_engine.py"
click node_synthesis "https://github.com/22071a0473-blip/quantmind/blob/main/quantmind/llm.py"
click node_event_records "https://github.com/22071a0473-blip/quantmind/blob/main/quantmind/events.py"
click node_sec_events "https://github.com/22071a0473-blip/quantmind/blob/main/quantmind/sec_events.py"
click node_event_taxonomy "https://github.com/22071a0473-blip/quantmind/blob/main/quantmind/taxonomy.py"
click node_curated_events "https://github.com/22071a0473-blip/quantmind/blob/main/quantmind/curated_events.py"
click node_universe "https://github.com/22071a0473-blip/quantmind/blob/main/quantmind/universe.py"
click node_memory_adapter "https://github.com/22071a0473-blip/quantmind/blob/main/quantmind/memory.py"
click node_event_memory "https://github.com/22071a0473-blip/quantmind/blob/main/quantmind/event_memory.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_webapp,node_search,node_api_client,node_stock_page,node_memory_page,node_home_page toneBlue
class node_fastapi,node_engine,node_models toneAmber
class node_market_sources,node_analytics,node_confidence,node_synthesis,node_event_records,node_sec_events,node_event_taxonomy,node_curated_events,node_universe,node_groq,node_market_providers,node_sec_edgar toneMint
class node_memory_adapter,node_event_memory,node_hindsight toneRose
class node_researcher toneIndigo
```

## Components

### Research interface

- [Web terminal](https://github.com/22071a0473-blip/quantmind/blob/main/web/src/main.tsx): `web/src/main.tsx`
- [Asset search](https://github.com/22071a0473-blip/quantmind/blob/main/web/src/components/SearchPalette.tsx): `web/src/components/SearchPalette.tsx`
- [Web API client](https://github.com/22071a0473-blip/quantmind/blob/main/web/src/lib/api.ts): `web/src/lib/api.ts`
- [Stock research view](https://github.com/22071a0473-blip/quantmind/blob/main/web/src/pages/StockPage.tsx): `web/src/pages/StockPage.tsx`
- [Memory view](https://github.com/22071a0473-blip/quantmind/blob/main/web/src/pages/MemoryPage.tsx): `web/src/pages/MemoryPage.tsx`
- [Research home](https://github.com/22071a0473-blip/quantmind/blob/main/web/src/pages/HomePage.tsx): `web/src/pages/HomePage.tsx`

### API and orchestration

- [FastAPI routes](https://github.com/22071a0473-blip/quantmind/blob/main/quantmind/app.py): `quantmind/app.py`
- [Research engine](https://github.com/22071a0473-blip/quantmind/blob/main/quantmind/engine.py): `quantmind/engine.py`
- [Report models](https://github.com/22071a0473-blip/quantmind/blob/main/quantmind/models.py): `quantmind/models.py`

### Evidence and analysis

- [Live market sources](https://github.com/22071a0473-blip/quantmind/blob/main/quantmind/sources.py): `quantmind/sources.py`
- [Deterministic analytics](https://github.com/22071a0473-blip/quantmind/blob/main/quantmind/analytics.py): `quantmind/analytics.py`
- [Confidence audit](https://github.com/22071a0473-blip/quantmind/blob/main/quantmind/confidence_engine.py): `quantmind/confidence_engine.py`
- [Evidence synthesis](https://github.com/22071a0473-blip/quantmind/blob/main/quantmind/llm.py): `quantmind/llm.py`
- [Event records](https://github.com/22071a0473-blip/quantmind/blob/main/quantmind/events.py): `quantmind/events.py`
- [SEC event extraction](https://github.com/22071a0473-blip/quantmind/blob/main/quantmind/sec_events.py): `quantmind/sec_events.py`
- [Event taxonomy](https://github.com/22071a0473-blip/quantmind/blob/main/quantmind/taxonomy.py): `quantmind/taxonomy.py`
- [Curated event labels](https://github.com/22071a0473-blip/quantmind/blob/main/quantmind/curated_events.py): `quantmind/curated_events.py`
- [Asset universe](https://github.com/22071a0473-blip/quantmind/blob/main/quantmind/universe.py): `quantmind/universe.py`
- **Groq**
- **Market data providers**
- **SEC EDGAR**

### Historical memory

- [Hindsight adapter](https://github.com/22071a0473-blip/quantmind/blob/main/quantmind/memory.py): `quantmind/memory.py`
- [Event memory format](https://github.com/22071a0473-blip/quantmind/blob/main/quantmind/event_memory.py): `quantmind/event_memory.py`
- **Hindsight Cloud**

### Other components

- **Market researcher**

## Connections

- Market researcher → Web terminal: uses (evidence: `README.md`)
- Web terminal → Asset search: hosts (evidence: `web/src/main.tsx`)
- Web terminal → Research home: routes (evidence: `web/src/main.tsx`)
- Web terminal → Stock research view: routes (evidence: `web/src/main.tsx`)
- Web terminal → Memory view: routes (evidence: `web/src/main.tsx`)
- Asset search → Web API client: searches via (evidence: `web/src/components/SearchPalette.tsx`)
- Stock research view → Web API client: loads research via
- Memory view → Web API client: loads memory via
- Web API client → FastAPI routes: requests
- FastAPI routes → Research engine: requests research (evidence: `quantmind/app.py`)
- FastAPI routes → Asset universe: lists assets (evidence: `quantmind/app.py`)
- Research engine → Live market sources: gathers evidence (evidence: `quantmind/engine.py`)
- Live market sources → Market data providers: fetches data (evidence: `README.md`)
- Research engine → Hindsight adapter: recalls history (evidence: `quantmind/engine.py`)
- Research engine → Deterministic analytics: calculates signals (evidence: `quantmind/engine.py`)
- Research engine → Confidence audit: audits coverage (evidence: `quantmind/engine.py`)
- Research engine → Evidence synthesis: synthesizes report (evidence: `quantmind/engine.py`)
- Evidence synthesis → Groq: calls model (evidence: `quantmind/llm.py`)
- Research engine → Hindsight adapter: retains report (evidence: `quantmind/engine.py`)
- Research engine → Hindsight adapter: requests reflection (evidence: `quantmind/engine.py`)
- Hindsight adapter → Hindsight Cloud: recalls and retains (evidence: `quantmind/memory.py`)
- Hindsight adapter → Report models: builds precedent (evidence: `quantmind/memory.py`)
- Research engine → Report models: returns report (evidence: `quantmind/engine.py`)
- SEC event extraction → SEC EDGAR: reads filings (evidence: `README.md`)
- SEC event extraction → Event taxonomy: classifies events (evidence: `quantmind/sec_events.py`)
- Event records → Event taxonomy: uses categories (evidence: `quantmind/events.py`)
- Curated event labels → Event taxonomy: uses categories (evidence: `quantmind/curated_events.py`)
- Event memory format → Hindsight Cloud: stores precedents (evidence: `README.md`)
- Event memory format → Event records: records events (evidence: `README.md`)
