When we built the Dock Gate Pass System for digitizing vehicle entry and exit at warehouse docks, one assumption broke almost immediately: the network is not reliable at the gate.
The problem
Security staff at warehouse gates need to log vehicle entries, validate driver licenses, and record dock allocation — often from a tablet on a loading dock with patchy Wi-Fi. If the connection drops mid-entry, you either lose the record or block the gate until connectivity returns. Neither is acceptable.
The fix: offline-first with IndexedDB
Instead of treating the network as always-available, we flipped the architecture:
- Write locally first. Every gate entry is written to IndexedDB immediately, regardless of connection status.
- Queue for sync. A background sync queue tracks unsynced records.
- Sync opportunistically. When connectivity returns, the queue flushes to the server in order, with conflict resolution based on timestamps.
- Visual sync status. The UI shows a small indicator — synced, pending, or syncing — so gate staff always know the state of their data.
Result
- Zero data loss during network outages, even multi-hour ones
- Gate staff could keep working without "internet down" becoming an operational halt
- When the system reconnects, hundreds of queued entries sync in seconds
The takeaway
For field-facing tools — warehouses, gates, delivery apps — offline-first isn't a nice-to-have. It's the difference between a tool people trust and one they route around with a paper logbook.