User workflow

From subscribe to unlock & ride

Rent path: subscribe → pay → unlock BhaरBike → ride → live tracking.

Scroll

Orange renter journey: book BhaरBike → pay → unlock → GPS peace of mind.

Scene 1

User taps subscribe

Everything begins when someone picks a plan in the BhaरBike app.

Tap Subscribe ₹2999Booking request sent to server

The app packages what they chose and opens the door for payment — still safe, still reversible until pay succeeds.

BhaरBike
Subscribe ₹2999
Scene 2

Backend & API

Your Node server is the gatekeeper: it checks input and prepares Razorpay.

HTTPS request arrivesValidated order draft + Razorpay order id

Middleware and validators run first; only clean payloads become rows and payment intents.

Scene 3

Razorpay checkout

Money is collected by Razorpay — BhaरBike never stores card or UPI PINs.

Customer completes paySigned receipt → verify on server

Success isn’t guessed: the app sends proof back; the API verifies the signature before trusting “paid”.

Razorpay · Secure pay
BhaरBike subscription
₹2,999
Paid
Scene 4

Saved in Supabase

One database row ties the human, the bike slot, and the payment together.

Verified paymentOrders + payments updated

Supabase Postgres is the single source of truth for dashboards, unlock logic, and history.

SUPABASE
Scene 5

Admin notification

Ops sees new paid rentals immediately — no spreadsheet chasing.

Paid row appearsDashboard toast + monitoring

Teams confirm fleet health, spot failures early, and trust the same data the unlock API will read.

🔔 New paid subscription
Fleet / ops review
Scene 6

Bike unlock

Paid → unlock: the app asks the server “is this renter cleared?” before the motor frees.

Tap Unlock BikeRide Started + IoT unlock (if linked)

Try the button: the API re-checks payment, moves the order to ongoing, updates Supabase, and calls the IoT shim when a bike_id exists.

🔒
Scene 7

Live tracking

See where the bike is during the rental — peace of mind for you and ops.

GPS / trips updateRoute + bike dot on map

With MAPBOX_ACCESS_TOKEN you get a real dark map and orange path. Without it, the same story plays as a full-width animated preview. Trusted renters can later open the green Rider flow — same platform.

Add MAPBOX_ACCESS_TOKEN in .env for real Mapbox map
BhaरBike · User → Rider · one rental platform story