Service Layer low complexity mobile
1
Dependencies
1
Dependents
6
Entities
0
Integrations

Description

Business logic layer that manages notification preference CRUD operations. Fetches the current notification_settings record for the authenticated user, sends PATCH requests on toggle changes, enforces GDPR consent rules (e.g., SMS requires explicit opt-in), and coordinates push token revocation when push notifications are disabled.

Feature: Notification Settings

notification-settings-service

Responsibilities

  • Fetch and cache notification preferences from the REST API
  • Send PATCH requests to update individual preference fields on toggle change
  • Enforce GDPR consent constraints such as requiring explicit opt-in for SMS
  • Coordinate with Push Token Store to revoke tokens when push is disabled
  • Create default sensible opt-in preferences on first access after registration

Interfaces

getPreferences(String userId)
updatePreference(String userId, String category, String channel, bool enabled)
resetToDefaults(String userId)
createDefaultPreferences(String userId)
validateConsentRules(Map<String, dynamic> preferences)
onPushDisabled(String userId)
onPushEnabled(String userId)

Relationships

Dependencies (1)

Components this component depends on

Dependents (1)

Components that depend on this component