How citromoseper/whiteboard works
Whiteboard is a browser-based drawing and collaboration app. Users create and edit a board, then save, export, share, or collaborate on it; optional AI actions interpret selected handwriting, while plotting and answer checking run locally. The graph preserves the documented drawing, sheets/PDF, sticker/gallery, localization, offline, and sharing capabilities. Several module-to-module calls were not shown in the excerpts, so those connections are omitted or marked unverified rather than asserted.
Main entry points: app.js Canvas and UI · plot.js Graph objects · ai.js AI actions · gallery.js Gallery
Components 20
Board editing
- Canvas and UI
js/app.js - Stroke geometry
js/geometry.js - Shape filling
js/fill.js - Color picker
js/picker.js
Math and AI
- Graph objects
js/plot.js - Math engine
js/mathexpr.js - Math typesetting
js/mathtype.js - AI actions
js/ai.js
Files and sharing
- Board formats
js/io.js - PDF import
js/pdf.js - Gallery
js/gallery.js - Built-in stickers
js/builtins.js - Share links
js/share.js - QR sharing
js/qr.js
Collaboration and runtime
- Live boards
js/live.js - Peer connection
js/p2p.js - Translations
js/i18n.js - Offline cache
sw.js
Other components
- Board user
- AI provider
Connections 20
- Board user → Canvas and UI: edits board
README.md - Canvas and UI → Stroke geometry: draws strokes
- Canvas and UI → Shape filling: fills shapes
- Canvas and UI → Color picker: chooses colors
- Canvas and UI → AI actions: invokes AI actions
- AI actions → AI provider: sends selected image
README.md - Canvas and UI → Math typesetting: typesets math
- Canvas and UI → Graph objects: creates and explores
- Graph objects → Math engine: evaluates functions
- Canvas and UI → Math engine: checks solutions
- Canvas and UI → Board formats: imports and exports
- Canvas and UI → PDF import: opens PDF sheets
- Canvas and UI → Gallery: manages boards
- Gallery → Built-in stickers: offers stickers
- Canvas and UI → Share links: creates share links
- Canvas and UI → QR sharing: shows QR codes
- Canvas and UI → Live boards: collaborates live
- Live boards → Peer connection: uses peer transport
- Canvas and UI → Translations: localizes interface
- Offline cache → Canvas and UI: serves cached app
sw.js