# qdrant/qdrant_demo architecture

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

- Interactive diagram: https://gitdiagram.com/qdrant/qdrant_demo
- Repository: https://github.com/qdrant/qdrant_demo

## Overview

Startup Hybrid Search is a web demo for searching startup profiles with semantic, keyword, or hybrid retrieval. Users enter a query in the frontend, choose a retrieval mode, and receive ranked company records; the backend serves search and collection statistics from Qdrant. Separate loaders build collections from the startups and Crunchbase datasets. The graph preserves the documented retrieval modes and UI/API layers. Some frontend wiring and loader internals were not excerpted, so those relationships are included only where supported by the README or source index.

Main entry points: [`qdrant_demo/service.py`](https://github.com/qdrant/qdrant_demo/blob/master/qdrant_demo/service.py) (FastAPI service), [`qdrant_demo/neural_searcher.py`](https://github.com/qdrant/qdrant_demo/blob/master/qdrant_demo/neural_searcher.py) (Semantic and hybrid search), [`qdrant_demo/text_searcher.py`](https://github.com/qdrant/qdrant_demo/blob/master/qdrant_demo/text_searcher.py) (Keyword search), [`frontend/src/api/search.ts`](https://github.com/qdrant/qdrant_demo/blob/master/frontend/src/api/search.ts) (Search API client)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_ui["Search interface"]
  node_app["React app<br/>[App.tsx]"]
  node_home["Home page<br/>[index.tsx]"]
  node_mainsection["Search workspace<br/>[index.tsx]"]
  node_demosearch["Demo search<br/>[index.tsx]"]
  node_startupcard["Startup results<br/>[index.tsx]"]
  node_header["Custom header<br/>[index.tsx]"]
  node_logo["Brand logo<br/>[index.tsx]"]
end

subgraph group_client["Frontend API"]
  node_searchhook["Search state hook"]
  node_api["Search API client<br/>[search.ts]"]
  node_axios["HTTP client<br/>[axios.ts]"]
end

subgraph group_server["Search service"]
  node_service["FastAPI service<br/>[service.py]"]
  node_semantic["Semantic and hybrid search<br/>[neural_searcher.py]"]
  node_keyword["Keyword search<br/>[text_searcher.py]"]
  node_config["Runtime configuration<br/>[config.py]"]
end

subgraph group_indexing["Collection ingestion"]
  node_startup_loader["Startup collection loader"]
  node_crunchbase_loader["Crunchbase loader"]
end

node_user(("Search user"))
node_qdrant[("Qdrant collection")]
node_densemodel["Dense embedding model"]
node_sparsemodel["BM25 model"]

node_user -->|"uses"| node_app
node_app -->|"renders"| node_home
node_mainsection -->|"renders"| node_demosearch
node_mainsection -->|"renders"| node_startupcard
node_header -->|"renders"| node_logo
node_searchhook -->|"requests"| node_api
node_api -->|"uses"| node_axios
node_api -->|"calls search endpoint"| node_service
node_service -->|"dispatches semantic or hybrid"| node_semantic
node_service -->|"dispatches keyword"| node_keyword
node_service -->|"counts collection"| node_qdrant
node_semantic -->|"queries vectors"| node_qdrant
node_keyword -->|"queries sparse vector"| node_qdrant
node_semantic -->|"embeds queries"| node_densemodel
node_semantic -->|"embeds hybrid queries"| node_sparsemodel
node_keyword -->|"embeds queries"| node_sparsemodel
node_service -->|"reads settings"| node_config
node_semantic -->|"reads settings"| node_config
node_keyword -->|"reads settings"| node_config
node_startup_loader -->|"builds and loads"| node_qdrant
node_crunchbase_loader -->|"builds and loads"| node_qdrant

click node_app "https://github.com/qdrant/qdrant_demo/blob/master/frontend/src/App.tsx"
click node_home "https://github.com/qdrant/qdrant_demo/blob/master/frontend/src/pages/Home/index.tsx"
click node_mainsection "https://github.com/qdrant/qdrant_demo/blob/master/frontend/src/components/MainSection/index.tsx"
click node_demosearch "https://github.com/qdrant/qdrant_demo/blob/master/frontend/src/components/DemoSearch/index.tsx"
click node_startupcard "https://github.com/qdrant/qdrant_demo/blob/master/frontend/src/components/StartupCard/index.tsx"
click node_header "https://github.com/qdrant/qdrant_demo/blob/master/frontend/src/components/CustomHeader/index.tsx"
click node_logo "https://github.com/qdrant/qdrant_demo/blob/master/frontend/src/components/Logo/index.tsx"
click node_searchhook "https://github.com/qdrant/qdrant_demo/blob/master/frontend/src/hooks/useGetSearchResult.ts"
click node_api "https://github.com/qdrant/qdrant_demo/blob/master/frontend/src/api/search.ts"
click node_axios "https://github.com/qdrant/qdrant_demo/blob/master/frontend/src/api/axios.ts"
click node_service "https://github.com/qdrant/qdrant_demo/blob/master/qdrant_demo/service.py"
click node_semantic "https://github.com/qdrant/qdrant_demo/blob/master/qdrant_demo/neural_searcher.py"
click node_keyword "https://github.com/qdrant/qdrant_demo/blob/master/qdrant_demo/text_searcher.py"
click node_config "https://github.com/qdrant/qdrant_demo/blob/master/qdrant_demo/config.py"
click node_startup_loader "https://github.com/qdrant/qdrant_demo/blob/master/qdrant_demo/init_collection_startups.py"
click node_crunchbase_loader "https://github.com/qdrant/qdrant_demo/blob/master/qdrant_demo/init_collection_crunchbase.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_home,node_mainsection,node_demosearch,node_startupcard,node_header,node_logo,node_user toneBlue
class node_searchhook,node_api,node_axios,node_qdrant toneAmber
class node_service,node_semantic,node_keyword,node_config toneMint
class node_startup_loader,node_crunchbase_loader toneRose
class node_densemodel,node_sparsemodel toneIndigo
```

## Components

### Search interface

- [React app](https://github.com/qdrant/qdrant_demo/blob/master/frontend/src/App.tsx): `frontend/src/App.tsx`
- [Home page](https://github.com/qdrant/qdrant_demo/blob/master/frontend/src/pages/Home/index.tsx): `frontend/src/pages/Home/index.tsx`
- [Search workspace](https://github.com/qdrant/qdrant_demo/blob/master/frontend/src/components/MainSection/index.tsx): `frontend/src/components/MainSection/index.tsx`
- [Demo search](https://github.com/qdrant/qdrant_demo/blob/master/frontend/src/components/DemoSearch/index.tsx): `frontend/src/components/DemoSearch/index.tsx`
- [Startup results](https://github.com/qdrant/qdrant_demo/blob/master/frontend/src/components/StartupCard/index.tsx): `frontend/src/components/StartupCard/index.tsx`
- [Custom header](https://github.com/qdrant/qdrant_demo/blob/master/frontend/src/components/CustomHeader/index.tsx): `frontend/src/components/CustomHeader/index.tsx`
- [Brand logo](https://github.com/qdrant/qdrant_demo/blob/master/frontend/src/components/Logo/index.tsx): `frontend/src/components/Logo/index.tsx`

### Frontend API

- [Search state hook](https://github.com/qdrant/qdrant_demo/blob/master/frontend/src/hooks/useGetSearchResult.ts): `frontend/src/hooks/useGetSearchResult.ts`
- [Search API client](https://github.com/qdrant/qdrant_demo/blob/master/frontend/src/api/search.ts): `frontend/src/api/search.ts`
- [HTTP client](https://github.com/qdrant/qdrant_demo/blob/master/frontend/src/api/axios.ts): `frontend/src/api/axios.ts`

### Search service

- [FastAPI service](https://github.com/qdrant/qdrant_demo/blob/master/qdrant_demo/service.py): `qdrant_demo/service.py`
- [Semantic and hybrid search](https://github.com/qdrant/qdrant_demo/blob/master/qdrant_demo/neural_searcher.py): `qdrant_demo/neural_searcher.py`
- [Keyword search](https://github.com/qdrant/qdrant_demo/blob/master/qdrant_demo/text_searcher.py): `qdrant_demo/text_searcher.py`
- [Runtime configuration](https://github.com/qdrant/qdrant_demo/blob/master/qdrant_demo/config.py): `qdrant_demo/config.py`

### Collection ingestion

- [Startup collection loader](https://github.com/qdrant/qdrant_demo/blob/master/qdrant_demo/init_collection_startups.py): `qdrant_demo/init_collection_startups.py`
- [Crunchbase loader](https://github.com/qdrant/qdrant_demo/blob/master/qdrant_demo/init_collection_crunchbase.py): `qdrant_demo/init_collection_crunchbase.py`

### Other components

- **Search user**
- **Qdrant collection**
- **Dense embedding model**
- **BM25 model**

## Connections

- Search user → React app: uses (evidence: `README.md`)
- React app → Home page: renders (evidence: `frontend/src/App.tsx`)
- Search workspace → Demo search: renders (evidence: `frontend/src/components/MainSection/index.tsx`)
- Search workspace → Startup results: renders (evidence: `frontend/src/components/MainSection/index.tsx`)
- Custom header → Brand logo: renders (evidence: `frontend/src/components/CustomHeader/index.tsx`)
- Search state hook → Search API client: requests (evidence: `frontend/src/hooks/useGetSearchResult.ts`)
- Search API client → HTTP client: uses (evidence: `frontend/src/api/search.ts`)
- Search API client → FastAPI service: calls search endpoint (evidence: `README.md`)
- FastAPI service → Semantic and hybrid search: dispatches semantic or hybrid (evidence: `qdrant_demo/service.py`)
- FastAPI service → Keyword search: dispatches keyword (evidence: `qdrant_demo/service.py`)
- FastAPI service → Qdrant collection: counts collection (evidence: `qdrant_demo/service.py`)
- Semantic and hybrid search → Qdrant collection: queries vectors (evidence: `qdrant_demo/neural_searcher.py`)
- Keyword search → Qdrant collection: queries sparse vector (evidence: `qdrant_demo/text_searcher.py`)
- Semantic and hybrid search → Dense embedding model: embeds queries (evidence: `README.md`)
- Semantic and hybrid search → BM25 model: embeds hybrid queries (evidence: `README.md`)
- Keyword search → BM25 model: embeds queries (evidence: `README.md`)
- FastAPI service → Runtime configuration: reads settings (evidence: `qdrant_demo/service.py`)
- Semantic and hybrid search → Runtime configuration: reads settings (evidence: `qdrant_demo/neural_searcher.py`)
- Keyword search → Runtime configuration: reads settings (evidence: `qdrant_demo/text_searcher.py`)
- Startup collection loader → Qdrant collection: builds and loads (evidence: `README.md`)
- Crunchbase loader → Qdrant collection: builds and loads (evidence: `README.md`)
