AWS Builder Center
Building TruckView: Risk-Aware Logistics Route Planning with AWS

Building TruckView: Risk-Aware Logistics Route Planning with AWS

I built TruckView during the WeMakeDevs × AWS First Commit 2026 hackathon, a route planning system that combines road, weather, sunlight and historical accident data to help understand risk across a long-haul truck journey.

Building TruckView: Risk-Aware Logistics Route Planning with AWS


For a long-haul truck journey, knowing how to get from one place to another is only part of the planning problem.
A route can pass through different weather conditions, sunlight and glare, road conditions and areas with different historical accident exposure. A driver or dispatcher also has to think about how the journey unfolds over time, including planned rest breaks and expected arrival.
That was the problem I wanted to work on during the WeMakeDevs × AWS First Commit 2026 hackathon.
The idea
I built TruckView, a risk-aware long-haul truck trip planning system.
The user enters:
  • Origin
  • Destination
  • Departure time
TruckView calculates the journey and then enriches the route with additional context.
Instead of only showing a line on a map, it gives the user a view of:
  • Route and driving distance
  • Driving time and traffic delay
  • Overall route risk
  • Risk by route section
  • Historical accident data
  • Weather conditions
  • Sunlight and glare
  • Night and road factors
  • Planned rest breaks
  • Expected arrival time
The goal is simple: understand the journey before it begins.

What I built

The application starts with a route planning screen where I can enter a trip such as:
Lucknow → Delhi
along with the planned departure time.
The backend then gets the actual road route and processes the returned route into smaller sections.
Each section can have its own:
  • Start and end time
  • Distance
  • Weather data
  • Sunlight data
  • Historical accident information
  • Risk score
  • Risk level
These section-level results are combined into an overall route risk.
This was important because I did not want the application to reduce the whole journey to one number. A long route can have different conditions at different points.


Making the risk visible

One of the parts I focused on was making the underlying analysis understandable in the UI.
The journey summary shows the main factors contributing to the route risk:
Accident history
Weather
Sun glare
Night driving
Road conditions
The itinerary then connects this information back to actual navigation steps.
For example, a user can open the context for a particular route step and inspect the weather, sunlight, historical accident data and combined risk associated with that section.
This makes the analysis visible alongside the route rather than hiding it somewhere in the backend.
Historical accident information is presented explicitly as historical data. It is not treated as a live accident feed.

Rest planning

Route planning is also about time.
TruckView includes a rest plan based on the returned journey information and shows the planned break duration and expected arrival.
This gives the user a view of the journey as a whole:
Departure
↓
Driving
↓
Planned break
↓
Continue journey
↓
Expected arrival

Technology stack

The frontend is built with:
  • React
  • TypeScript
  • Vite
  • Tailwind CSS
  • Mapbox GL
The backend is built with:
  • Python
  • FastAPI
For routing and external data, I used:
  • TomTom for road routing and traffic information
  • Open-Meteo for weather data
  • A historical Indian road accident dataset
  • Sunlight calculations for glare and light conditions

Where AWS fits

I built and deployed the application using AWS cloud services.

AWS Amplify Hosting

The React and Vite frontend is hosted using AWS Amplify Hosting.
I connected the project repository to Amplify so that changes pushed to the main branch can automatically trigger a new build and deployment.
That made the deployment workflow especially useful during the hackathon because I could keep improving the application without manually deploying every frontend change.

Amazon API Gateway

The frontend communicates with the backend through Amazon API Gateway.
It provides the HTTPS API endpoint used by the application to send trip and location requests.

AWS Lambda

The backend runs on AWS Lambda.
Lambda handles the application logic including route processing, route segmentation, risk calculations, historical accident matching, sunlight analysis and rest planning.
The resulting architecture is:
TruckView Frontend
│
▼
AWS Amplify Hosting
│
▼
Amazon API Gateway
│
▼
AWS Lambda
│
├── TomTom
├── Open-Meteo
├── Accident Data
└── TruckView Risk Analysis


What fought back

The most challenging part was not a single feature. It was getting several different pieces to work together reliably.

FastAPI on Lambda

Deploying a FastAPI backend in a Lambda environment required working through packaging and dependency issues that I would not normally have to think about when running the application locally.

API Gateway and CORS

Connecting the deployed frontend to the AWS backend introduced configuration issues around API access and CORS. Small configuration differences could make a working local application fail in the browser after deployment.

Amplify and a monorepo

The frontend lives inside a larger repository containing the backend and dataset.
With Amplify, I had to make sure the correct application root was configured so that the build happened inside the  frontend  directory and used the correct Vite output directory.

Environment variables

The deployment also required configuring frontend environment variables for the API endpoint and Mapbox token without putting the actual values into the Git repository.
These problems were useful because they made the difference between building an application locally and actually deploying one much more obvious.

What I learned

The biggest thing I learned was that deploying an application is its own engineering problem.
Working with AWS Amplify, API Gateway and Lambda gave me hands-on experience with a serverless architecture rather than just using AWS as a name in the project.
I also learned how important it is to keep the backend as the source of truth while designing a UI that makes complex route data understandable.
TruckView is still evolving, but the core idea is working: take a normal route and turn it into a journey that the user can actually understand before setting off.

What's next

For a future version, I would like to add an AI explanation layer using Amazon Bedrock so the structured route intelligence can be explained in natural language.
The important part is that the deterministic route and risk calculations would remain the source of truth, while the AI would explain those results rather than inventing them.

Final thoughts

Building TruckView in a hackathon setting pushed me to think beyond just getting a feature to work.
The real challenge was connecting route data, environmental context, historical information and operational planning into one coherent experience and then getting that experience deployed on AWS.
That is what TruckView is trying to do: not just find a route, but help understand the journey before it begins.
Any opinions in this article are those of the individual author and may not reflect the opinions of AWS.
Enjoyed reading this content? Let the author know!

Your likes, comments, shares, and saves help creators reach more builders.

Loading recommendations

Loading article