Roomie Feature
Roommate profile creation, discovery, matching, and Firebase-based chat.
Location
- Feature module:
src/features/roomie/ - Routes:
src/app/(tabs)/explore/roomie/
Overview
Roomie allows students to find potential roommates by:
- Creating a profile (about you, bio, profile pic, more info, house pics)
- Browsing other profiles in a carousel or list
- Sending/receiving message requests
- Chatting via Firebase Realtime Database
Hooks
| Hook | File | Description |
|---|---|---|
useRoomieProfiles | hooks/use-roomie-profiles.ts | Fetches roomie profiles from apiV1 with manual pagination |
useCurrentUserProfile | hooks/use-current-user-profile.ts | Current user’s roomie profile |
useRoomieProfile | hooks/use-roomie-profile.ts | Single profile fetch |
useRoomieProfileComplete | hooks/use-roomie-profile-complete.ts | Check if profile is complete |
useChats | hooks/use-chats.ts | Firebase chat integration |
useStillLookingResponse | hooks/use-still-looking-response.ts | ”Still looking?” prompt state |
useRoomieProfiles
Uses apiV1.get('roomie/getProfiles.php') with manual state management (not React Query). Supports load-more pagination by incrementing the limit parameter.
Types
types.ts—RoomieProfileinterfacetypes/chat-preview.ts— Chat list previewtypes/chat-room.ts— Chat room datatypes/message.ts— Chat message
Components
Profile Setup
| Component | Description |
|---|---|
RoomieLanding | Landing page with intro and CTA |
QuestionStep | Reusable step component for profile setup |
BudgetWheelPicker | Budget range selector |
DetailCards | Profile detail display cards |
MoreInfoProfileContent | Extended profile information |
CameraIcon | Camera/photo upload icon |
Discovery
| Component | Description |
|---|---|
ExploreCarousel | Swipeable profile cards |
ExploreList | Grid/list of profiles |
ExploreItem | Individual profile card |
ExploreHeader | Explore section header |
SkippedModal | ”You skipped this person” modal |
MessageRequestModal | Send message request prompt |
RemoveProfileModal | Remove own profile |
BlockModal | Block user modal |
Chat
| Component | Description |
|---|---|
Chat | Chat room interface |
ChatList | List of chat rooms |
ChatListContainer | Chat list wrapper |
ChatInfo | Chat room info/details |
ChatMenu | Chat options menu |
AnimatedMessage | Animated message bubble |
NoChatFound | Empty chat state |
BlurBackdrop | Blur overlay |
EditProfileItemPreview | Profile field preview in chat |
Icons
| Component | Description |
|---|---|
RoomieLogoIcon | Roomie branding icon |
Routes
| Route | Description |
|---|---|
explore/roomie/index.tsx | Roomie landing |
explore/roomie/explore.tsx | Browse profiles |
explore/roomie/about-you.tsx | Profile setup: about you |
explore/roomie/bio.tsx | Profile setup: bio |
explore/roomie/profile-pic.tsx | Profile setup: photo |
explore/roomie/more-info.tsx | Profile setup: additional info |
explore/roomie/house-pics.tsx | Profile setup: house photos |
explore/roomie/chat.tsx | Chat list |
explore/roomie/chat/[roomId].tsx | Individual chat room |
explore/roomie/edit-profile.tsx | Edit profile |
explore/roomie/edit-profile-item.tsx | Edit single field |
explore/roomie/edit-profile-pic.tsx | Change profile photo |
explore/roomie/edit-house-pics.tsx | Change house photos |
Constants
constants.ts— Profile setup options and defaultsconstants/block-reasons.ts— Block/report reason options
Utilities
utils.ts— General roomie utilitiesutils/format-timestamp.ts— Chat timestamp formatting
Last updated on