Skip to Content
Housr AppFeaturesRideshare Feature

Rideshare Feature

Ride creation, search, booking, chat, driver/passenger dashboards, and ratings.

Location

  • Feature module: src/features/rideshare/
  • Routes: src/app/(tabs)/explore/rideshare/

API Functions

Defined in src/features/rideshare/api/index.ts. All use apiV2.

Profile

FunctionMethodEndpointDescription
fetchRideshareProfile()GETrideshare/profileGet current user’s rideshare profile
fetchRideshareProfileById(id)GETrideshare/profile/{id}Get profile by ID

Rides

FunctionMethodEndpointDescription
fetchRideshareRides(filter, limit)GETrideshare/ridesList rides (PAST/FUTURE/ALL)
fetchRideshareLastRide()GETrideshare/lastRideMost recent ride
searchRideshareRides(data)POSTrideshare/searchSearch for rides
fetchNearbyRides(data)POSTrideshare/searchSearch nearby rides

Ride Requests

FunctionMethodEndpointDescription
fetchRideshareRideRequests(filter, status, limit)GETrideshare/rideRequestsList ride requests
acceptRideshareRequest(id)POSTrideshare/ride/{id}/acceptAccept ride request
rejectRideshareRequest(id)POSTrideshare/ride/{id}/rejectReject ride request
cancelRideshareRequest(id)POSTrideshare/ride/{id}/cancelCancel ride request

Chat

FunctionMethodEndpointDescription
fetchRideshareChats(role?)GETrideshare/rideRequestChats[/{role}]List chats (optional role filter)
fetchRideshareChat(rideRequestId)GETrideshare/chat/{id}Get chat messages
sendRideshareChatMessage(id, message)POSTrideshare/chat/{id}/message/sendSend message
acceptRideshareChat(id)POSTrideshare/ride/{id}/acceptChatAccept chat request

Searches & Ratings

FunctionMethodEndpointDescription
fetchRideshareSearches()GETrideshare/searchesRecent search history
submitRideshareRating(data)POSTrideshare/submitRatingSubmit driver/passenger rating

Hooks

HookFileDescription
useChatshooks/use-chats.tsChat list management
useCreateRideLocationhooks/use-create-ride-location.tsLocation state for ride creation
useLocationSuggestionshooks/use-location-suggestions.tsGoogle Places autocomplete
useMapCamerahooks/use-map-camera.tsMap camera control
useBottomSheetAnimationshooks/use-bottom-sheet-animations.tsBottom sheet animation helpers

Types

  • types/index.tsRideshareProfile, RideshareRide, RideshareSearches, RideshareRideRequest
  • types/chat.tsRideshareChatListItem, RideshareChat
  • types/component-props.ts — Component prop types
  • types/profile-step.ts — Profile setup step types

Components

Ride Creation (components/create-ride/)

ComponentDescription
CreateRideBottomSheetLocation + details input sheet
CreateRideInputLocation input field
CreateRideMapMap with route display
LocationResultItemLocation autocomplete result
RideDetailsStepRide details form
RideDetailsCurrencyInputPrice input
RideDetailsDatePickerDate/time picker
RideDetailsNumberSelectSeat count selector
RideDetailsSelectDisplaySelection display

Search (components/search/)

ComponentDescription
RouteSelectorStart/end location selector
LocationResultsLocation search results
SearchRideHeaderSearch screen header
RecentSearchCardRecent search display
NoRidesNo results state
SearchResultsPlaceholderLoading skeleton

Ride Info (components/ride-info/)

ComponentDescription
RideInfoHeaderRide detail header
RideInfoDriverDriver information
RideInfoPassengersPassenger list
RideInfoAvailabilitySeat availability
RideInfoLocationRoute display
RideInfoModalFull ride details modal
DriverCardDriver profile card
PassengerCardPassenger profile card

Driver Dashboard (components/driver/)

ComponentDescription
DriverDashboardDriver home screen
DriverLandingDriver onboarding
DriverDashboardLoadingLoading state

Passenger Dashboard (components/passenger/)

ComponentDescription
PassengerDashboardPassenger home screen
PassengerDashboardLoadingLoading state

Profile (components/profile/)

ComponentDescription
ProfileStepProfile setup step
UpdateProfileEdit profile form
ProfileEditFieldEditable field
ProfileTextFieldText input field
ProfileSelectFieldSelect field
ProfileImageFieldImage upload field
ProfileStepFieldStep-based field
EditProfileSelectOptionSelect option item
TermsAcceptanceModalTerms acceptance

Chat (components/chat/)

ComponentDescription
ChatHeaderChat room header
ChatMenuChat options
RideshareChatRequestInfoRequest info in chat
RideshareRideRequestedRide request notification

Rating (components/rating/)

ComponentDescription
RideshareRatingRating flow
RatingModalRating modal
RatingPassengerPassenger rating
RatingSingleUserIndividual user rating
RatingStarsStar selector

Other Components

ComponentDescription
RideshareMain rideshare screen
RideshareCardRide summary card
RideshareDashboardHeaderDashboard header
TicketCardShapeTicket-shaped card
UpcomingJourneysUpcoming rides section
LandingTitleLanding page title
LandingRecentSearchesRecent searches on landing
EmptyRideStateNo rides state
ButtonCustom button
RightChevronButtonNavigation button
EditRidePlaceholderEdit ride loading state
EditRideOptionEdit ride option item

Routes

RouteDescription
explore/rideshare/index.tsxRideshare landing
explore/rideshare/create-ride.tsxCreate a ride
explore/rideshare/search-ride.tsxSearch for rides
explore/rideshare/search-results.tsxSearch results
explore/rideshare/ride-info.tsxRide details
explore/rideshare/ride-details.tsxRide details (alt)
explore/rideshare/ride-created.tsxRide created confirmation
explore/rideshare/rides.tsxMy rides list
explore/rideshare/edit-ride.tsxEdit ride
explore/rideshare/profile.tsxView profile
explore/rideshare/edit-profile.tsxEdit own profile
explore/rideshare/driver-landing.tsxDriver landing
explore/rideshare/driver/update-profile.tsxDriver profile update
explore/rideshare/chat.tsxChat room
explore/rideshare/messages.tsxMessages list

Utilities

  • utils/helpers.ts — General helpers
  • utils/get-address.ts — Address formatting from coordinates
  • utils/map-constants.ts — Map configuration (default region, zoom levels)
Last updated on