How hkuds/deeptutor works
DeepTutor is a lifelong personalized tutoring product, exposed through a web client and desktop app. The main workflow is a learner request entering the application, being handled by the shared turn runtime and tutoring capabilities, then producing a streamed response or a learning artifact. The README also highlights reading, mastery, video lessons, and modular capabilities. The map preserves those product branches; several are documented or present in the tree but not sampled, so their links are marked unverified rather than asserted as observed calls.
Main entry points: orchestrator.py Chat orchestrator · main.py HTTP API · pipeline.py Question pipeline · service.py App service
Components 26
User interfaces
- Web client
web - Desktop shell
apps/desktop/src/main.mjs
Application runtime
- HTTP API
deeptutor/api/main.py - App service
deeptutor/app/service.py - Turn engine
deeptutor/runtime/turn_engine.py - Chat orchestrator
deeptutor/runtime/orchestrator.py - Tool dispatch
deeptutor/runtime/agentic/tool_dispatch.py - Stream bus
deeptutor/runtime/stream_bus.py
Tutoring capabilities
- Question pipeline
deeptutor/agents/question/pipeline.py - Tool composition
deeptutor/agents/_shared/tool_composition.py - Chat and agent loops
deeptutor/agents/loop - Research tools
deeptutor/agents/research - Visual and video lessons
deeptutor/agents/video_lesson
Learning and content
- Reading experience
deeptutor/reading - Knowledge bases
deeptutor/knowledge/manager.py - Mastery learning
deeptutor/learning/service.py - Learning records
deeptutor/learning/storage.py - Interactive books
deeptutor/book/engine.py - Notes and blocks
deeptutor/notes/blocks.py
Identity and integrations
- Authentication
deeptutor/services/auth.py - Model configuration
deeptutor/services/config/loader.py - Workspace paths
deeptutor/services/path_service.py - File access
deeptutor/services/file_io.py - Session handoff
deeptutor/multi_user/session_handoff.py - Partner channels
deeptutor/partners/channels/manager.py
Other components
- Learner
Connections 29
- Learner → Web client: uses
- Learner → Desktop shell: uses
- Web client → HTTP API: requests
- Desktop shell → Web client: hosts
- HTTP API → App service: delegates to
- App service → Turn engine: executes turns
- Turn engine → Chat orchestrator: invokes
deeptutor/runtime/turn_engine.py - Turn engine → Stream bus: yields events
- Chat orchestrator → Tool dispatch: dispatches tools
- Chat orchestrator → Stream bus: publishes events
- Question pipeline → Tool dispatch: uses
deeptutor/agents/question/pipeline.py - Question pipeline → Stream bus: streams through
deeptutor/agents/question/pipeline.py - Question pipeline → Tool composition: uses
deeptutor/agents/question/pipeline.py - Chat and agent loops → Tool composition: uses
- Chat orchestrator → Chat and agent loops: routes turns
- Chat orchestrator → Question pipeline: routes questions
- Chat orchestrator → Research tools: routes research
- Chat orchestrator → Visual and video lessons: routes creation
- Chat orchestrator → Reading experience: routes reading
- Chat orchestrator → Knowledge bases: uses retrieval
- Chat orchestrator → Mastery learning: uses mastery
- Mastery learning → Learning records: persists records
- Learning records → Workspace paths: resolves location
deeptutor/learning/storage.py - Learning records → File access: uses
deeptutor/learning/storage.py - Interactive books → Notes and blocks: creates content
- HTTP API → Authentication: authenticates
- HTTP API → Session handoff: coordinates sessions
- HTTP API → Partner channels: exposes integrations
- App service → Model configuration: loads settings