Repositories / Excalidraw
Focused tour of drawing, rendering, history, and collaboration paths; not a whole-project map.
Architecture map
Follow persisted relationships across interface, API, service, persistence, worker, and external boundaries.
Canvas pointer controller
Editor interaction · ui
Builds shape attributes from the active tool and inserts a newly constructed element.
Collaboration portal
Realtime transport · external
Filters changed versions, encrypts the update, and emits it through the room socket.
Collaboration receive boundary
Collaboration orchestration · service
Handles a decrypted UPDATE message and routes remote elements through reconciliation before scene application.
Collaboration sync coordinator
Checks the scene version and forwards changed elements to the Portal for outbound transport.
Element factory
Element model · utility
Initializes a typed Excalidraw element with stable identity and default shape fields.
Element reconciler
Conflict resolution · utility
Deterministically merges remote and local versions while preserving fractional order.
Element renderer
Shape rendering · utility
Paints each element type, including rectangles, through cached RoughJS shapes.
History service
History · service
Pops inverse deltas, applies them to the current state, and maintains undo and redo stacks.
Remote scene apply
Applies reconciled remote elements without recording them as local undo history.
Scene model
Scene state · service
Maintains ordered scene elements and triggers subscribers when scene state changes.
Snapshot store
State capture · service
Queues durable state increments so restored changes can feed history and synchronization.
Static canvas
Canvas boundary · ui
Owns the static HTML canvas and invokes the scene renderer after React updates.
Static scene renderer
Scene rendering · service
Bootstraps the canvas and dispatches visible scene elements for painting.
Undo action
Editor actions · ui
Maps the undo command to history restoration when the editor is in a safe state.
Viewport renderer
Render selection · service
Derives the visible element set for the current viewport and editor state.