Web · Sevenco Admin · 2026

The open ride moves with the car.

What did this project ship?

Open a live ride and leave it open. The status, the chauffeur’s pin, and the trail arrive as events. The page applies them in place.

  • Live status
  • Driver broadcast
  • Trail inserts
  • Stale pin
  • Socket backup
  • Open desk
Sevenco admin dashboard: ride totals, commission, and recent rides.
Industry
Mobility
Country
India
Scope
Operations desk

01

The desk stays on the trip

The driver phone publishes driver_location on ride-updates for that ride, and the ride row changes as the shift moves through accept, arrive, start, and collect. The desk is subscribed to those changes. An operator watching one trip does not reload to see the car move.

02

Engineering challenges

The open ride is a live trip. Status, the pin, and the trail each arrive on their own channel. A page that fetched the row once is looking at a car that has already moved.

  1. 01
    The row moves while the page sits open

    Accept, arrive, the OTP time, start, the actual drop, payment, the deviation agreement, and the call mask all land on the ride after the desk loaded it. An operator on the phone with a rider is then reading a status the shift has already left.

  2. 02
    Three places the car can be

    The driver phone sends driver_location on the ride-updates channel. ride_location_history receives an insert for the saved trail. drivers.current_lat updates on the driver row. A map that paints only one of those shows a car with no line behind it, or a line whose end is minutes behind the car.

  3. 03
    A late event pulls the car backward

    The broadcast and the driver-row update do not arrive in order. Apply an older timestamp on top of a newer one and the marker jumps back while someone is watching the Mumbai map.

  4. 04
    The socket drops mid-trip

    The channel can disconnect while the chauffeur is still moving. If the only update path was that socket, the pin freezes until the page is reloaded. If the backup poll is as slow as a healthy connection, a dead socket and a live socket are equally late.

  5. 05
    A finished trip keeps the channel open

    Completed and cancelled still have a trail, and the car is no longer moving. Leave the ride channel, the history subscription, and the location poll running and the desk keeps drawing points after the trip ended.

  6. 06
    Every open desk has to hear the same event

    A booking pause and a new support ticket happen while other operators already have the desk open. If those land only on the next full load, the second desk still shows the city as open and the inbox as quiet.

03

How we solved them

The open ride subscribes. Status is a row change. The pin is the same broadcast the driver phone sends. The trail grows by insert. A poll is the backup when that socket is down.

  1. The ride row patches the open page

    admin-ride-detail listens for an update on that ride. The event writes status, the step timestamps, payment, the actual drop, the deviation flag, and the call mask into the page already on screen. Earnings reload from that same event. The operator does not reload.

  2. The pin is the driver’s broadcast

    The desk joins ride-updates for that ride and takes the driver_location event: latitude, longitude, heading, and the timestamp. A second channel listens for an update on that driver’s current position. Both write the same marker.

  3. The trail appends

    admin-ride-location-history listens for an insert on that ride. A point whose id is already on the line is dropped. The rest are sorted onto the polyline, and the live pin is added at the end while the trip is still moving.

  4. An older fix is ignored

    A location is applied only when its recorded time is at least as new as the one on screen. A broadcast that arrives late does not pull the car backward. A point older than the stale window is marked late, and the route treats it as not fresh.

  5. The poll depends on the socket

    While the channel is subscribed, the ride and the pin use a slow backup read. When the subscription drops, that read tightens. On subscribe, the desk fetches once, so the gap while the socket was down is filled. Completed and cancelled stop the ride poll.

  6. Pause and the inbox are events too

    booking_paused is a change on that settings row, applied on every open desk. A new support request, a status change on one, and a rider message each arrive on the support channel and update the badge in place.

04

System design

One channel name per live ride, shared with the driver phone. The durable status is the ride row. The moving pin is the broadcast. The list behind the detail is a separate, slower read.

  1. 01
    ride-updates is the shared channel

    The driver phone keeps one channel open for that ride and sends driver_location, ride_status_changed, and stop_reached on it, including across a token refresh. The desk joins the same channel for the pin. Status on the desk comes from the ride row, so a missed broadcast does not leave the chip behind the database.

  2. 02
    Live means a set of statuses

    The pin, the history channel, and the history poll run from accepted through collect_cash: arrived, the start photos, started, and the end photos. Completed and cancelled leave that set. Points recorded after the trip end stay off the driven line.

  3. 03
    The marker and the road are separate

    The live coordinate is appended to the saved samples, then a street path is built for a one-way trip. The navigation route uses that pin only while the ride is live and the point is still fresh. A round trip does not build that driven street path.

  4. 04
    The rides list is not the ride channel

    The open ride is event-driven. The rides table is a paged query with its own refetch. Opening a row is what starts admin-ride-detail, the history channel, and ride-updates. Closing the page removes those channels.

  5. 05
    Support and the pause sit on their own channels

    admin-support-inbox listens to inserts and updates on support_requests, and to a rider insert on support_request_messages. admin-booking-paused listens to the booking_paused key. Neither waits on the ride channel.

  6. 06
    A disconnected desk still has a clock

    isRealtimeConnected follows the subscription status. The backup interval is chosen from that flag. A stale check on a timer marks a pin whose last time is too old, so the route stops treating a frozen car as live.

05

What the desk includes

Leave a live ride open. The chip, the car, and the line change as the chauffeur moves. The inbox and the booking pause change the same way.

  1. 01
    The status chip

    Requested becomes accepted, arrived, the photo steps, started, collect cash, then completed or cancelled, on the page that was already open. Payment, the masked numbers, and the actual drop update with that row.

  2. 02
    The car on the map

    Leaflet draws the chauffeur from the live pin. The point goes stale if it stops arriving. Pickup, drop, and the actual stop stay on the same map.

  3. 03
    The line behind the car

    The recorded trail lengthens as history inserts arrive. The timeline under the map follows those points. A one-way trip also draws the street path from the samples plus the live pin.

  4. 04
    The same channel as the driver phone

    The pin is the driver_location event that phone already sends for the rider map. The desk is another listener on ride-updates. It does not ask the chauffeur’s app to publish a second stream.

  5. 05
    A ticket while the ride is open

    A new support request and a rider reply raise the badge and the alert without leaving the ride. Complaints still have their own detail page.

  6. 06
    The city pause

    Settings holds booking_paused. Flipping it updates every open desk. New bookings stop. Trips already accepted keep moving, and those rides stay on the live map.

06

What we built

We shipped the Sevenco operations desk on the same realtime channels as the driver app. The open ride patches from postgres changes and from the driver_location broadcast. A poll runs only as the backup, and it stops when the trip is completed or cancelled.

07

Runtime

Clocks from the live ride on the operations desk.

Stale
45s

A pin older than this is marked late

Backup
15s

Ride and pin read while the channel is up

Backup
5s

Ride and pin read while the socket is down

Trail
10s

History poll while the ride is live

Trail
10000

Location points loaded for one ride

Clock
15s

How often a stale pin is rechecked

List
10s

Rides table refetched

Page
10

Rides on a list page

08

What we delivered

  • Sevenco operations desk
  • Sign-in that requires profiles.role admin or super_admin
  • Dashboard for all time, today, this week, and this month
  • Rides list with status and search
  • Live ride page: status, payment, and call mask patched from the ride row
  • Driver pin from the driver_location broadcast on ride-updates
  • Trail from ride_location_history inserts, drawn on Leaflet
  • Drivers, pending verification, and driver detail
  • Users and user detail
  • Complaints
  • User support inbox
  • Notifications
  • Coupons
  • Payments
  • Withdrawals, completed or rejected through admin_apply_payout_result
  • Training videos, encoded in the browser when they exceed the storage cap
  • Settings, including the booking pause
  • Service regions and banners in development builds

09

Technology

  • React
  • TypeScript
  • Supabase
  • PostgreSQL
  • Vite
  • Leaflet
  • TanStack Query

Live product

In production.

The desk runs against the same database as the Sevenco rider and driver apps.

Have a similar challenge?

Tell us what you need built.

Share the product, app, or system you want. We’ll help make the next step concrete.