Busflow Docs

Internal documentation portal

Skip to content

ADR-017: Offline Sync Protocol for Driver Hub

Status: ✅ Accepted Canonical file: ../../protocols/offline-sync-protocol.md

This ADR is documented in the protocols directory. See the canonical file for full details.

Summary

Establishes the offline sync protocol for the Driver Hub PWA, covering:

  • Client queue structure (IndexedDB/RxDB PendingMutation interface)
  • Sync API (POST /api/sync/batch with SyncBatchRequest/SyncBatchResponse)
  • Per-record transactional batch semantics
  • Deduplication via sync_idempotency_log table
  • Server-side change_event generation
  • "Server Wins" conflict resolution
  • Connectivity detection and retry strategy

Applies to: OnboardSale, ExpenseReceipt, BoardingEvent, Incident, IssueReport.

Internal documentation — Busflow