FSD Frontend System Design

Part IV β€” The Reach

9 Offline Support

GoalMake the app usable when the network isn't, and sync cleanly when it returns.

  1. 9.1 Service Workers A background script that survives your page, proxies its requests, and updates on its own schedule. Lifecycle states + the update trap Β· 18 min
  2. 9.2 Progressive Web Applications (PWAs) A website that installs, launches from the home screen, works offline, and receives push. PWA capability checklist + install flow Β· 15 min
  3. 9.3 Offline Writes & the Sync Queue Write locally first, queue every change, and replay the queue so the server applies each change exactly once. Outbox record + push-then-pull sync cycle Β· 16 min
  4. 9.4 Conflict Resolution Two offline edits to the same thing will collide β€” choose the rule before it happens, per field, not per app. Two-device conflict timeline + choosing the rule Β· 16 min
  5. 9.5 Background Sync & Storage Limits The browser decides when your queue runs and how long your data lives β€” design for both. What triggers a flush, per browser + storage you can lose Β· 14 min

Capstone

Design an offline-first note app: cache strategy, write queue, sync watermark, and the conflict rule you'd defend.