30% offEnding soon
FSD-011Frontend system design Premium

Design a Sortable Kanban Board Component

Design a large, accessible Kanban board with stable ordering, cross-lane moves, optimistic updates, conflict recovery, virtualization, and undo.

Intermediate 52 min read

Model a Kanban move as a transaction over stable card and lane identities. Render an optimistic projection immediately, persist an idempotent anchor-based operation against a board revision, and rebuild from the accepted snapshot when acknowledgements or remote edits arrive.

A small board looks like a few arrays and a drag handler. That model breaks when two people move the same card, a filtered card disappears, a long lane virtualizes most of its DOM, or a retry applies twice. The hard part is not drawing a card under the pointer. It is preserving one understandable board through latency and disagreement.

Start with accepted state plus pending intent

Keep two layers of state:

  • the latest board snapshot accepted by the server;
  • ordered local operations that have not settled yet.

The visible board is a projection of both layers. A quick cross-lane move feels immediate because the pending operation is projected locally. When the server accepts it, the new snapshot replaces the old one and that operation leaves the pending queue. When the server corrects or rejects it, recompute from the returned snapshot instead of trying to reverse arbitrary UI mutations.

This gives the design a useful invariant: every visible card comes from one accepted entity plus a deterministic sequence of pending operations.

The public interview prompt

Design a sortable Kanban board component for a collaborative project-management product. Explain:

  • normalized board, lane, card, and membership data;
  • ordering within lanes and moves across lanes;
  • drag, keyboard, and click or tap alternatives;
  • optimistic updates, idempotency, revisions, conflicts, rollback, and undo;
  • subscriptions, reconnects, offline retry, permissions, and deleted cards;
  • horizontal board scrolling, vertical lane scrolling, auto-scroll, and virtualization;
  • filters, collapsed lanes, selection, focus recovery, and screen-reader announcements;
  • performance budgets, instrumentation, tests, and staged rollout.

Assume a board can contain 200 lanes and 100,000 cards, while a typical viewport shows six lanes and fewer than 100 card rows. Several users may edit the same board. These numbers are design assumptions for the interview, not measured product facts. Rich-text card editing, a free-form canvas, and the generic drag sensor implementation are outside version one.

What the premium solution covers

The full solution defines normalized storage, an anchor-based move API, sparse position keys and bounded rebalancing, optimistic projection, conflict policies, real-time and offline ordering, permissions, accessibility alternatives, focus behavior, large-board rendering, cleanup, observability, tests, and an interview answer rubric.

Original media demonstrates acknowledgement and conflict correction, compares normalized and nested state, explains ordering gaps, and maps a two-axis rendering budget. Two deterministic labs let you exhaust ordering space and replay concurrent operations without a backend.

Premium solution

Continue with the complete system design

Unlock the architecture, state machine, API contracts, original diagrams, positioning model, accessibility decisions, performance budgets, testing plan, rollout strategy, scoring rubric, and interview walkthrough.

  • Detailed, beginner-friendly explanation
  • Production failure modes and trade-offs
  • Mobile-friendly architecture diagrams
  • Senior and staff-level interview signals
Unlock Premium

Frequently asked questions

Should a Kanban board persist card indexes?
No. Indexes change whenever another card is inserted, removed, filtered, or moved. Persist a semantic move with stable card and lane IDs plus before or after anchor IDs. The server computes the accepted order and returns a revision.
How should a Kanban board handle concurrent moves?
Send an idempotent operation with a base revision. If the base is stale, the server can reject it with the latest snapshot or transform it under an explicit policy. The client then rebuilds optimistic state from the accepted snapshot and remaining pending operations.
What ordering strategy works for frequently moved cards?
Start with sparse numeric or lexicographic position keys so most moves update one card. Bound key length or minimum gaps and rebalance one lane in a controlled transaction when space runs out. Never make floating-point precision an unmonitored dependency.
How do you make a sortable board accessible?
Use real controls with visible focus, offer a move dialog or menu that works with single clicks or taps, and optionally add a keyboard move mode. Every input path should create the same semantic move operation and announce pickup, destination, completion, rejection, and cancellation.
Can a Kanban board virtualize cards?
Yes, but logical order, selection, pending moves, and focus recovery must live outside mounted rows. Keep bounded overscan around the active card, pin the dragged source logically, and scroll a target into view before assigning focus or an active descendant.
Should optimistic moves be disabled when the board is collaborative?
Not necessarily. Keep an accepted server snapshot separate from pending operations, render their projection, and reconcile by operation ID and revision. Disable or delay optimism only where conflicts are common, permissions are volatile, or correction would be dangerously confusing.