Files
EvolioHealth/docs/adr/ADR-003-offline-sync.md

800 B

ADR-003: Offline-first synchronization

  • Status: Accepted

Decision

The Android Companion stores supported user data locally in encrypted SQLite and uses a transactional outbox plus incremental server pull. Synchronization is event-triggered and optionally periodic, not continuous. Every mutation is idempotent, versioned, resumable, and deletion-aware.

Rationale

Health and measurement data must remain available without the home server or Internet. NAS instances may be temporarily unavailable, and aggressive continuous sync would waste battery and mobile data.

Consequences

The system needs explicit conflict semantics, tombstones, source provenance, cursors, retry/error UX, and tests across multiple devices. Server state cannot simply overwrite local state using timestamps.