Profile
Domain model representing a user's profile information in the application's data layer.
This model represents authenticated user profile data, primarily sourced from Firebase Auth and cached locally in DataStore via UserDataPreferences. Unlike dev.atick.data.model.home.Jetpack, this model doesn't use Room database storage; instead, it relies on DataStore for lightweight preference-based caching.
Profile data flow:
Firebase Auth provides initial profile data (name, photo) after sign-in
dev.atick.data.repository.profile.ProfileRepository observes Firebase Auth state
Profile is cached in DataStore for offline access and quick app startup
UI layer observes profile via dev.atick.feature.profile.ui.ProfileViewModel
Mapping extensions are provided for layer conversion:
UserDataPreferences.toProfile: Convert from DataStore preferences to domain model
toPreferencesUserProfile: Convert from domain model to DataStore preferences
Usage context:
Displayed in profile screen showing user name and avatar
Used in settings screen to show current user information
Updated when user changes profile via Firebase Auth methods
Cached locally for offline display and fast app startup
See also
DataStore preferences model for local caching
Subset of preferences specifically for profile data
Repository providing profile operations
ViewModel consuming profile data