System design interview question · Frontend & mobile

Design offline-first mobile sync

Let a notes app work offline and merge cleanly when it reconnects.

Intermediate 45 minutesSyncFree
More Frontend & mobile questions

The brief

Let a notes app work offline and merge cleanly when it reconnects. Your design should meet these requirements:

  1. Users can create and edit notes with no connection.
  2. Changes sync across devices once online.
  3. Concurrent edits on two devices are resolved predictably.

Scale to design for

A notes app on mobile and web: full create/edit offline, sync across a user's devices when online, predictable resolution of concurrent edits.

State these assumptions out loud in the interview, then let them drive your choices: they decide what needs caching, sharding or asynchronous processing.

Before you start

You'll get more out of this round if you're comfortable with:

  • Local databases on mobile
  • Change logs and sync cursors
  • Conflict resolution
  • Reconnect and retry handling

Questions an interviewer may ask

Expect follow-ups like these once your high-level design is on the board. Have an answer, and a reason, for each:

  • A note is edited on the phone and laptop while both are offline: what does the user see?
  • How does a device that was offline for a month catch up efficiently?
  • How are deletes propagated?

Common mistakes to avoid

  • UI reading from network instead of local DB
  • Full re-download on every sync
  • Timestamps from device clocks as the only ordering
  • Duplicate notes from retried creates
  • Deletes that resurrect (no tombstones)

Concepts this round covers

  • Local database
  • Change log and cursors
  • Conflict resolution
  • Sync

What a complete answer covers

A client storage model, sync protocol with change cursors, conflict strategy, and server-side APIs to support it.

There is no single correct design. A strong answer meets the requirements at the stated scale and explains the trade-offs behind each choice. New to the format? Read how to prepare for a system design interview.