Skip to main content
The UserProfile model represents a user’s basic profile information in the Divvy app.

Data Class Definition

UserProfile.kt
Source: UserProfile.kt

Fields

String
required
Unique identifier for the user
String
required
The user’s display name shown throughout the app
String?
default:"null"
Optional email address for the user. Nullable field.

Usage Examples

Creating a UserProfile

UserProfile Without Email

GroupMember

A simplified representation of a user within a group context:
GroupMember.kt
Source: [GroupMember.kt:6] The GroupMember model is used when displaying members in a group and only requires the user ID and name, not the full profile information.

MemberBalance

Represents a user’s balance within a specific group:
MemberBalance.kt
Source: [MemberBalance.kt:6]

Serialization

The UserProfile model uses Kotlin Serialization with the @Serializable annotation. All fields are serialized with their property names (no custom @SerialName annotations).

Usage in the App

User profiles are referenced throughout the app:
  • Group Creation: The createdBy field in Group references a user ID
  • Expenses: The paidByUserId field in Expense indicates who paid
  • Ledger Entries: The paidByUserId and toUserId fields in LedgerEntry track transactions between users
  • Activity Feed: User names and IDs are displayed in expense and settlement activities