Offline-first React and Next.js: an IndexedDB outbox, sync loop and conflict handling
Field inspectors kept losing form submissions in basements and car parks. We rebuilt the app around a local-first write path: an IndexedDB outbox, an idempotent sync endpoint, version-based conflict detection and a UI that tells the truth about what is synced. Full working code included.