Skip to content

Add User Profile

As a Host, I want to add my user profile with name, email, and phone number, So that the app can identify me and contact me when needed.

  • Given I am setting up my account or profile
  • When I add my user information
  • Then I can specify:
    • Full name (or first name and last name)
    • Email address
    • Phone number
  • And all fields are validated:
    • Name is required and cannot be empty
    • Email format is validated
    • Phone number format is validated (optional)
  • And the user profile is saved
  • And I can view and edit my profile from the Settings screen
  • And the profile information persists across app sessions

FULLY IMPLEMENTED (January 2026)

Medium - Important for account management and contact information

  • User, UserProfile, Settings
  • CreateUser (to be defined)
  • UpdateUserProfile (to be defined)

Implementation:

  1. User Profile Storage:

    • Created shaker/utils/userProfile.ts utility module
    • Uses expo-secure-store for secure persistence (same as app preferences)
    • getProfile() - Retrieves user profile from storage
    • saveProfile(profile) - Saves user profile to storage
    • clearProfile() - Clears user profile from storage
  2. User Profile Screen:

    • Created shaker/app/(tabs)/settings/user-profile.tsx
    • Accessible from Settings screen via “User Profile” option
    • Form fields:
      • Full Name (required, validated)
      • Email Address (required, validated format)
      • Phone Number (optional, validated format)
    • Real-time validation with clear error messages
    • Loading state while fetching profile
    • Success/error alerts on save
  3. Form Validation:

    • Name: Required, cannot be empty
    • Email: Required, validated with regex pattern
    • Phone: Optional, validated with regex pattern (supports multiple formats)
    • Errors clear when user starts typing in a field
    • Validation runs on form submission
  4. Settings Integration:

    • Added “User Profile” option to Settings screen
    • Positioned as first option in settings list
    • Uses user icon for visual consistency
    • Navigates to user profile screen on tap
  5. Data Persistence:

    • Profile data persists across app sessions using secure storage
    • Profile loads automatically when screen opens
    • Profile can be edited and saved at any time

Files Created:

  • shaker/utils/userProfile.ts - User profile storage utilities
  • shaker/app/(tabs)/settings/user-profile.tsx - User profile form screen

Files Modified:

  • shaker/app/(tabs)/settings/index.tsx - Added User Profile option

Usage:

  • Navigate to Settings → User Profile
  • Enter name, email, and optional phone number
  • Save profile - data persists across app sessions
  • Profile can be edited at any time
  • User authentication (if implemented later)
  • Profile editing
  • Account settings
  • Notifications (if email/phone are used for notifications)