User Preferences Service

Manages user-scoped settings (theme, locale, UI state) that apply globally across all workspaces.

Service

Responsibilities

  • Initialize preferences for new users
  • Set theme (Light, Dark, System)
  • Set locale for internationalization
  • Store arbitrary UI state as JSON blob

See WorkspacePreferencesService for workspace-scoped settings such as default catalog selection.

Aggregate: UserPreferences

One aggregate per authenticated user (keyed by user_id).

Key Value Objects

  • PreferencesId: Typically matches UserId
  • Theme: Light | Dark | System (enum)
  • Locale: User’s preferred locale string (e.g., en-US)

Invariants

  • UI state must be valid JSON (enforced at boundary)
  • Settings apply globally across all workspaces