Design a browser-based graphics editor
I was asked this
No reports yet. Sign in to say where you were asked it.
A system design interview question asked in Figma's system design round, last asked Feb 2026. It tests client architecture, rendering and autosave.
Design a graphics editor that runs in the browser for documents made of layers (shapes, text, images). A signed-in user opens a document, selects, moves, resizes and restyles layers, reorders and deletes them, and imports images. Every edit must show up instantly, and every accepted change must be saved durably in the background. Real-time multi-user editing and plugins are out of scope.
Requirements
- Functional:
- Open an existing document and see its latest saved state.
- Create, delete, reorder, move, resize and change the properties of layers, with immediate visual feedback.
- Upload images, reference them from layers, and reopen the document without large binaries stored inside the document data.
- Autosave edits, retry safely after transient failures, and recover after a refresh without silently losing an accepted change.
- Non-functional: interactions at 60 fps on large documents; saves that never block editing; no lost or duplicated edits across retries; reasonable storage and bandwidth cost.
Clarifying questions
- How large do documents get (layers, image sizes)?
- Is offline editing required, or only surviving short network drops?
- Is undo/redo required, and must it survive a reload?
- Do we need version history or only the latest state?
- Which browsers and devices must be supported?
What a strong answer covers
- The split: the client owns the live document model, rendering and input; the server owns durable storage, versioning and assets.
- A document model as a tree or ordered list of layers with stable IDs and properties, and edits expressed as small operations (
move layer L to x, y) rather than whole-document saves. - Rendering with Canvas 2D or WebGL, a scene graph, dirty-region redraws, hit testing for selection, and keeping work off the main thread where possible.
- Assets: images uploaded separately to object storage (content-addressed, via signed URLs), referenced by ID from layers, with thumbnails or tiles for large images.
- Autosave: a local queue of operations with client-generated IDs, batched and sent with a base version; the server applies them idempotently and returns the new version; retries with backoff.
- Recovery: unsent operations persisted in IndexedDB, replayed after a reload; conflict handling when the server version moved (another tab).
- Storage: periodic snapshots plus an operation log, so loading is fast and history is possible.
- Undo/redo as inverse operations on the client.
Follow-ups
- Two tabs of the same user edit the same document. What happens?
- How would you add real-time collaboration later (operational transforms or CRDTs)?
- A document has 50,000 layers. What breaks first and how do you fix it?
- How do you migrate the document format when the schema changes?
Where it's asked
- Figma · System design · Last asked Feb 2026Design discussion; one or two rounds
What it tests
client architecture · rendering · autosave · storage
No official answer yet. Draw yours on the right; publish it and it shows under Community.
Nothing published yet. Publish your canvas and it shows here for others to open and remix.
