AppPreferencesRepository
Component Detail
Data Layer
medium complexity
mobilefrontend
0
Dependencies
0
Dependents
0
Entities
0
Integrations
Description
Data access layer responsible for persisting user preferences locally using Drift and making remote preference reads and writes against the backend API. Abstracts the dual-storage concern so that AppPreferencesService works with a unified interface regardless of whether a value is stored locally or remotely.
app-preferences-repository
Sources & reasoning
Lines 290 and 298 explicitly describe settings as a named navigation entry and screen in the mobile architecture. Home-navigation is always-on core (line 240), placing this feature firmly in MVP. Accessibility-sensitive user populations described at lines 31-38 and 104-106 reinforce that personal display and accessibility overrides are not deferrable beyond launch.
-
docs/source/likeperson.md · line 290Settings accessible from hamburger menu
-
docs/source/likeperson.md · line 298Settings and preferences
-
docs/source/likeperson.md · line 240**Mobile App:** `authentication-access-control`, `home-navigation`, `accessibility`, `help-support`, `profile-management`.
Responsibilities
- Read and write preference values to local Drift storage
- Fetch user preference defaults from the backend API
- Push preference updates to the backend for server-persisted settings
- Clear local preference cache on logout or account switch
Interfaces
loadLocal(): UserPreferences
saveLocal(prefs: Partial<UserPreferences>): void
fetchRemote(userId: string): Promise<UserPreferences>
pushRemote(userId: string, prefs: Partial<UserPreferences>): Promise<void>
clearLocal(): void