Welcome

We blend strategy, design and engineering to build intelligent systems that help businesses in Saudi Arabia and the GCC grow and stand out.

Rakb

Smart dispatch and fleet management, from order intake to proof of delivery

  • A Shfrah product
  • Logistics
  • AI
  • Mobile
  • At a glance

Sector

Logistics

Platforms

Web · Android · iOS · WhatsApp

Modules

9

Integrations

8

Screens

4

Total duration

22 weeks

Rakb takes orders from Salla, Zid and shipper ERPs over API, cleans addresses and matches them to the SPL National Address, then builds optimised routes that respect delivery windows, vehicle capacity and driver shifts. Dispatchers follow the fleet on a live map, drivers prove delivery with a photo, signature or OTP, and truck waybills are issued electronically through Bayan.

Rakb: screen 1
Dispatch tower: routes and vehicles on a live map, with exceptions ranked for action.
  • Challenge

  1. 01

    Addresses are incomplete or descriptive, like "next to the mosque", so drivers phone recipients to find them and many first delivery attempts fail.

  2. 02

    Routes are planned by hand or by experience alone, ignoring delivery windows and vehicle capacity, so some vehicles run half-empty while others are overloaded.

  3. 03

    Cash on delivery is reconciled by hand at the end of the day, with gaps between what drivers collected and what they deposited.

  4. 04

    Chilled food and medicine shipments have no continuous temperature record and truck waybills are prepared by hand before each trip, so problems surface only when the recipient rejects the load.

Who it is built for

  • Dispatcher

    A live map of the fleet and exceptions, and one-click reassignment of stops

  • Driver

    Ordered stops, clear navigation and proof of delivery in seconds

  • Recipient

    An accurate arrival window and tracking link, with the option to reschedule or share a location

  • Fleet manager

    Driver scorecards and fuel cost per route

  • Shipper & finance

    SLA reports and daily settlement of cash collected

  • Modules

What the system does

Connected modules working on one set of data.

  • 01

    Order intake

    Direct links to Salla, Zid and shipper ERPs, plus Excel import

  • 02

    Address intelligence

    Parses free-text addresses and matches them to the National Address and coordinates, with a confidence score

  • 03

    Route optimisation

    Solves the vehicle routing problem with time windows, capacity and driver shifts

  • 04

    Live dispatch

    A live map of vehicles and exceptions, plus a recipient tracking link with an updated arrival time

  • 05

    Driver app

    Ordered stops, navigation and proof of delivery by photo, signature or OTP; works offline

  • 06

    Cash on delivery

    Cash or mada collection, per-driver custody and daily settlement with the shipper

  • 07

    Bayan e-waybills

    Issues electronic truck waybills before departure and closes them on delivery

  • 08

    Cold chain

    Temperature readings per shipment, with instant alerts on excursions

  • 09

    Performance & cost

    SLA compliance, exception management, driver scorecards and fuel cost per route

Where the AI works

  • AI · 01

    An Arabic language model parses descriptive and colloquial addresses such as "Al Narjis, past the petrol station", matches them to the National Address and asks the recipient to confirm the pin on WhatsApp when confidence is low.

  • AI · 02

    An optimisation engine solves the vehicle routing problem with time windows (VRPTW) for thousands of stops, and re-plans during the day when an urgent order arrives or a vehicle breaks down.

  • AI · 03

    An ETA model learns from past trips, traffic by hour and weekday, and dwell time by location type, keeping the arrival window shown to the recipient current en route.

  • AI · 04

    Early exception detection predicts stops at risk of delay or failed delivery, and spots route deviations, long stops and rising container temperature before they become complaints.

  • Screens

The system as the client's team and customers use it.

Rakb: screen 2
Route planning: the next-day plan optimised per driver for load, delivery windows and shifts, ready to approve and send.
Rakb: screen 3
Cold-chain monitor: container temperature minute by minute, with instant alerts and a documented log attached to the shipment.
Rakb: screen 4
Driver app: the next stop with its National Address, then proof of delivery by photo, signature and OTP, and collection by mada.
  • Architecture

Independent services, in-Kingdom data, and integrations over documented APIs.

Channels

  • Dispatch console: Web control tower
  • Driver app: Flutter · offline-first
  • Tracking page: Recipient link
  • Shipper portal & API: Orders & reports
  • Vehicle sensors: GPS, temperature & doors

Edge

  • API gateway: Shipper keys & rate limits
  • IoT broker: MQTT for sensors & GPS

Services

  • Orders service: Orders & shipments
  • Routing service: Plans & assignment
  • Trip service: Tracking & POD
  • COD & settlement: Custody & settlement
  • Cold-chain service: Readings & alerts

AI

  • Address AI: Parse & match addresses
  • VRP optimiser: OR-Tools, windows & capacity
  • ETA & exceptions: Arrival times & delay risk

Data

  • PostgreSQL · PostGIS: Orders & geodata
  • TimescaleDB: GPS & temperature series
  • Kafka: Trip events
  • Object storage: POD photos, in-Kingdom

Integrations

  • Salla · Zid: Store orders
  • SPL National Address: Verify & geocode
  • Bayan (TGA): E-waybills
  • mada payments: COD collection
  • WhatsApp · SMS: Recipient notices

Connections

  • Dispatch console to API gateway
  • Driver app to API gateway
  • Tracking page to API gateway
  • Shipper portal & API to API gateway: REST
  • Vehicle sensors to IoT broker: MQTT
  • API gateway to Orders service
  • API gateway to Routing service
  • API gateway to Trip service
  • API gateway to COD & settlement
  • IoT broker to Trip service
  • IoT broker to Cold-chain service
  • Orders service to Address AI
  • Routing service to VRP optimiser
  • Trip service to ETA & exceptions
  • Orders service to PostgreSQL · PostGIS
  • Trip service to TimescaleDB
  • Cold-chain service to TimescaleDB
  • Trip service to Kafka: events
  • Trip service to Object storage
  • Orders service to Salla · Zid: webhooks
  • Address AI to SPL National Address
  • Trip service to Bayan (TGA): e-waybill
  • COD & settlement to mada payments
  • Trip service to WhatsApp · SMS

Stack

  • Next.js
  • NestJS
  • Flutter
  • PostgreSQL · PostGIS
  • TimescaleDB
  • Kafka · MQTT
  • Python · OR-Tools
  • OSRM
  • Kubernetes
  • Workflow

Shipment journey from order to delivery

  1. 01

    Order received

    Store or shipperSalla · Zid · ERP API

  2. 02

    Clean & geocode address

    AutomaticAddress AI · SPL

  3. 03

    Recipient confirms location if needed

    RecipientWhatsApp

  4. 04

    Build route plan

    Optimiser, then plannerVRP optimiser

  5. 05

    Issue waybills & load vehicles

    WarehouseBayan · Trip service

  6. 06

    Run & live tracking

    DriverDriver app · ETA model

  7. 07

    Handle exceptions

    DispatcherDispatch console

  8. 08

    Proof of delivery & COD

    Driver & recipientPOD · mada

  9. 09

    Settlement & shipper report

    FinanceCOD & settlement

  • Data & API

The core entities and relations, and a live example from the API.

Shipper

  • iduuidPK
  • nametext
  • channelenum(salla,zid,api,erp)
  • api_key_hashtext
  • sla_profilejsonb
  • cod_termsjsonb
  • created_attimestamptz

Order

  • iduuidPK
  • codetextunique
  • shipper_iduuidFK
  • address_iduuidFK
  • recipient_phonetext
  • window_starttimestamptz
  • window_endtimestamptz
  • cod_amountnumeric
  • statusenum

Address

  • iduuidPK
  • raw_texttext
  • short_codetext
  • districttext
  • locationgeography(Point)
  • confidencereal
  • verified_byenum(spl,recipient,driver)

Vehicle

  • iduuidPK
  • platetext
  • typeenum(van,truck,reefer)
  • capacity_kgnumeric
  • capacity_m3numeric
  • sensor_idtext
  • temp_rangenumrange

Driver

  • iduuidPK
  • nametext
  • national_idtext
  • phonetext
  • shiftjsonb
  • cash_limitnumeric
  • scoresmallint

Route

  • iduuidPK
  • plan_datedate
  • driver_iduuidFK
  • vehicle_iduuidFK
  • distance_kmnumeric
  • load_kgnumeric
  • fuel_costnumeric
  • bayan_waybilltext
  • statusenum

Stop

  • iduuidPK
  • route_iduuidFK
  • order_iduuidFK
  • seqsmallint
  • etatimestamptz
  • arrived_attimestamptz
  • podjsonb
  • outcomeenum

TempReading

  • vehicle_iduuidFK
  • sensor_idtext
  • attimestamptz
  • celsiusreal
  • door_openboolean
  • batterysmallint
  • Shipper 1—∞ Order
  • Address 1—∞ Order
  • Order 1—∞ Stop
  • Route 1—∞ Stop
  • Driver 1—∞ Route
  • Vehicle 1—∞ Route
  • Vehicle 1—∞ TempReading
POST /v1/orders Create a delivery order from a store or shipper system

Request

{
  "external_ref": "SALLA-88412093",
  "channel": "salla",
  "recipient": { "name": "Lama Alharbi", "phone": "+966550118274" },
  "address": {
    "text": "Al Yasmin, after the petrol station, villa 12",
    "short_code": null,
    "city": "Riyadh"
  },
  "window": { "from": "2026-11-09T10:00:00+03:00", "to": "2026-11-09T12:00:00+03:00" },
  "parcels": [{ "weight_kg": 2.1 }, { "weight_kg": 1.3 }],
  "cod": { "amount": 385.00, "currency": "SAR" },
  "pod": ["otp", "photo"]
}

Response

{
  "id": "ord_01JDX4R2B7K",
  "code": "ORD-77154",
  "status": "address_verified",
  "address": {
    "short_code": "RRYA4821",
    "lat": 24.8241,
    "lng": 46.6402,
    "confidence": 0.94,
    "matched_by": "spl_national_address"
  },
  "planned_date": "2026-11-09",
  "tracking_url": "/track/77154"
}

Webhook event · stop.delivered

{
  "event": "stop.delivered",
  "order": "ORD-77154",
  "route": "R-0501",
  "delivered_at": "2026-11-09T10:42:18+03:00",
  "pod": { "otp_verified": true, "photo": "pod_9c2e", "signature": "sig_41ab", "distance_m": 14 },
  "cod": { "amount": 385.00, "method": "mada", "currency": "SAR" }
}
  • Integrations

  • Salla · Zid

    Store orders in, shipment status back automatically

  • SPL National Address

    National Address verification and geocoding

  • Bayan (TGA)

    Issuing and closing electronic truck waybills

  • Shipper ERP

    Orders in and proof of delivery back over API

  • mada payments

    Cash-on-delivery collection by mada card or payment link

  • WhatsApp Business · SMS

    Recipient notices, tracking link and pin confirmation

  • Telematics & sensors

    Vehicle GPS, temperature and door sensors

  • Fuel cards

    Actual fuel use for cost per route

  • Security & compliance

  • Data, proof-of-delivery photos and backups hosted inside the Kingdom.
  • National Cybersecurity Authority Essential Cybersecurity Controls (ECC).
  • Personal Data Protection Law (PDPL) alignment: recipient numbers are masked from drivers through a call relay, and tracking data expires after a set period.
  • Role-based access with full tenant isolation, so each shipper sees only its own orders.
  • A tamper-proof temperature log for every chilled shipment, supporting Saudi Food and Drug Authority documentation requirements.
  • A cash custody limit per driver and daily reconciliation of collected against deposited amounts.
  • Encryption in transit and at rest, with revocable API keys per shipper.
  • Delivery plan

Clear phases with measurable deliverables.

  1. 01

    Discovery & process mapping

    • Workshops with dispatch, warehouse and finance
    • Ride-alongs with drivers
    2 weeks
  2. 02

    UX & architecture

    • Dispatch tower and driver app prototypes tested in the field
    • Shipper API and data model design
    3 weeks
  3. 03

    MVP build

    • Orders, address cleaning and route planning
    • Driver app with proof of delivery and COD
    8 weeks
  4. 04

    Integrations

    • Salla, Zid, National Address, Bayan and mada
    • Tracker and temperature sensor onboarding
    4 weeks
  5. 05

    Pilot & model tuning

    • Pilot in one city zone
    • Tune the ETA model on trip data
    3 weeks
  6. 06

    Go-live & hypercare

    • Phased rollout city by city
    2 weeks
Total duration
22 weeks
Team
Project manager, business analyst, 3 backend and frontend engineers, 2 mobile engineers, an operations-research and ML engineer, QA and DevOps.

Performance

  • 90%+ Addresses matched automatically to the National Address
  • < 60s Re-plan after an urgent order or breakdown
  • 95%+ First-attempt delivery success
  • 99.9% Availability

Related work

All work

Have a similar project?

Start a project
Contact us