Data Layer low complexity mobile
0
Dependencies
1
Dependents
0
Entities
0
Integrations

Description

Drift table storing user preference key-value pairs locally on device under SQLCipher encryption. Serves as the offline-first source of truth for all user-configurable settings, with sync status tracking so the mutation outbox can flush pending changes to the backend on reconnection.

Feature: App Settings & Preferences

user-preferences

Sources & reasoning

Preferences must survive offline periods and reinstalls per the feature description, requiring a dedicated Drift table. This data component provides the typed DAO and sync-status column that the Preferences Service reads and writes, and that the mutation outbox queries for pending changes.

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

Responsibilities

  • Store typed preference key-value pairs scoped to user ID
  • Provide fast synchronous reads for preference hydration at app startup
  • Track per-row sync status for mutation outbox integration

Interfaces

insertOrUpdate(UserPreference pref): Future<void>
getAll(String userId): Future<List<UserPreference>>
getByKey(String userId, String key): Future<UserPreference?>
markSynced(String key): Future<void>
getPendingSync(String userId): Future<List<UserPreference>>

Relationships

Dependents (1)

Components that depend on this component