high complexity MVP extracted Offline & Sync Confidence: 100%
1
Components
43
Shared
0
User Stories
Yes
Analyzed

Description

Offline Data Support provides persistent local storage using Drift with SQLCipher encryption, allowing peer mentors to register activities, view contacts, and use the app without network connectivity. A mutation outbox queues all writes locally and syncs when connectivity is restored. ID mapping reconciles offline-created entities against server-assigned IDs, ensuring data integrity across the sync boundary.

Sources & reasoning

The Mobile App Architecture section explicitly lists Drift + SQLCipher offline persistence and a mutation outbox as core shared infrastructure. Both are always-on capabilities, not optional modules. The blueprint marks this feature MVP, consistent with ยง5 Fase 1 requiring reliable activity registration from day one - impossible without offline support in the field conditions peer mentors work in.

No source references โ€” this artifact was included based on reasoning alone (see above).

Analysis

Business Value

Peer mentors conduct home visits and activities in diverse connectivity environments where mobile signal is unreliable or absent. Offline capability ensures that no activity registration is lost due to connectivity gaps - directly protecting Bufdir reporting accuracy. For organizations like HLF where a single peer mentor logged 380 activities in a year, data loss is operationally unacceptable. Encrypted local storage also satisfies GDPR requirements for sensitive contact and assignment data stored on device, ensuring compliance even when disconnected from the backend.

Implementation Notes

Implemented with Drift (Flutter SQLite ORM) and SQLCipher for AES-256 encryption of the local database. The mutation outbox serializes pending writes with retry metadata; offline-created entities use client-side UUIDs reconciled to server IDs via an ID mapping table after sync. Riverpod providers expose a unified stream combining local and remote sources. The local schema mirrors the server model with additional sync-state columns (sync_status, local_id, server_id, conflict_flag). The Background Sync feature drives the actual upload cycle.

Components (44)

Service Layer (1)

Shared Components

These components are reused across multiple features

User Stories

No user stories have been generated for this feature yet.