How OrbitCubs handles offline-first sync
Dexie + Firestore: writing locally, syncing when the network comes back.
Field reps lose signal in basement parking lots. Customer support staff in coffee shops hit captive portals. CRMs that fall over in those moments lose data.
OrbitCubs CRM uses Dexie (IndexedDB) for a local mirror of every record you read or write. When you create a contact offline, it goes into the local store with a pending-sync flag. When the network returns, a background sync writes it to Firestore and clears the flag.
Conflicts get resolved with last-write-wins by default, with a merge dialog for fields that diverge meaningfully (e.g. notes). The whole pipeline is small — a few hundred lines of TypeScript — because Firestore already handles most of the heavy lifting.
If you want to read the code, the offline service lives at src/services/sync. Pull requests welcome.
Published 2026-04-18 by OrbitCubs Team.
OrbitCubs CRM — How OrbitCubs handles offline-first sync