Skip to Content
Housr AppFeaturesProfile Feature

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

RouteDescription
(tabs)/profile/index.tsxProfile home screen
(tabs)/profile/edit.tsxEdit profile details
(tabs)/profile/my-house.tsxMy house information
(tabs)/profile/add-housemates.tsxAdd housemates
(tabs)/profile/invite.tsxInvite friends
(tabs)/profile/developer-info.tsxDeveloper/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/)

ComponentFileDescription
UKSignInuk-sign-in.tsxUK sign-in form (email/password + Google + Apple)
USSignInus-sign-in.tsxUS sign-in (SSO via my.UNL)
AuthInputauth-input.tsxStyled input for auth forms
PersonalDetailsSteppersonal-details-step.tsxSignup personal details
PreferencesSteppreferences-step.tsxSignup preferences
PreferenceSliderpreference-slider.tsxPreference range slider
CountryCodePickercountry-code-picker.tsxPhone country code selector
GradYearModalgrad-year-modal.tsxGraduation year picker
SelectBottomSheetselect-bottom-sheet.tsxGeneric select bottom sheet
SimpleDropdownsimple-dropdown.tsxSimple dropdown select
BypassCodeModalbypass-code-modal.tsxBypass code entry (dev)
ChangePhoneNumberModalchange-phone-number-modal.tsxPhone number change
LoadingOverlayloading-overlay.tsxFull-screen loading overlay

API

  • api/forgot-password.ts — Forgot password flow

Types

  • types/index.tsUser interface and mapUserApiResponseToUser() mapping function
  • types/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/:

HookFileDescription
useUseruse-user.tsUser data access
useUserRepuse-user-rep.tsUser reputation data
useUpdateCityuse-update-city.tsCity update mutation
useRequireAuthuse-require-auth.tsAuth guard hook
useImagePickeruse-image-picker.tsImage selection from camera/gallery
Last updated on