# bloopai/bloop architecture

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

- Interactive diagram: https://gitdiagram.com/bloopai/bloop
- Repository: https://github.com/bloopai/bloop

## Overview

bloop is a desktop and web-style code assistant for searching, understanding, and editing repositories. The main workflow is to add or sync repositories, index their source, then search or ask questions; results appear in file, documentation, chat, and Code Studio views, where users can generate patches. The backend also provides regex search, symbol search, code navigation, and on-device semantic search. The graph combines documented product capabilities with relationships visible in the sampled source and source index; several frontend-to-server and unsampled subsystem links are therefore omitted.

Main entry points: [`server/bleep/src/webserver/query.rs`](https://github.com/bloopai/bloop/blob/oss/server/bleep/src/webserver/query.rs) (Query endpoint), [`client/src/App.tsx`](https://github.com/bloopai/bloop/blob/oss/client/src/App.tsx) (Client application), [`server/bleep/src/query/execute.rs`](https://github.com/bloopai/bloop/blob/oss/server/bleep/src/query/execute.rs) (Query execution), [`apps/desktop/src/App.tsx`](https://github.com/bloopai/bloop/blob/oss/apps/desktop/src/App.tsx) (Desktop host)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_client["Client experience"]
  node_clientapp["Client application<br/>[App.tsx]"]
  node_commandbar["Command bar<br/>[index.tsx]"]
  node_project["Project workspace<br/>[index.tsx]"]
  node_tabs["Tab state"]
  node_chat["Conversational search<br/>[index.tsx]"]
  node_studio["Code Studio<br/>[index.tsx]"]
  node_docview["Documentation view<br/>[index.tsx]"]
  node_regexui["Regex search UI<br/>[index.tsx]"]
  node_api["API client<br/>[api.ts]"]
end

subgraph group_ingest["Repository indexing"]
  node_repo["Repository management<br/>[repo.rs]"]
  node_sync["Remote sync<br/>[remotes.rs]"]
  node_collector["Source collector<br/>[collector.rs]"]
  node_indexes[("Search indexes<br/>[indexes.rs]")]
  node_db[("Persistent database<br/>[db.rs]")]
end

subgraph group_search["Search and navigation"]
  node_webquery["Query endpoint<br/>[query.rs]"]
  node_queryparse["Query parser<br/>[parser.rs]"]
  node_queryexec["Query execution<br/>[execute.rs]"]
  node_ranking["Result ranking<br/>[ranking.rs]"]
  node_navigation["Code navigation<br/>[intelligence.rs]"]
  node_semantic["Semantic search<br/>[semantic.rs]"]
end

subgraph group_assistant["AI assistance"]
  node_agent["Answer and code agent<br/>[agent.rs]"]
  node_llm["LLM client<br/>[client.rs]"]
end

subgraph group_runtime["Desktop runtime"]
  node_desktop["Desktop host<br/>[App.tsx]"]
  node_tauri["Tauri commands<br/>[main.rs]"]
  node_qdrant["Qdrant supervisor<br/>[qdrant.rs]"]
end

node_engineer(("Engineer"))

node_engineer -->|"uses"| node_desktop
node_desktop -->|"hosts"| node_clientapp
node_desktop -->|"invokes commands"| node_tauri
node_tauri -->|"registers plugin"| node_qdrant
node_clientapp -->|"renders"| node_project
node_clientapp -->|"renders"| node_commandbar
node_project -->|"uses tab state"| node_tabs
node_engineer -->|"selects actions"| node_commandbar
node_engineer -->|"asks questions"| node_chat
node_engineer -->|"creates patches"| node_studio
node_engineer -->|"searches code"| node_regexui
node_api -.->|"requests search"| node_webquery
node_webquery -->|"executes query"| node_queryexec
node_queryexec -->|"parses query"| node_queryparse
node_queryexec -->|"ranks results"| node_ranking
node_webquery -->|"reads and logs"| node_db
node_repo -.->|"iterates source"| node_collector
node_collector -.->|"builds indexes"| node_indexes
node_sync -.->|"updates repositories"| node_repo
node_engineer -->|"syncs repositories"| node_sync
node_engineer -->|"navigates symbols"| node_navigation
node_engineer -->|"searches by meaning"| node_semantic
node_chat -.->|"requests answers"| node_agent
node_studio -.->|"requests code"| node_agent
node_agent -.->|"calls model"| node_llm
node_webquery -.->|"searches"| node_indexes

click node_desktop "https://github.com/bloopai/bloop/blob/oss/apps/desktop/src/App.tsx"
click node_tauri "https://github.com/bloopai/bloop/blob/oss/apps/desktop/src-tauri/src/main.rs"
click node_qdrant "https://github.com/bloopai/bloop/blob/oss/apps/desktop/src-tauri/src/qdrant.rs"
click node_clientapp "https://github.com/bloopai/bloop/blob/oss/client/src/App.tsx"
click node_commandbar "https://github.com/bloopai/bloop/blob/oss/client/src/CommandBar/index.tsx"
click node_project "https://github.com/bloopai/bloop/blob/oss/client/src/Project/index.tsx"
click node_tabs "https://github.com/bloopai/bloop/blob/oss/client/src/context/providers/TabsContextProvider.tsx"
click node_chat "https://github.com/bloopai/bloop/blob/oss/client/src/Project/CurrentTabContent/ChatTab/index.tsx"
click node_studio "https://github.com/bloopai/bloop/blob/oss/client/src/Project/CurrentTabContent/StudioTab/index.tsx"
click node_docview "https://github.com/bloopai/bloop/blob/oss/client/src/Project/CurrentTabContent/DocTab/index.tsx"
click node_regexui "https://github.com/bloopai/bloop/blob/oss/client/src/Project/LeftSidebar/RegexSearchPanel/index.tsx"
click node_api "https://github.com/bloopai/bloop/blob/oss/client/src/services/api.ts"
click node_repo "https://github.com/bloopai/bloop/blob/oss/server/bleep/src/repo.rs"
click node_sync "https://github.com/bloopai/bloop/blob/oss/server/bleep/src/remotes.rs"
click node_collector "https://github.com/bloopai/bloop/blob/oss/server/bleep/src/collector.rs"
click node_indexes "https://github.com/bloopai/bloop/blob/oss/server/bleep/src/indexes.rs"
click node_webquery "https://github.com/bloopai/bloop/blob/oss/server/bleep/src/webserver/query.rs"
click node_queryparse "https://github.com/bloopai/bloop/blob/oss/server/bleep/src/query/parser.rs"
click node_queryexec "https://github.com/bloopai/bloop/blob/oss/server/bleep/src/query/execute.rs"
click node_ranking "https://github.com/bloopai/bloop/blob/oss/server/bleep/src/query/ranking.rs"
click node_navigation "https://github.com/bloopai/bloop/blob/oss/server/bleep/src/intelligence.rs"
click node_semantic "https://github.com/bloopai/bloop/blob/oss/server/bleep/src/semantic.rs"
click node_agent "https://github.com/bloopai/bloop/blob/oss/server/bleep/src/agent.rs"
click node_llm "https://github.com/bloopai/bloop/blob/oss/server/bleep/src/llm/client.rs"
click node_db "https://github.com/bloopai/bloop/blob/oss/server/bleep/src/db.rs"

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_clientapp,node_commandbar,node_project,node_tabs,node_chat,node_studio,node_docview,node_regexui,node_api toneBlue
class node_repo,node_sync,node_collector,node_indexes,node_db toneAmber
class node_webquery,node_queryparse,node_queryexec,node_ranking,node_navigation,node_semantic toneMint
class node_agent,node_llm toneRose
class node_desktop,node_tauri,node_qdrant,node_engineer toneIndigo
```

## Components

### Client experience

- [Client application](https://github.com/bloopai/bloop/blob/oss/client/src/App.tsx): `client/src/App.tsx`
- [Command bar](https://github.com/bloopai/bloop/blob/oss/client/src/CommandBar/index.tsx): `client/src/CommandBar/index.tsx`
- [Project workspace](https://github.com/bloopai/bloop/blob/oss/client/src/Project/index.tsx): `client/src/Project/index.tsx`
- [Tab state](https://github.com/bloopai/bloop/blob/oss/client/src/context/providers/TabsContextProvider.tsx): `client/src/context/providers/TabsContextProvider.tsx`
- [Conversational search](https://github.com/bloopai/bloop/blob/oss/client/src/Project/CurrentTabContent/ChatTab/index.tsx): `client/src/Project/CurrentTabContent/ChatTab/index.tsx`
- [Code Studio](https://github.com/bloopai/bloop/blob/oss/client/src/Project/CurrentTabContent/StudioTab/index.tsx): `client/src/Project/CurrentTabContent/StudioTab/index.tsx`
- [Documentation view](https://github.com/bloopai/bloop/blob/oss/client/src/Project/CurrentTabContent/DocTab/index.tsx): `client/src/Project/CurrentTabContent/DocTab/index.tsx`
- [Regex search UI](https://github.com/bloopai/bloop/blob/oss/client/src/Project/LeftSidebar/RegexSearchPanel/index.tsx): `client/src/Project/LeftSidebar/RegexSearchPanel/index.tsx`
- [API client](https://github.com/bloopai/bloop/blob/oss/client/src/services/api.ts): `client/src/services/api.ts`

### Repository indexing

- [Repository management](https://github.com/bloopai/bloop/blob/oss/server/bleep/src/repo.rs): `server/bleep/src/repo.rs`
- [Remote sync](https://github.com/bloopai/bloop/blob/oss/server/bleep/src/remotes.rs): `server/bleep/src/remotes.rs`
- [Source collector](https://github.com/bloopai/bloop/blob/oss/server/bleep/src/collector.rs): `server/bleep/src/collector.rs`
- [Search indexes](https://github.com/bloopai/bloop/blob/oss/server/bleep/src/indexes.rs): `server/bleep/src/indexes.rs`
- [Persistent database](https://github.com/bloopai/bloop/blob/oss/server/bleep/src/db.rs): `server/bleep/src/db.rs`

### Search and navigation

- [Query endpoint](https://github.com/bloopai/bloop/blob/oss/server/bleep/src/webserver/query.rs): `server/bleep/src/webserver/query.rs`
- [Query parser](https://github.com/bloopai/bloop/blob/oss/server/bleep/src/query/parser.rs): `server/bleep/src/query/parser.rs`
- [Query execution](https://github.com/bloopai/bloop/blob/oss/server/bleep/src/query/execute.rs): `server/bleep/src/query/execute.rs`
- [Result ranking](https://github.com/bloopai/bloop/blob/oss/server/bleep/src/query/ranking.rs): `server/bleep/src/query/ranking.rs`
- [Code navigation](https://github.com/bloopai/bloop/blob/oss/server/bleep/src/intelligence.rs): `server/bleep/src/intelligence.rs`
- [Semantic search](https://github.com/bloopai/bloop/blob/oss/server/bleep/src/semantic.rs): `server/bleep/src/semantic.rs`

### AI assistance

- [Answer and code agent](https://github.com/bloopai/bloop/blob/oss/server/bleep/src/agent.rs): `server/bleep/src/agent.rs`
- [LLM client](https://github.com/bloopai/bloop/blob/oss/server/bleep/src/llm/client.rs): `server/bleep/src/llm/client.rs`

### Desktop runtime

- [Desktop host](https://github.com/bloopai/bloop/blob/oss/apps/desktop/src/App.tsx): `apps/desktop/src/App.tsx`
- [Tauri commands](https://github.com/bloopai/bloop/blob/oss/apps/desktop/src-tauri/src/main.rs): `apps/desktop/src-tauri/src/main.rs`
- [Qdrant supervisor](https://github.com/bloopai/bloop/blob/oss/apps/desktop/src-tauri/src/qdrant.rs): `apps/desktop/src-tauri/src/qdrant.rs`

### Other components

- **Engineer**

## Connections

- Engineer → Desktop host: uses
- Desktop host → Client application: hosts (evidence: `apps/desktop/src/App.tsx`)
- Desktop host → Tauri commands: invokes commands (evidence: `apps/desktop/src/App.tsx`)
- Tauri commands → Qdrant supervisor: registers plugin (evidence: `apps/desktop/src-tauri/src/main.rs`)
- Client application → Project workspace: renders (evidence: `client/src/App.tsx`)
- Client application → Command bar: renders (evidence: `client/src/App.tsx`)
- Project workspace → Tab state: uses tab state (evidence: `client/src/Project/index.tsx`)
- Engineer → Command bar: selects actions
- Engineer → Conversational search: asks questions
- Engineer → Code Studio: creates patches
- Engineer → Regex search UI: searches code
- API client → Query endpoint: requests search
- Query endpoint → Query execution: executes query (evidence: `server/bleep/src/webserver/query.rs`)
- Query execution → Query parser: parses query (evidence: `server/bleep/src/query/execute.rs`)
- Query execution → Result ranking: ranks results (evidence: `server/bleep/src/query/execute.rs`)
- Query endpoint → Persistent database: reads and logs (evidence: `server/bleep/src/webserver/query.rs`)
- Repository management → Source collector: iterates source
- Source collector → Search indexes: builds indexes
- Remote sync → Repository management: updates repositories
- Engineer → Remote sync: syncs repositories
- Engineer → Code navigation: navigates symbols
- Engineer → Semantic search: searches by meaning
- Conversational search → Answer and code agent: requests answers
- Code Studio → Answer and code agent: requests code
- Answer and code agent → LLM client: calls model
- Query endpoint → Search indexes: searches
