Logo Lanfrica

phungnlg/expo-ride-hailing-delivery

Domain:

mobility

Record type:

software
Creator:
phu
Host:
Expo + RN ride-hailing & parcel-delivery POC for Zambia: bargaining, Stripe Connect 85/15, OTP, cash-debt flagging, wait fee, panic SOS. # Ride-Hailing & Delivery POC (Zambia) React Native + Expo proof of concept for a Zambian-market ride-hailing and parcel-delivery app. Not a clone script - this models the unique constraints from a real Upwork brief: - Passenger ride booking - Economy / Comfort / XL - Parcel delivery with **OTP + photo proof** - **Driver bargaining** with a 20-second counter-offer window - **Driver tier** (Diamond / Gold / Silver) wired to commission % (13 / 14 / 15) - **Cash payment** flow with auto debt flag + new-ride block over ZMW 100 - **Wait fee** ZMW 2/min after 10-min grace - "On my way home" mode - filters rides along driver's commute route (Haversine) - **Stripe Connect 85/15 split** PaymentIntent builder - **SOS / panic button** with hardware tracker partner API hook - Socket.IO live tracking scaffold + reconnect strategy ## Stack - Expo SDK 51 + Expo Router - React Native 0.74, TypeScript strict - Zustand for state - socket.io-client for real-time - expo-location, expo-haptics, expo-linking ## Run ```sh npm install npm run start ``` The POC uses mock offers, mock OTP, and a mock driver-position stream so it boots without backend credentials. Replace the URLs in `src/services/*.ts` with your NestJS + PostgreSQL + Socket.IO backend to go live. ## File map | Path | Purpose | | --- | --- | | `app/index.tsx` | Home - role switcher + driver status | | `app/book.tsx` | Ride request (pickup, dropoff, class) | | `app/bargain.tsx` | 20-second counter-offer window | | `app/track.tsx` | Live ETA + wait clock + Haversine remaining km | | `app/otp.tsx` | Pickup OTP verification | | `app/delivery.tsx` | Parcel dispatch + delivery OTP | | `app/payment.tsx` | Stripe Connect 85/15 split + cash debt flow | | `app/sos.tsx` | Panic dispatch + hardware tracker hook | | `src/services/stripeConnect.ts` | Split calc + PaymentIntent payload | | `src/services/otp.ts` | Twilio-shaped OTP send / verify | | `src/services/panic.ts` | Safety dispatch + tracker fetch | | `src/services/routing. …