Design a collaborative whiteboard like Excalidraw: a JSON scene model, canvas rendering with a shape cache and viewport culling, hit testing, zoom and pan math, end-to-end encrypted collaboration, version-based reconciliation, and undo that works with other people editing.
Excalidraw is an open-source (MIT) virtual whiteboard with a hand-drawn look, written in React and TypeScript. It's a great system design case because almost every hard frontend problem shows up in one app: rendering thousands of objects smoothly, precise pointer interaction, offline-first storage, real-time collaboration, and privacy.
We'll design it as if starting from scratch, and point out where the real Excalidraw codebase makes the same choice.
Functional requirements
.excalidraw files.Non-functional requirements
@excalidraw/excalidraw) used inside other products, so the editor can't assume it owns the whole page.Out of scope here: user accounts, team libraries, and permissions. They matter for a product, but they don't change the core architecture.