Back to projects
iOS & Android API

Logistics & Fleet Tracking App — Mobile API

Shipment Timelines, Dispatch, Fleet Status & Proof of Delivery

Node.jsExpressMySQLBullMQS3 UploadsJWTFCM
Platforms
iOS + Android
Auth
JWTaccess + refresh
Real-time
FCM push
Proof
Photo + sign
iOS & Android · REST APIUI concept
Logistics & Fleet Tracking App — Mobile API — screenshot

API for a logistics company's mobile apps. Operations staff dispatch shipments to vehicles, drivers update shipment status from the road, customers follow a tracking timeline, and every delivery is closed with a photo and signature as proof of delivery.

Architecture & System Design

A Node.js and Express API. Shipments move through a defined set of statuses, and every change is stored as an event with time and location. The tracking timeline is built from those events. Proof-of-delivery files are uploaded directly to object storage using pre-signed URLs so large images don't pass through the API servers.

Request Flow
Ops Dispatch
Vehicle Assignment
Driver App Updates
Shipment Events
Customer Tracking
Proof of Delivery
  • Event-based shipment history gives a full audit trail for every parcel
  • Pre-signed uploads keep large proof-of-delivery photos off the API servers
  • Fleet view shows each vehicle's status, current route and load
  • Customers notified automatically at key milestones

Engineering Challenges

Updates from Poor Coverage Areas

Problem

Drivers on highways often lose signal, so status updates arrive late or out of order.

Solution

Accepted updates with the device's original timestamp and an idempotency key, and ordered the timeline by when events happened rather than when they arrived.

Result

Timelines stay accurate even when a batch of updates syncs at once after reconnecting.

Heavy Proof-of-Delivery Uploads

Problem

Photos and signatures uploaded through the API slowed down requests and used a lot of server bandwidth.

Solution

Issued short-lived pre-signed URLs so the app uploads directly to storage, then confirms the upload with a lightweight API call.

Result

API requests stay fast and uploads are more reliable on mobile connections.

Core Features

Shipment Tracking

Customer-facing timeline with each milestone, time and location.

Clean Code

shipmentEvents.routes.js
1// Idempotent status updates: replays after reconnecting are ignored
2router.post("/shipments/:id/events", auth, validate(eventSchema), "color:#c792ea">async ("color:#ffcb6b">req, "color:#ffcb6b">res) => {
3 "color:#c792ea">const { status, occurredAt, lat, lng, idempotencyKey } = "color:#ffcb6b">req.body;
4
5 "color:#c792ea">await db.query(
6 `INSERT IGNORE INTO shipment_events
7 (shipment_id, idempotency_key, status, occurred_at, lat, lng)
8 VALUES (?, ?, ?, ?, ?, ?)`,
9 ["color:#ffcb6b">req.params.id, idempotencyKey, status, occurredAt, lat, lng] // occurredAt = device time
10 );
11
12 "color:#c792ea">const shipment = "color:#c792ea">await shipments.refreshStatusFromEvents("color:#ffcb6b">req.params.id);
13 "color:#ffcb6b">res.status(201).json(shipment);
14});

Want something like this for your business?

I design and build full stack products end to end. Tell me about your idea and I'll get back to you with a plan.