Weather-Aware Truck Routing
Full-stack web app
Weather on a route matters at the moment the truck gets there, not at departure. This tool takes an origin, destination, departure time, load weight and checkpoint spacing (10, 25 or 50 miles), builds three genuinely different routes, and rates each one against the forecast at every checkpoint's ETA.
Routes come from Valhalla with truck costing (falling back to OSRM). Near-duplicate routes (85% or more overlap) are dropped and replaced by detours through sideways waypoints, rejecting any detour more than 60% slower than the fastest route. Each checkpoint gets an ETA interpolated along the route and an hourly Open-Meteo forecast interpolated to that exact time.
Each checkpoint is rated by the worst of wind, rain and snow, and load rules can raise the wind rating (for example 45 to 54 mph with more than 30,000 lb is No Travel). Routes are ranked by No Travel, Severe and High miles, then average risk and duration, and the recommended route comes with a plain-English reason. A 0 to 48 hour risk heatmap of the corridor loads in the background with a play/scrub slider.
Role: Designed, built, tested and deployed it end to end
Tech: React 19, TypeScript, Vite, MUI, Leaflet, Django 5.2, Django REST Framework, Valhalla / OSRM, Open-Meteo, Render
Features
- Place autocomplete for origin and destination
- Departure time, load weight and checkpoint spacing
- Three ranked route cards with risk-miles bars
- Recommended route with a plain-English reason
- Map with routes coloured by risk
- Clickable checkpoints: ETA, weather and why
- Load-weight rules that raise wind risk
- 0 to 48 hour corridor risk heatmap with slider