Profile Service
Component Detail
Service Layer
medium complexity
mobile
0
Dependencies
0
Dependents
1
Entities
0
Integrations
Description
Application service that mediates between the Profile Screen and the underlying user profile and preferences stores. Encapsulates read, validation, and write logic for personal information, contact details, and account preferences.
profile-service
Sources & reasoning
Profile Data & Settings is the canonical 'my account' surface; the source explicitly lists Settings and preferences as an MVP screen and Subprocessors.md mandates application-level encryption for profile name/phone. Placed in MVP because every role-aware feature depends on accurate profile data from day one.
-
docs/source/likeperson.md · line 223-224Settings and preferences
-
docs/source/likeperson.md · line 190-190Peer Mentor (Likeperson): Creates and tracks activities and follow-ups. Logs in to the Mobile App only. Beginner-level digital skills assumed.
-
docs/source/Subprocessors.md · line 7-7Brukerprofiler, e-post, bcrypt-passordhasher... Navn og telefonnummer krypteres på applikasjonsnivå (AES-256-GCM) før lagring.
Responsibilities
- Fetch the current user's profile and preferences from the data layer
- Validate profile updates against business rules before persisting
- Persist changes to user_profiles and user_preferences atomically
- Emit profile-changed events so dependent features (home, notifications) refresh
- Enforce role-based access so users can only modify their own profile
Interfaces
getProfile(userId): Promise<UserProfile>
updateProfile(userId, updates): Promise<UserProfile>
getPreferences(userId): Promise<UserPreferences>
updatePreferences(userId, prefs): Promise<UserPreferences>