Service Layer medium complexity mobilefrontend
0
Dependencies
0
Dependents
0
Entities
0
Integrations

Description

Business logic layer that coordinates reading and writing of user preferences, applying validation and merging local Drift state with backend-synced values. Acts as the single authority for preference resolution, ensuring local overrides and remote defaults are reconciled correctly. Exposes typed methods consumed by AppSettingsScreen.

Feature: App Settings & Preferences

app-preferences-service

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 290
    Settings accessible from hamburger menu
  • docs/source/likeperson.md · line 298
    Settings and preferences
  • docs/source/likeperson.md · line 240
    **Mobile App:** `authentication-access-control`, `home-navigation`, `accessibility`, `help-support`, `profile-management`.

Responsibilities

  • Load preferences by merging local Drift storage with backend-synced defaults
  • Validate and normalize incoming preference values before persistence
  • Persist preference changes locally via AppPreferencesRepository
  • Sync applicable preferences to the backend on change
  • Provide typed accessors for specific preference domains (notifications, display, accessibility)

Interfaces

getPreferences(): UserPreferences
updatePreference(key: string, value: unknown): Promise<void>
syncWithBackend(): Promise<void>
resetToDefaults(): Promise<void>