# volcengine/minecontext architecture

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

- Interactive diagram: https://gitdiagram.com/volcengine/minecontext
- Repository: https://github.com/volcengine/minecontext

## Overview

MineContext is a local-first desktop context assistant. Users enable screen recording; captured and other collected context is processed, stored, and later used for proactive summaries, activities, tips, and todos, or resurfaced through AI chat. The graph combines documented product stages with connections visible in the provided source index and excerpts. Several backend routes and frontend service links were not sampled, so those relationships are omitted rather than inferred.

Main entry points: [`frontend/src/renderer/src/App.tsx`](https://github.com/volcengine/minecontext/blob/main/frontend/src/renderer/src/App.tsx) (Desktop UI), [`opencontext/storage/global_storage.py`](https://github.com/volcengine/minecontext/blob/main/opencontext/storage/global_storage.py) (Storage facade), [`opencontext/llm/global_vlm_client.py`](https://github.com/volcengine/minecontext/blob/main/opencontext/llm/global_vlm_client.py) (VLM client), [`opencontext/context_consumption/generation/smart_todo_manager.py`](https://github.com/volcengine/minecontext/blob/main/opencontext/context_consumption/generation/smart_todo_manager.py) (Proactive generation)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_desktop["Desktop experience"]
  node_desktop_ui["Desktop UI<br/>[App.tsx]"]
  node_settings["Settings<br/>[settings.tsx]"]
  node_screen_monitor_ui["Screen monitor<br/>[screen-monitor.tsx]"]
  node_home_ui["Home dashboard<br/>[home-page.tsx]"]
  node_chat_ui["AI chat<br/>[index.tsx]"]
  node_vault_ui["Vault browser<br/>[Vault.tsx]"]
end

subgraph group_capture["Context collection"]
  node_capture["Screen capture"]
  node_capture_sources["Capture sources"]
end

subgraph group_backend["Context lifecycle"]
  node_capture_manager["Capture manager<br/>[capture_manager.py]"]
  node_processor_manager["Processor manager"]
  node_context_processing["Context processing<br/>[context_merger.py]"]
  node_storage_api["Storage facade<br/>[global_storage.py]"]
  node_unified_storage["Unified storage<br/>[unified_storage.py]"]
  node_sqlite_store[("SQLite backend<br/>[sqlite_backend.py]")]
end

subgraph group_intelligence["AI and generation"]
  node_consumption_manager["Consumption scheduler"]
  node_generation["Proactive generation"]
  node_agent["Context agent<br/>[agent.py]"]
  node_tool_executor["Tool executor<br/>[tools_executor.py]"]
  node_completion["Completion service"]
end

subgraph group_platform["Shared platform"]
  node_context_model["Context models<br/>[context.py]"]
  node_vlm_client["VLM client"]
  node_embedding_client["Embedding client"]
  node_llm_client["LLM client<br/>[llm_client.py]"]
  node_configuration["Configuration<br/>[global_config.py]"]
  node_prompts["Prompt manager<br/>[prompt_manager.py]"]
end

node_user(("User"))

node_user -->|"uses"| node_desktop_ui
node_desktop_ui -->|"routes to"| node_settings
node_desktop_ui -->|"routes to"| node_screen_monitor_ui
node_desktop_ui -->|"routes to"| node_home_ui
node_desktop_ui -.->|"opens"| node_chat_ui
node_desktop_ui -->|"routes to"| node_vault_ui
node_user -->|"starts recording"| node_screen_monitor_ui
node_screen_monitor_ui -.->|"controls"| node_capture
node_capture -.->|"gets sources"| node_capture_sources
node_capture_manager -->|"dispatches context"| node_processor_manager
node_processor_manager -.->|"processes context"| node_context_processing
node_context_processing -->|"creates context"| node_context_model
node_context_processing -->|"stores context"| node_storage_api
node_storage_api -->|"delegates storage"| node_unified_storage
node_unified_storage -->|"dispatches storage"| node_sqlite_store
node_consumption_manager -->|"schedules generation"| node_generation
node_generation -->|"retrieves context"| node_storage_api
node_generation -->|"generates insights"| node_vlm_client
node_generation -.->|"delivers summaries and tasks"| node_home_ui
node_chat_ui -.->|"submits questions"| node_agent
node_agent -->|"dispatches tools"| node_tool_executor
node_agent -->|"requests responses"| node_vlm_client
node_completion -->|"requests completion"| node_vlm_client
node_completion -->|"reads context"| node_storage_api
node_vlm_client -->|"uses model client"| node_llm_client
node_embedding_client -->|"uses model client"| node_llm_client
node_storage_api -.->|"vectorizes context"| node_embedding_client
node_configuration -->|"configures prompts"| node_prompts
node_vlm_client -->|"loads model config"| node_configuration
node_embedding_client -->|"loads model config"| node_configuration

click node_desktop_ui "https://github.com/volcengine/minecontext/blob/main/frontend/src/renderer/src/App.tsx"
click node_settings "https://github.com/volcengine/minecontext/blob/main/frontend/src/renderer/src/pages/settings/settings.tsx"
click node_screen_monitor_ui "https://github.com/volcengine/minecontext/blob/main/frontend/src/renderer/src/pages/screen-monitor/screen-monitor.tsx"
click node_home_ui "https://github.com/volcengine/minecontext/blob/main/frontend/src/renderer/src/pages/home/home-page.tsx"
click node_chat_ui "https://github.com/volcengine/minecontext/blob/main/frontend/src/renderer/src/components/ai-assistant/index.tsx"
click node_vault_ui "https://github.com/volcengine/minecontext/blob/main/frontend/src/renderer/src/pages/vault/Vault.tsx"
click node_capture "https://github.com/volcengine/minecontext/blob/main/frontend/src/main/background/task/screen-monitor-task.ts"
click node_capture_sources "https://github.com/volcengine/minecontext/blob/main/frontend/src/main/utils/get-capture-sources.ts"
click node_capture_manager "https://github.com/volcengine/minecontext/blob/main/opencontext/managers/capture_manager.py"
click node_processor_manager "https://github.com/volcengine/minecontext/blob/main/opencontext/managers/processor_manager.py"
click node_context_processing "https://github.com/volcengine/minecontext/blob/main/opencontext/context_processing/merger/context_merger.py"
click node_context_model "https://github.com/volcengine/minecontext/blob/main/opencontext/models/context.py"
click node_storage_api "https://github.com/volcengine/minecontext/blob/main/opencontext/storage/global_storage.py"
click node_unified_storage "https://github.com/volcengine/minecontext/blob/main/opencontext/storage/unified_storage.py"
click node_sqlite_store "https://github.com/volcengine/minecontext/blob/main/opencontext/storage/backends/sqlite_backend.py"
click node_consumption_manager "https://github.com/volcengine/minecontext/blob/main/opencontext/managers/consumption_manager.py"
click node_generation "https://github.com/volcengine/minecontext/blob/main/opencontext/context_consumption/generation/smart_todo_manager.py"
click node_agent "https://github.com/volcengine/minecontext/blob/main/opencontext/context_consumption/context_agent/agent.py"
click node_tool_executor "https://github.com/volcengine/minecontext/blob/main/opencontext/tools/tools_executor.py"
click node_completion "https://github.com/volcengine/minecontext/blob/main/opencontext/context_consumption/completion/completion_service.py"
click node_vlm_client "https://github.com/volcengine/minecontext/blob/main/opencontext/llm/global_vlm_client.py"
click node_embedding_client "https://github.com/volcengine/minecontext/blob/main/opencontext/llm/global_embedding_client.py"
click node_llm_client "https://github.com/volcengine/minecontext/blob/main/opencontext/llm/llm_client.py"
click node_configuration "https://github.com/volcengine/minecontext/blob/main/opencontext/config/global_config.py"
click node_prompts "https://github.com/volcengine/minecontext/blob/main/opencontext/config/prompt_manager.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_desktop_ui,node_settings,node_screen_monitor_ui,node_home_ui,node_chat_ui,node_vault_ui,node_user toneBlue
class node_capture,node_capture_sources toneAmber
class node_capture_manager,node_processor_manager,node_context_processing,node_storage_api,node_unified_storage,node_sqlite_store toneMint
class node_consumption_manager,node_generation,node_agent,node_tool_executor,node_completion toneRose
class node_context_model,node_vlm_client,node_embedding_client,node_llm_client,node_configuration,node_prompts toneIndigo
```

## Components

### Desktop experience

- [Desktop UI](https://github.com/volcengine/minecontext/blob/main/frontend/src/renderer/src/App.tsx): `frontend/src/renderer/src/App.tsx`
- [Settings](https://github.com/volcengine/minecontext/blob/main/frontend/src/renderer/src/pages/settings/settings.tsx): `frontend/src/renderer/src/pages/settings/settings.tsx`
- [Screen monitor](https://github.com/volcengine/minecontext/blob/main/frontend/src/renderer/src/pages/screen-monitor/screen-monitor.tsx): `frontend/src/renderer/src/pages/screen-monitor/screen-monitor.tsx`
- [Home dashboard](https://github.com/volcengine/minecontext/blob/main/frontend/src/renderer/src/pages/home/home-page.tsx): `frontend/src/renderer/src/pages/home/home-page.tsx`
- [AI chat](https://github.com/volcengine/minecontext/blob/main/frontend/src/renderer/src/components/ai-assistant/index.tsx): `frontend/src/renderer/src/components/ai-assistant/index.tsx`
- [Vault browser](https://github.com/volcengine/minecontext/blob/main/frontend/src/renderer/src/pages/vault/Vault.tsx): `frontend/src/renderer/src/pages/vault/Vault.tsx`

### Context collection

- [Screen capture](https://github.com/volcengine/minecontext/blob/main/frontend/src/main/background/task/screen-monitor-task.ts): `frontend/src/main/background/task/screen-monitor-task.ts`
- [Capture sources](https://github.com/volcengine/minecontext/blob/main/frontend/src/main/utils/get-capture-sources.ts): `frontend/src/main/utils/get-capture-sources.ts`

### Context lifecycle

- [Capture manager](https://github.com/volcengine/minecontext/blob/main/opencontext/managers/capture_manager.py): `opencontext/managers/capture_manager.py`
- [Processor manager](https://github.com/volcengine/minecontext/blob/main/opencontext/managers/processor_manager.py): `opencontext/managers/processor_manager.py`
- [Context processing](https://github.com/volcengine/minecontext/blob/main/opencontext/context_processing/merger/context_merger.py): `opencontext/context_processing/merger/context_merger.py`
- [Storage facade](https://github.com/volcengine/minecontext/blob/main/opencontext/storage/global_storage.py): `opencontext/storage/global_storage.py`
- [Unified storage](https://github.com/volcengine/minecontext/blob/main/opencontext/storage/unified_storage.py): `opencontext/storage/unified_storage.py`
- [SQLite backend](https://github.com/volcengine/minecontext/blob/main/opencontext/storage/backends/sqlite_backend.py): `opencontext/storage/backends/sqlite_backend.py`

### AI and generation

- [Consumption scheduler](https://github.com/volcengine/minecontext/blob/main/opencontext/managers/consumption_manager.py): `opencontext/managers/consumption_manager.py`
- [Proactive generation](https://github.com/volcengine/minecontext/blob/main/opencontext/context_consumption/generation/smart_todo_manager.py): `opencontext/context_consumption/generation/smart_todo_manager.py`
- [Context agent](https://github.com/volcengine/minecontext/blob/main/opencontext/context_consumption/context_agent/agent.py): `opencontext/context_consumption/context_agent/agent.py`
- [Tool executor](https://github.com/volcengine/minecontext/blob/main/opencontext/tools/tools_executor.py): `opencontext/tools/tools_executor.py`
- [Completion service](https://github.com/volcengine/minecontext/blob/main/opencontext/context_consumption/completion/completion_service.py): `opencontext/context_consumption/completion/completion_service.py`

### Shared platform

- [Context models](https://github.com/volcengine/minecontext/blob/main/opencontext/models/context.py): `opencontext/models/context.py`
- [VLM client](https://github.com/volcengine/minecontext/blob/main/opencontext/llm/global_vlm_client.py): `opencontext/llm/global_vlm_client.py`
- [Embedding client](https://github.com/volcengine/minecontext/blob/main/opencontext/llm/global_embedding_client.py): `opencontext/llm/global_embedding_client.py`
- [LLM client](https://github.com/volcengine/minecontext/blob/main/opencontext/llm/llm_client.py): `opencontext/llm/llm_client.py`
- [Configuration](https://github.com/volcengine/minecontext/blob/main/opencontext/config/global_config.py): `opencontext/config/global_config.py`
- [Prompt manager](https://github.com/volcengine/minecontext/blob/main/opencontext/config/prompt_manager.py): `opencontext/config/prompt_manager.py`

### Other components

- **User**

## Connections

- User → Desktop UI: uses (evidence: `README.md`)
- Desktop UI → Settings: routes to (evidence: `frontend/src/renderer/src/App.tsx`)
- Desktop UI → Screen monitor: routes to
- Desktop UI → Home dashboard: routes to
- Desktop UI → AI chat: opens
- Desktop UI → Vault browser: routes to
- User → Screen monitor: starts recording (evidence: `README.md`)
- Screen monitor → Screen capture: controls
- Screen capture → Capture sources: gets sources
- Capture manager → Processor manager: dispatches context (evidence: `opencontext/managers/capture_manager.py`)
- Processor manager → Context processing: processes context
- Context processing → Context models: creates context (evidence: `opencontext/context_processing/merger/context_merger.py`)
- Context processing → Storage facade: stores context (evidence: `opencontext/context_processing/merger/context_merger.py`)
- Storage facade → Unified storage: delegates storage (evidence: `opencontext/storage/global_storage.py`)
- Unified storage → SQLite backend: dispatches storage (evidence: `opencontext/storage/unified_storage.py`)
- Consumption scheduler → Proactive generation: schedules generation (evidence: `opencontext/managers/consumption_manager.py`)
- Proactive generation → Storage facade: retrieves context (evidence: `opencontext/context_consumption/generation/smart_todo_manager.py`)
- Proactive generation → VLM client: generates insights (evidence: `opencontext/context_consumption/generation/smart_todo_manager.py`)
- Proactive generation → Home dashboard: delivers summaries and tasks
- AI chat → Context agent: submits questions
- Context agent → Tool executor: dispatches tools
- Context agent → VLM client: requests responses
- Completion service → VLM client: requests completion (evidence: `opencontext/context_consumption/completion/completion_service.py`)
- Completion service → Storage facade: reads context (evidence: `opencontext/context_consumption/completion/completion_service.py`)
- VLM client → LLM client: uses model client (evidence: `opencontext/llm/global_vlm_client.py`)
- Embedding client → LLM client: uses model client (evidence: `opencontext/llm/global_embedding_client.py`)
- Storage facade → Embedding client: vectorizes context
- Configuration → Prompt manager: configures prompts (evidence: `opencontext/config/global_config.py`)
- VLM client → Configuration: loads model config (evidence: `opencontext/llm/global_vlm_client.py`)
- Embedding client → Configuration: loads model config (evidence: `opencontext/llm/global_embedding_client.py`)
