Back to projects

RouteWise

2025

Route optimization tool for small delivery fleets, cutting average driving time by reordering stops with a custom heuristic solver.

Solo developer

TypeScriptNext.jsPostgreSQLMapbox

Overview

RouteWise helps small delivery teams (5–20 drivers) plan daily routes without paying for enterprise logistics software. Dispatchers upload a list of stops, and the app returns an optimized order per driver in under two seconds.

Problem

Manually ordering 15–30 stops by hand takes a dispatcher 20–30 minutes every morning, and the result is rarely close to optimal. Off-the-shelf routing platforms are priced per vehicle per month and are overkill for a five-van bakery delivery business.

Approach

  • Stops are geocoded and clustered by driver using k-means on latitude/longitude.
  • Within each cluster, a nearest-neighbor heuristic followed by 2-opt local search produces the final stop order.
  • Routes are recalculated live if a stop is added or marked as delivered.
function optimizeRoute(stops: Stop[]): Stop[] {
  const seeded = nearestNeighbor(stops);
  return twoOptImprove(seeded);
}

Tech stack

Next.js (App Router) frontend with server actions for the solver, PostgreSQL with PostGIS for spatial queries, Mapbox for the map view and turn-by-turn preview, deployed as a single Docker container behind nginx.

Outcome

In a two-week pilot with a local bakery's delivery team, average route completion time dropped from 4h10m to 3h35m per driver, and the dispatcher's morning planning time went from ~25 minutes to under a minute.

Note: this is a mock case study written for portfolio demonstration purposes.