KKKim Kakiiza
All work
Category
FULL-STACK · LOGISTICS · SaaS
Year
2026
Role
Full-stack engineer
Status
Shipped

RoutePulse Logistics

Multi-tenant logistics SaaS with real-time fleet tracking, AI route optimization, and a mobile driver app.

Case study

What this project is about.

Last-mile delivery dispatch is still largely manual — dispatchers juggle spreadsheets, drivers have no in-app guidance, and operations teams have zero real-time visibility. RoutePulse solves all three with a single multi-tenant platform. The backend is a FastAPI service with JWT authentication and a three-tier RBAC model (admin, dispatcher, driver). Supabase PostgreSQL with Row Level Security provides the multi-tenant data isolation — each tenant's rows are invisible to all other tenants without any application-level filtering. A critical architecture decision was using SECURITY DEFINER functions for RLS policy helpers to prevent infinite recursion in the policy evaluator, a subtle Postgres constraint that burns teams who reach for helper functions naively. The web dashboard is built on Next.js 15 App Router and gives dispatchers a live fleet map, route assignment UI, and delivery status board. The mobile experience is an Expo React Native app with separate flows for customers (tracking) and drivers (turn-by-turn task queue). Redis holds the GPS hot path — driver location pings write to Redis first, a background worker flushes to Postgres, so the map stays live without hammering the database on every coordinate update. Route optimization runs on Google OR-Tools (a constraint-satisfaction solver), computing the optimal delivery sequence across all active orders given time windows, vehicle capacity, and driver start locations. On the included demo dataset of 124 deliveries per day it saves 42.8 miles, reduces late-risk packages by 22%, and achieves a 92.6% on-time rate. Additional engineering highlights: pydantic_settings v2 with JSON-encoded list fields for clean Docker environment config; a principal dataclass pattern for propagating RBAC context through every service call without threading it through function signatures; structured JSON logging throughout the FastAPI service for log aggregation. A full security audit and monitoring stack (Prometheus metrics, health endpoints, structured error codes) were included in the 19-task build, completed end-to-end — schema, auth, API, web dashboard, mobile app, optimization, observability, docs — in a single session.

More detailed notes — architecture, decisions, tradeoffs, and outcomes — get published here as the project matures, alongside source code and live deployments.

Next project

LLM-Powered RAG Chatbot

Open