Profile Feature
Account management, house information, housemate invites, and developer tools.
Location
- Routes:
src/app/(tabs)/profile/ - Auth feature:
src/features/auth/(shared auth components and types)
Routes
| Route | Description |
|---|---|
(tabs)/profile/index.tsx | Profile home screen |
(tabs)/profile/edit.tsx | Edit profile details |
(tabs)/profile/my-house.tsx | My house information |
(tabs)/profile/add-housemates.tsx | Add housemates |
(tabs)/profile/invite.tsx | Invite friends |
(tabs)/profile/developer-info.tsx | Developer/debug info screen |
Auth Feature Module
The src/features/auth/ module contains shared authentication components and types used by the profile and sign-in flows.
Components (src/features/auth/components/)
| Component | File | Description |
|---|---|---|
UKSignIn | uk-sign-in.tsx | UK sign-in form (email/password + Google + Apple) |
USSignIn | us-sign-in.tsx | US sign-in (SSO via my.UNL) |
AuthInput | auth-input.tsx | Styled input for auth forms |
PersonalDetailsStep | personal-details-step.tsx | Signup personal details |
PreferencesStep | preferences-step.tsx | Signup preferences |
PreferenceSlider | preference-slider.tsx | Preference range slider |
CountryCodePicker | country-code-picker.tsx | Phone country code selector |
GradYearModal | grad-year-modal.tsx | Graduation year picker |
SelectBottomSheet | select-bottom-sheet.tsx | Generic select bottom sheet |
SimpleDropdown | simple-dropdown.tsx | Simple dropdown select |
BypassCodeModal | bypass-code-modal.tsx | Bypass code entry (dev) |
ChangePhoneNumberModal | change-phone-number-modal.tsx | Phone number change |
LoadingOverlay | loading-overlay.tsx | Full-screen loading overlay |
API
api/forgot-password.ts— Forgot password flow
Types
types/index.ts—Userinterface andmapUserApiResponseToUser()mapping functiontypes/signup.ts— Signup flow types
Utilities
utils/sign-in-handlers.ts— Shared sign-in logic
Data
data/phone-codes.ts— Phone country codes
User Context
The user object is provided by AuthProvider (src/context/auth-context.tsx). Profile screens access it via useAuth():
const { user, refreshUser, signOut } = useAuth();After profile edits, call refreshUser() to re-fetch the user from the API.
Shared Hooks
Relevant shared hooks in src/hooks/:
| Hook | File | Description |
|---|---|---|
useUser | use-user.ts | User data access |
useUserRep | use-user-rep.ts | User reputation data |
useUpdateCity | use-update-city.ts | City update mutation |
useRequireAuth | use-require-auth.ts | Auth guard hook |
useImagePicker | use-image-picker.ts | Image selection from camera/gallery |
Last updated on