Ride History: Tracking Every Completed Trip
The idea behind Ride History is straightforward: after a driver marks a ride as complete, both the rider and the driver should be able to look back at all their past trips. Not just today's rides, but their entire account history.
On the backend, the API queries Supabase for every ride tied to the user's Google ID, filtered to only completed rides and ordered newest-first:

There's no date filter and no row limit -- it returns every completed ride the account has ever taken. On the mobile side, each ride renders as a card showing the date, route, pickup time, and the matched rider or driver's name. Users can also dismiss individual entries or clear the whole list, which sets a driver_hidden or rider_hidden flag without actually deleting data.
One challenge we ran into was understanding the ride lifecycle. Rides are created with status: "accepted" when a match is confirmed through our real-time matching worker. They only flip to "completed" when the driver explicitly taps "Complete ride" on their dashboard. This means the history screen is intentionally limited to trips both parties actually finished -- not just ones that were matched.
Profile Image Picker
We also built a reusable PhotoPicker component that lets both riders and drivers set a profile photo during setup. It uses Expo's ImagePicker API to request gallery permissions, open the device photo library, and crop to a 1:1 square:
The selected image is sent to the backend as part of a FormData payload during registration, where it gets uploaded to Supabase Storage and the public URL is saved to the user's profile. This was trickier than expected because React Native and web handle file blobs differently -- on web we can pass the raw File object, but on native we pass a { uri, name, type } descriptor that fetch knows how to stream as multipart form data.
The profile photo then shows up across the app: in the rider's home screen header, in the driver's rider list, and anywhere a user's identity is displayed.
Author: Kofi Amo-Antwi



Top comments (0)