The Driver app was listening to the wrong Firebase project. The Rider app posts a request to
driver-pro-card-login. The Driver app was watching active_trip_request on
rider-s-drivers-info, where that node is never written. No request could ever reach a driver.
Admin could not see drivers. Admin reads drivers from the canonical project, but driver
accounts live in the driver login project, so the list, the online counter and the approve button had nothing to act on.
Trips had no driver on them. Accepting a ride never wrote driverId or driverName,
so every trip stayed "Unassigned" in Admin.
Chat, tips and ratings were only written to the live pointer, not to the trip record, so they vanished
from history the moment the ride was cleared.
How it works now
RIDER CANONICAL DATABASE DRIVER
driver-pro-card-login
requestRide() ----------> trips/{tripId} <--------- accept (atomic claim)
active_trip_request <--------- status, GPS, chat
chat, tip, rating -------> trips/{tripId} ---------> rider tracking
|
v
ADMIN
live trips, drivers, fares, payments,
support chats, history
One ride request creates one trip with one tripId. Accepting never mints a second id.
A driver takes a ride through a Firebase transaction, so two drivers can never claim the same request.
Trip status only moves forward, so a late callback cannot push a running trip back to "requested".
The Driver app keeps signing in against rider-s-drivers-info. Only non sensitive profile fields
(name, contact, vehicle, approval, presence) are mirrored to the canonical project so Admin can manage drivers.
Every original file is kept untouched under /original as the backup master.