← All projects
Case study · Mobility · Mobile · Client work

Rides and deliveries in Algeria, at a price both sides agree on.

WEVO is a ride-hailing and moto-delivery app for Algeria. Clients propose a price, nearby drivers accept or counter, and everyone follows the trip live on the map. One React Native codebase holds the client app, the VTC driver app, the moto courier app and the admin dashboard, in Arabic and French.
ClientWEVO, Algeria, through my agency Barmjli
StatusAndroid beta build ready; store release next
PlatformAndroid and iOS, React Native 0.85 bare, new architecture
StackReact 19, TypeScript, Supabase (Postgres 17, Realtime, Edge Functions, pg_cron)
WEVO client home screen
4
apps in one codebase: client, driver, courier, admin
39
SQL checks on the order flow
7
wilayas, enforced in the database
2
languages: Arabic (RTL) and French

Overview.

Who it is for, what was hard, what shipped.
The users

Riders, senders, drivers and couriers

People in Algerian cities who need a car or want a parcel moved across town, and the VTC drivers and moto couriers who earn from it, mostly paid in cash.

The problem

Prices are negotiated, trust is thin

Riders expect to discuss the price, drivers want the closest jobs, and nobody wants a trip that hangs with no driver. Parcels need proof that they reached the right person.

The product

Negotiation with rules, matching by distance

Server-issued prices with an allowed range, offers and counter-offers in real time, waves of the closest drivers, live tracking, in-app chat, and delivery proof by secret code, photo or signature.

Screens.

From the beta build, running on the real backend.
WEVO client home screen in Arabic
01 · Client home

A ride or a parcel, from one screen

The client picks a ride or a delivery, sees the trip in progress at the top, and starts from their real GPS position. The whole app runs in Arabic (right to left) or French.

  • 1
    Real position, namedThe pickup starts at the phone's GPS fix, and the app names the spot from the nearest landmark or street.
  • 2
    Only where WEVO operatesService is limited to seven wilayas (Alger, Oran, Constantine, Sétif, Annaba, Blida, Tlemcen). Outside them, ordering and going online are refused by the database.
  • 3
    Saved placesHome, University and Work are one tap away, and any past trip can be booked again.
Vehicle options with prices
03 · Price

A real price from the real road distance

Each option shows a price computed on the server from the road route, the pricing rules for that vehicle and the live balance of requests and free drivers nearby.

  • 1
    Road distance, not a straight lineThe quote function gets the route from OSRM: distance, time and the line drawn on the map.
  • 2
    Rules the client can tuneBase fare, per km (cheaper after 15 km between cities), per minute, minimum fare, night factor and vehicle factor.
  • 3
    Live demandA factor between 1.0 and 1.5 based on open requests against online drivers within about 10 km.
Propose your price screen with a 2,100 DA offer
04 · Negotiate

Propose your own price, within a fair range

As in the local market, the client can offer a different price and drivers can counter. The server decides what range is allowed, so the negotiation stays fair to both sides.

  • 1
    Server-issued quotesEvery order must reference a quote that is valid for 20 minutes and can be used once.
  • 2
    A range the app can't stretchOffers outside 70% to 300% of the suggested price, or below the minimum fare, are rejected by the database.
  • 3
    Offers and counter-offers liveDrivers' offers arrive over Supabase Realtime, and the client accepts the one they want.
Driver receiving a new ride request
05 · Driver

The closest drivers hear about it first

A new request reaches the nearest free drivers in waves. The driver sees the price, the distance and the client's rating, and can accept, reject or send a counter-offer.

  • 1
    Waves of 3, 6, then 12The 3 closest within 3 km for 25 seconds, the 6 closest within 5 km, the 12 closest within 8 km, then everyone within 10 km.
  • 2
    Sound and vibrationA new request rings with WEVO's own alert sound and vibrates, with a notification when the app is in the background.
  • 3
    No stale requestsA request nobody takes within 6 minutes closes by itself and the client can retry with another price.
Client tracking the driver on the way, with chat and call buttons
06 · Live trip

Follow the driver, talk to them in the app

Once matched, the client sees the driver's photo, car and plate, the arrival time and the car moving on the map. Chat and call buttons replace SMS.

  • 1
    Live GPSOnline drivers stream their position every 10 metres moved, at most every 2.5 seconds, with a heartbeat every 45 seconds.
  • 2
    In-app chatClient and driver message each other inside the trip, with a notification for each new message.
  • 3
    Nobody stays stuckEither side can cancel before pickup, and trips whose driver goes silent are closed automatically.
Delivery destination search
07 · Delivery

Parcels with proof of delivery

The sender sets a recipient and a destination, and a moto courier picks it up. The courier photographs the parcel at pickup and proves the delivery with a code or a signature.

  • 1
    A secret codeThe recipient gets a 4-digit code that is never sent to the courier. The delivery completes only with the right code.
  • 2
    Photo at pickupThe courier takes a photo of the parcel with the phone camera when collecting it.
  • 3
    Or a signatureWhen the code isn't available, the recipient can sign on the courier's screen.
Activity history with totals
08 · Activity

History, ratings and what drivers owe

Clients see every trip and delivery with its price. Drivers see their earnings, and on cash trips the commission they owe WEVO is tracked until it is settled.

  • 1
    Ratings both waysClients rate drivers and drivers rate clients after every trip.
  • 2
    Commission on cash tripsEach cash trip records WEVO's commission, and settlements clear it.
  • 3
    Driver profile requiredDrivers add a photo and the car's model, year and plate before they can go online.
WEVO admin dashboard in the app
09 · Admin

The operator's dashboard, inside the same app

An admin mode gives WEVO's team a live view of the service: trips and deliveries in progress, online drivers, the map, orders, users, finance, prices and settings.

  • 1
    PeopleApprove, ban or delete accounts, and see each person's payments and messages.
  • 2
    PricesPricing rules are edited from the app, without a new release.
  • 3
    One codebaseClient, VTC driver, moto courier and admin are modes of one React Native app.
Arabic RTL and French
Custom alert sounds
Offline banner
Push notifications (FCM)
Licensed Esri map tiles
Camera and signature capture

More screens.

Onboarding in both languages, and the driver's side of a trip.

Architecture.

No separate server. The app talks to Supabase, and the rules live in Postgres.
Device
React Native appClient, VTC driver, moto courier and admin modes · Arabic and French · new architecture, Hermes
Maps and GPSreact-native-maps with Esri tiles · device GPS · Android foreground service while online
Native featuresCamera for pickup photos · signature pad · alert sounds · FCM push
→
Supabase
Postgres 17 + RLSOrders, offers, drivers, quotes, ratings, settlements, messages · state changes through checked functions
RealtimeOffers, matching, trip steps and driver positions streamed to both phones
pg_cron jobsRequest waves and expiry every 30 seconds · stuck-trip cleanup · cache pruning
Edge Functionsquote · route · places · push
→
Services
OSRMRoad distance, time and route line for prices and navigation
Photon / OpenStreetMapPlace search and reverse geocoding, limited to Algeria
Esri and FirebaseBasemap tiles · push notifications through FCM HTTP v1
About 16,700 lines of TypeScript in the app and 24 SQL migrations, with every Arabic and French string in the app's own translation files.

Engineering deep dives.

Six problems that shaped the app, each with what it cost.

1. Prices the server agrees to

Problem
A price computed on the phone can be changed on the phone. In a negotiated market, both sides need a price the system stands behind.
Approach
An Edge Function checks the session, asks OSRM for the road route and calls issue_quote(), which applies the pricing rules and live demand. The quote is valid for 20 minutes and single use. An order must reference it: the server copies distance, duration and route from the quote and rejects prices outside the allowed range with BAD_PRICE, QUOTE_EXPIRED or QUOTE_INVALID.
Trade-off
The public OSRM server is for development only. When it fails, the function falls back to a straight-line estimate flagged routed: false, and a production router is still to be set up.
Lives in: supabase/functions/quote · pricing_rules · quotes

2. Closest drivers first, enforced by the database

Problem
Sending every request to every driver floods the city and rewards whoever taps fastest, not whoever is closest.
Approach
A driver can see a searching request only if they are online, have the right vehicle, sent GPS in the last 3 minutes, are free, and fall inside the current wave. That rule lives in a row-level security function, private.driver_can_see, and make_offer rejects anyone outside it with OUT_OF_RANGE. A pg_cron job every 30 seconds widens the wave and pushes the drivers who just entered it.
Trade-off
Drivers' feeds re-read every 10 seconds to see the next wave, which costs some requests compared with a pure push design.
Lives in: RLS · make_offer() · pg_cron wevo-request-waves

3. A trip is a state machine in Postgres

Problem
A ride touches two people's data: the client's order and the driver's status. Letting the app write those rows directly invites race conditions and cheating.
Approach
Plain table writes are allowed only on your own rows. Every step that touches someone else's data (offer, accept, arrive, start, finish, cancel, rate) goes through a checked database function that validates the current state first. A SQL test file runs 39 checks over the whole order flow.
Trade-off
More logic lives in SQL than in TypeScript, which is harder to debug, but it is the one place both apps can't bypass.
Lives in: supabase/migrations · supabase/tests/order_flow.test.sql

4. GPS that keeps working with the screen off

Problem
A driver puts the phone in a holder and locks it. Android kills background apps, and a driver who stops sending positions disappears from matching.
Approach
On Android, a foreground service with a persistent notification keeps the position stream and the session token alive while the driver is online. Positions are throttled by distance and time, going online without a GPS fix fails with NO_GPS, and a server job sets drivers offline after 10 minutes of silence and closes trips that never started.
Trade-off
iOS background location is not done yet, so on iPhone the driver app must stay open.
Lives in: OnlineService (Android) · drivers.lat/lng · pg_cron wevo-expire-stale

5. Maps without a big monthly bill

Problem
A ride app draws maps all day. Paying per map load before launch would cost more than the client's budget allowed.
Approach
The app draws Esri's licensed dark-gray basemap tiles, styled to WEVO black, with labels in the app's language. The 512 px tiles are drawn one zoom level lower, so labels stay normal size and each screen needs four times fewer tiles, inside the free tier of two million tiles a month. Place search is cached in Postgres for seven days.
Trade-off
Place search uses the public Photon server, which is fair use with no guarantee. A self-hosted geocoder is on the launch list.
Lives in: src/components/map/TileMap.tsx · supabase/functions/places

6. A native crash on startup, traced and pinned

Problem
The app crashed at startup with a segmentation fault deep in React Native's component registry, before any of its own code ran.
Approach
The cause was react-native-maps 1.26 compiling its native code without React Native's RN_SERIALIZABLE_STATE flag, which corrupted the props layout in the new architecture. Pinning React Native 0.85.3 with react-native-maps 1.29.8 or newer fixed it, and the README warns against downgrading.
Trade-off
Pinned versions mean upgrades need care and a test build each time.
Lives in: mobile/package.json · mobile/README.md