# helixnow/deep-student architecture

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

- Interactive diagram: https://gitdiagram.com/helixnow/deep-student
- Repository: https://github.com/helixnow/deep-student

## Overview

DeepStudent is a local-first AI learning workbench. Its principal workflow starts when a learner asks the study agent to work with their materials: Chat V2 coordinates model interaction and approved tools, which can produce or modify learning artifacts in the desktop apps and local data layer. The README also documents distinct study, content-management, review, and integration capabilities. Several feature modules are represented by their enclosing source directories because their implementations were not sampled; edges reflect documented behavior, not inspected internal call chains.

Main entry points: [`src-tauri/src/chat_v2/tools`](https://github.com/helixnow/deep-student/tree/main/src-tauri/src/chat_v2/tools) (Agent tools), [`src-tauri/src/chat_v2/pipeline.rs`](https://github.com/helixnow/deep-student/blob/main/src-tauri/src/chat_v2/pipeline.rs) (Chat V2 runtime), [`src/App.tsx`](https://github.com/helixnow/deep-student/blob/main/src/App.tsx) (Study Desktop), [`src/features/chat`](https://github.com/helixnow/deep-student/tree/main/src/features/chat) (Chat)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_experience["Study Desktop"]
  node_desktop["Study Desktop<br/>[App.tsx]"]
end

subgraph group_agent["Study Agent"]
  node_runtime["Chat V2 runtime<br/>[pipeline.rs]"]
  node_approvals["Approvals and undo"]
  node_skills["Skills and automations<br/>[skills.rs]"]
  node_tools["Agent tools"]
end

subgraph group_learning["Learning Apps"]
  node_chat["Chat"]
  node_notes["Notes and mind maps"]
  node_media["Media and handouts<br/>[pipeline.ts]"]
  node_exams["Exam sets<br/>[pipeline.rs]"]
  node_grading["Question grading<br/>[pipeline.rs]"]
  node_flashcards["Flashcards and review"]
  node_essays["Essay review<br/>[pipeline.rs]"]
  node_translation["Translation<br/>[translation.rs]"]
end

subgraph group_content["Content and Data"]
  node_files["Files and library<br/>[file_manager.rs]"]
  node_index["Search indexing"]
  node_database[("Local database<br/>[mod.rs]")]
  node_cloud["Cloud backup"]
end

subgraph group_integrations["External Integrations"]
  node_models["Model routing"]
  node_providers["Model providers<br/>[mod.rs]"]
  node_web["Web and papers"]
  node_mcp["MCP tools"]
end

node_learner(("Learner"))
node_configured(("Configured services"))

node_learner -->|"opens apps"| node_desktop
node_desktop -->|"opens Chat"| node_chat
node_chat -->|"sends requests"| node_runtime
node_runtime -->|"gates actions"| node_approvals
node_runtime -->|"uses skills"| node_skills
node_runtime -->|"dispatches tools"| node_tools
node_runtime -->|"selects model"| node_models
node_models -->|"routes requests"| node_providers
node_providers -->|"calls model"| node_configured
node_tools -->|"works with files"| node_files
node_files -->|"indexes imports"| node_index
node_index -->|"stores indexes"| node_database
node_tools -->|"creates artifacts"| node_notes
node_tools -->|"creates handouts"| node_media
node_tools -->|"generates questions"| node_exams
node_tools -->|"creates cards"| node_flashcards
node_tools -->|"reviews essays"| node_essays
node_tools -->|"translates text"| node_translation
node_tools -->|"researches papers"| node_web
node_tools -->|"uses MCP"| node_mcp
node_learner -->|"practices answers"| node_grading
node_learner -->|"reviews cards"| node_flashcards
node_learner -->|"enables backup"| node_cloud
node_cloud -->|"uploads backup"| node_configured

click node_desktop "https://github.com/helixnow/deep-student/blob/main/src/App.tsx"
click node_chat "https://github.com/helixnow/deep-student/tree/main/src/features/chat"
click node_runtime "https://github.com/helixnow/deep-student/blob/main/src-tauri/src/chat_v2/pipeline.rs"
click node_approvals "https://github.com/helixnow/deep-student/blob/main/src-tauri/src/chat_v2/approval_manager.rs"
click node_skills "https://github.com/helixnow/deep-student/blob/main/src-tauri/src/chat_v2/skills.rs"
click node_tools "https://github.com/helixnow/deep-student/tree/main/src-tauri/src/chat_v2/tools"
click node_models "https://github.com/helixnow/deep-student/blob/main/src-tauri/src/anki_model_routing.rs"
click node_providers "https://github.com/helixnow/deep-student/blob/main/src-tauri/src/providers/mod.rs"
click node_web "https://github.com/helixnow/deep-student/blob/main/src-tauri/src/chat_v2/tools/academic_search_executor.rs"
click node_mcp "https://github.com/helixnow/deep-student/tree/main/src-tauri/src/mcp"
click node_files "https://github.com/helixnow/deep-student/blob/main/src-tauri/src/file_manager.rs"
click node_index "https://github.com/helixnow/deep-student/blob/main/src/services/multimodalRagService.ts"
click node_database "https://github.com/helixnow/deep-student/blob/main/src-tauri/src/database/mod.rs"
click node_notes "https://github.com/helixnow/deep-student/tree/main/src/features/notes"
click node_media "https://github.com/helixnow/deep-student/blob/main/src/features/media-handout/pipeline.ts"
click node_exams "https://github.com/helixnow/deep-student/blob/main/src-tauri/src/qbank_generation/pipeline.rs"
click node_grading "https://github.com/helixnow/deep-student/blob/main/src-tauri/src/qbank_grading/pipeline.rs"
click node_flashcards "https://github.com/helixnow/deep-student/blob/main/src-tauri/src/fsrs_review_service.rs"
click node_essays "https://github.com/helixnow/deep-student/blob/main/src-tauri/src/essay_grading/pipeline.rs"
click node_translation "https://github.com/helixnow/deep-student/blob/main/src-tauri/src/cmd/translation.rs"
click node_cloud "https://github.com/helixnow/deep-student/tree/main/src-tauri/src/cloud_storage"

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 toneBlue
class node_runtime,node_approvals,node_skills,node_tools toneAmber
class node_chat,node_notes,node_media,node_exams,node_grading,node_flashcards,node_essays,node_translation toneMint
class node_files,node_index,node_database,node_cloud toneRose
class node_models,node_providers,node_web,node_mcp,node_learner,node_configured toneIndigo
```

## Components

### Study Desktop

- [Study Desktop](https://github.com/helixnow/deep-student/blob/main/src/App.tsx): `src/App.tsx`

### Study Agent

- [Chat V2 runtime](https://github.com/helixnow/deep-student/blob/main/src-tauri/src/chat_v2/pipeline.rs): `src-tauri/src/chat_v2/pipeline.rs`
- [Approvals and undo](https://github.com/helixnow/deep-student/blob/main/src-tauri/src/chat_v2/approval_manager.rs): `src-tauri/src/chat_v2/approval_manager.rs`
- [Skills and automations](https://github.com/helixnow/deep-student/blob/main/src-tauri/src/chat_v2/skills.rs): `src-tauri/src/chat_v2/skills.rs`
- [Agent tools](https://github.com/helixnow/deep-student/tree/main/src-tauri/src/chat_v2/tools): `src-tauri/src/chat_v2/tools`

### Learning Apps

- [Chat](https://github.com/helixnow/deep-student/tree/main/src/features/chat): `src/features/chat`
- [Notes and mind maps](https://github.com/helixnow/deep-student/tree/main/src/features/notes): `src/features/notes`
- [Media and handouts](https://github.com/helixnow/deep-student/blob/main/src/features/media-handout/pipeline.ts): `src/features/media-handout/pipeline.ts`
- [Exam sets](https://github.com/helixnow/deep-student/blob/main/src-tauri/src/qbank_generation/pipeline.rs): `src-tauri/src/qbank_generation/pipeline.rs`
- [Question grading](https://github.com/helixnow/deep-student/blob/main/src-tauri/src/qbank_grading/pipeline.rs): `src-tauri/src/qbank_grading/pipeline.rs`
- [Flashcards and review](https://github.com/helixnow/deep-student/blob/main/src-tauri/src/fsrs_review_service.rs): `src-tauri/src/fsrs_review_service.rs`
- [Essay review](https://github.com/helixnow/deep-student/blob/main/src-tauri/src/essay_grading/pipeline.rs): `src-tauri/src/essay_grading/pipeline.rs`
- [Translation](https://github.com/helixnow/deep-student/blob/main/src-tauri/src/cmd/translation.rs): `src-tauri/src/cmd/translation.rs`

### Content and Data

- [Files and library](https://github.com/helixnow/deep-student/blob/main/src-tauri/src/file_manager.rs): `src-tauri/src/file_manager.rs`
- [Search indexing](https://github.com/helixnow/deep-student/blob/main/src/services/multimodalRagService.ts): `src/services/multimodalRagService.ts`
- [Local database](https://github.com/helixnow/deep-student/blob/main/src-tauri/src/database/mod.rs): `src-tauri/src/database/mod.rs`
- [Cloud backup](https://github.com/helixnow/deep-student/tree/main/src-tauri/src/cloud_storage): `src-tauri/src/cloud_storage`

### External Integrations

- [Model routing](https://github.com/helixnow/deep-student/blob/main/src-tauri/src/anki_model_routing.rs): `src-tauri/src/anki_model_routing.rs`
- [Model providers](https://github.com/helixnow/deep-student/blob/main/src-tauri/src/providers/mod.rs): `src-tauri/src/providers/mod.rs`
- [Web and papers](https://github.com/helixnow/deep-student/blob/main/src-tauri/src/chat_v2/tools/academic_search_executor.rs): `src-tauri/src/chat_v2/tools/academic_search_executor.rs`
- [MCP tools](https://github.com/helixnow/deep-student/tree/main/src-tauri/src/mcp): `src-tauri/src/mcp`

### Other components

- **Learner**
- **Configured services**

## Connections

- Learner → Study Desktop: opens apps (evidence: `README.md`)
- Study Desktop → Chat: opens Chat (evidence: `README.md`)
- Chat → Chat V2 runtime: sends requests (evidence: `README.md`)
- Chat V2 runtime → Approvals and undo: gates actions (evidence: `README.md`)
- Chat V2 runtime → Skills and automations: uses skills (evidence: `README.md`)
- Chat V2 runtime → Agent tools: dispatches tools (evidence: `README.md`)
- Chat V2 runtime → Model routing: selects model (evidence: `README.md`)
- Model routing → Model providers: routes requests (evidence: `src-tauri/src/llm_manager/mod.rs`)
- Model providers → Configured services: calls model (evidence: `README.md`)
- Agent tools → Files and library: works with files (evidence: `README.md`)
- Files and library → Search indexing: indexes imports (evidence: `README.md`)
- Search indexing → Local database: stores indexes (evidence: `README.md`)
- Agent tools → Notes and mind maps: creates artifacts (evidence: `README.md`)
- Agent tools → Media and handouts: creates handouts (evidence: `README.md`)
- Agent tools → Exam sets: generates questions (evidence: `README.md`)
- Agent tools → Flashcards and review: creates cards (evidence: `README.md`)
- Agent tools → Essay review: reviews essays (evidence: `README.md`)
- Agent tools → Translation: translates text (evidence: `README.md`)
- Agent tools → Web and papers: researches papers (evidence: `README.md`)
- Agent tools → MCP tools: uses MCP (evidence: `README.md`)
- Learner → Question grading: practices answers (evidence: `README.md`)
- Learner → Flashcards and review: reviews cards (evidence: `README.md`)
- Learner → Cloud backup: enables backup (evidence: `README.md`)
- Cloud backup → Configured services: uploads backup (evidence: `README.md`)
