How kskkoushik/doodo works
Doodo is an AI whiteboard teacher: a learner asks a question, optionally with board content or an image, and receives a spoken explanation synchronized with drawn annotations. The browser captures board context and sends it to the lesson route; the server streams model output as DML, resolves vision and math work, and emits lesson events. The browser parses those events into audio and drawing beats, compiles drawing operations, and animates them on the board. The graph also shows editing, speech input, and handwriting. Some subsystem links reflect README descriptions or SOURCE INDEX references; unsampled internals are not assumed to have been inspected.
Main entry points: route.ts Lesson route · runtime.ts Lesson runtime · Board.tsx Board and editor · player.ts Beat player
Components 34
Board interface
- Doodo app
components/DoodoApp.tsx - Board and editor
components/Board.tsx - Toolbar
components/Toolbar.tsx - Dock
components/Dock.tsx - Board state
lib/client/store.ts
Lesson runtime
- Lesson runtime
lib/client/runtime.ts - Beat player
lib/client/player.ts - Stroke animator
lib/client/animator.ts - Audio engine
lib/client/audio.ts - Lesson clock
lib/client/clock.ts - Board snapshot
lib/client/snapshot.ts
DML and drawing
- DML parser
lib/dml/parser.ts - DML tokenizer
lib/dml/tokenizer.ts - DML converter
lib/dml/convert.ts - Drawing operations
lib/dml/ops.ts - Board compiler
lib/board/compile.ts - Freehand geometry
lib/board/freehand.ts - SVG renderer
lib/client/svgRender.ts - Handwriting font
lib/hand/font.ts
AI and media services
- Lesson route
app/api/lesson/route.ts - Speech input route
app/api/stt/route.ts - OpenRouter client
lib/server/openrouter.ts - Image grounding
lib/server/ground.ts - Speech synthesis
lib/server/tts.ts - TeX rendering
lib/server/tex.ts
Shared foundations
- Lesson protocol
lib/protocol.ts - SSE decoder
lib/sse.ts - DML value scanners
lib/dml/values.ts - Geometry utilities
lib/geom.ts - Expression parser
lib/math/expr.ts - Glyph symbols
lib/hand/symbols.ts
Other components
- Learner
- AI providers
- Sarvam AI
Connections 41
- Learner → Doodo app: asks or edits
README.md - Doodo app → Board and editor: shows board
components/DoodoApp.tsx - Doodo app → Toolbar: shows controls
components/DoodoApp.tsx - Doodo app → Dock: shows dock
components/DoodoApp.tsx - Toolbar → Board state: updates tools
components/Toolbar.tsx - Dock → Board state: reads state
components/Dock.tsx - Board and editor → Board state: edits board
components/Board.tsx - Board and editor → Lesson runtime: binds board
components/Board.tsx - Board and editor → Board snapshot: prepares uploads
components/Board.tsx - Board and editor → SVG renderer: renders elements
components/Board.tsx - Lesson runtime → Board snapshot: captures context
lib/client/runtime.ts - Lesson runtime → Lesson route: posts lesson
README.md - Learner → Speech input route: sends speech
README.md - Speech input route → Sarvam AI: requests transcription
app/api/stt/route.ts - Lesson route → OpenRouter client: streams teacher model
app/api/lesson/route.ts - OpenRouter client → AI providers: calls model API
lib/server/openrouter.ts - Lesson route → DML parser: parses model stream
app/api/lesson/route.ts - DML parser → DML tokenizer: tokenizes tags
lib/dml/parser.ts - DML parser → DML converter: converts tags
lib/dml/parser.ts - DML converter → Drawing operations: produces operations
lib/dml/convert.ts - Lesson route → Image grounding: resolves find ops
app/api/lesson/route.ts - Image grounding → OpenRouter client: requests vision
lib/server/ground.ts - Lesson route → TeX rendering: renders math
app/api/lesson/route.ts - Lesson route → Speech synthesis: synthesizes voice
app/api/lesson/route.ts - Speech synthesis → Sarvam AI: streams speech
lib/server/tts.ts - Lesson route → Lesson protocol: emits lesson events
app/api/lesson/route.ts - Lesson runtime → SSE decoder: decodes events
lib/client/runtime.ts - Lesson runtime → Lesson protocol: handles events
lib/client/runtime.ts - Lesson runtime → Beat player: plays lesson
lib/client/runtime.ts - Beat player → Stroke animator: animates strokes
lib/client/player.ts - Beat player → Audio engine: plays audio
lib/client/player.ts - Beat player → Lesson clock: synchronizes beats
lib/client/player.ts - Beat player → Board compiler: compiles operations
lib/client/player.ts - Board compiler → DML value scanners: parses paths
lib/board/compile.ts - Board compiler → Geometry utilities: calculates layout
lib/board/compile.ts - Board compiler → Expression parser: compiles plots
lib/board/compile.ts - Board compiler → Handwriting font: lays out handwriting
lib/board/compile.ts - Handwriting font → Glyph symbols: uses glyphs
lib/hand/font.ts - Stroke animator → Freehand geometry: draws ink
lib/client/animator.ts - Stroke animator → SVG renderer: creates stroke nodes
lib/client/animator.ts - SVG renderer → Freehand geometry: renders ink paths
lib/client/svgRender.ts