Inspiration

In Indian construction, a delayed shipment isn't just a logistics problem — it's an idle crew standing on-site, burning labor costs while they wait for materials that never show up. We learned that project managers usually discover a delay only after the truck is already stuck in monsoon rain or highway congestion. By then, the money is already lost. We wanted to move that knowledge earlier — to predict the delay while there's still time to act on it.

What it does

TransitFlow AI is a supply chain control tower for construction logistics. You submit a shipment — origin, destination, material, distance — and the system forecasts exactly how many hours it will be delayed, using route distance, live weather, and traffic conditions. Each shipment is plotted on a live Risk Radar and classified as LOW, MEDIUM, or CRITICAL risk. But prediction alone isn't enough. For every at-risk shipment, our Prescriptive Action Engine recommends a concrete step — like reassigning a framing crew to foundation work so no one sits idle. We turn a delay you can't control into a decision you can.

How we built it

  • Backend: A FastAPI service exposing a /predict-delay endpoint. It gathers features (distance, weather severity, traffic index, and their interaction), runs an XGBoost regression model, and returns the predicted delay, risk level, contributing factors, and a prescriptive action.
  • Live conditions: For destinations, the backend fetches real weather severity; for demos, the frontend can pass simulated weather/traffic to make the impact interactive.
  • Frontend: A React + Vite dashboard with a night-ops "control tower" theme — an animated SVG radar that plots shipments by severity, a live shipment board, and the prescriptive action console. Styled with Tailwind CSS.
  • Integration: The frontend POSTs shipment data to the backend and renders the model's response in real time.

Challenges we ran into

  • First-time full-stack integration: Connecting a React/Vite frontend to a FastAPI backend meant learning CORS, environment variables, and request/response mapping from scratch.
  • Dev environment hurdles: Setting up on Windows brought PowerShell execution-policy errors, the Tailwind v4 migration (which removed the old init workflow), and structuring the repo cleanly across frontend/backend/data folders.
  • Schema mismatch: Our prediction endpoint returns only the forecast — not the original shipment details — so the frontend had to hold onto the input data and merge it with the response to display anything meaningful.
  • Feature engineering: Deciding how weather and traffic interact (not just their individual effects) to influence delay was key to making the model's output realistic.

Accomplishments that we're proud of

  • A working end-to-end pipeline — from a user submitting shipment details, to a live XGBoost prediction, to a rendered recommendation, fully connected frontend-to-backend.
  • We closed the loop from prediction to action. Most delay-prediction tools stop at "this will be late." Our Prescriptive Action Engine turns that forecast into a concrete next step, which is what makes the product genuinely useful on a real construction site.
  • A distinctive, purpose-built interface — instead of a generic dashboard, we designed a night-ops "control tower" with a live Risk Radar that plots shipments by severity, so the state of the whole supply chain is readable at a glance.
  • We built our first full-stack ML application — integrating a FastAPI inference API with a React frontend, including live weather lookup and interactive condition simulation for demos.

What we learned

  • How to design and consume a real ML inference API end-to-end.
  • That a good prediction is only half the product — surfacing an action is what makes it usable.
  • Practical full-stack fundamentals: git workflows, CORS, environment config, and keeping a frontend and backend in sync.

What's next for Transit-Flow-AI

  • Replace simulated traffic with a live traffic API and real route geodata for accurate radar bearings.
  • Batch predictions for entire fleets, not one shipment at a time.
  • Historical accuracy tracking to show how the model's forecasts held up against actual arrivals.

Built With

Share this project:

Updates

Submission history