Encrypted Local DB
Component Detail
Data Layer
medium complexity
mobile
0
Dependencies
0
Dependents
0
Entities
0
Integrations
Description
The on-device persistent store backed by Drift with SQLCipher encryption. It holds the local copy of all data domains the user can act on while offline, with schema parity to the server.
encrypted-local-db
Sources & reasoning
Listed as a Mobile App area feature in the canonical taxonomy (§8) and explicitly described in the Mobile App Architecture Core/Shared section as offline-first encrypted persistence. Field-work context in §1.1 makes offline non-negotiable, so MVP.
-
docs/source/likeperson.md · line 227Offline-first persistence (Drift + SQLCipher encrypted local DB, mutation outbox, sync queue with retry/backoff, ID mapping for offline-created entities, conflict resolver)
-
docs/source/likeperson.md · line 369offline-sync | Offline & Sync | Offline Data Support, Background Sync
Responsibilities
- Persist activities, contacts, notes, and receipts locally
- Encrypt all data at rest using SQLCipher
- Maintain schema mirroring the server-side data model
- Provide migration support for schema upgrades
- Store authentication-derived encryption keys securely
Interfaces
open(encryptionKey): Database
migrate(fromVersion, toVersion): void
executeQuery(sql, params): ResultSet