Transit Planner
Web App, 2026
🥇 This project was awarded at Hack Canada 2026
The Mission
Build a feature-rich, easy to use tool to democratize transit planning decision making.
Origins
Transit Planner started at Hack Canada 2026, where it won. The idea goes back further; as a kid I spent countless hours on subway builders like JP Wright's Brand New Subway. I wanted to build my own version of this, with more advanced analysis and AI features.
It's now live at transitplanner.app and still in active development, where we keep adding map overlays, agent-based commuter simulation, and planning tools.
Features
Interactive transit network editor
Draw and edit lines.
Six-agent AI council
An 11-node StateGraph. Two planners, one NIMBY.
StateGraph: 11 nodes, 5 of which call a model. Indigo edges are the feedback loop, capped at two revisions.Agentic map assistant
Wanted to create more than a chatbot. Capable of flying to and circling areas on the map, reading census data, and dropping pins. Useful for identifying service gaps and other queries.


Census-grounded analysis and simulation
Layers accessible to both users and the agent include transit desert, isochrone, gravity-model ridership simulation, and equity/travel-time scoring. This was built on Statistics Canada dissemination-block population data in Supabase/PostGIS.


Live network data
GTFS-RT for vehicle positions.
Architecture
Database
Transit Planner uses PostgreSQL for its PostGIS extension.
Frontend
Transit Planner uses Next.js, TypeScript, and is styled with Tailwind.
CI/CD
CI runs the test suite and a route-data validator on every PR; deploys go through Vercel on push. Test builds are released at https://test.transitplanner.app/ for testing. Personally love this preview badge
.
Backend server: LLM Setup
Transit Planner uses Anthropic and Gemini APIs, allowing both as options to users. Dialog is streamed via SSE (FastAPI StreamingResponse), and the client renders tokens as they arrive.
Structured routes: tool schema
Free-form text is great for reasoning, but the map needs structured data like coordinates and stop order. After a council member's reasoning, it must emit a propose_route tool call. The vendor's tool-use layer validates it against inputSchema, as shown below.
Constraints like minItems/maxItems on stops and required fields keep generations in a band the renderer expects (e.g. 6–20 stops, hex colour, [lng, lat] pairs per stop).
Models
Ridership (gravity model):
where B is daily boardings at a stop, P the population within 800 m, h the headway in minutes, and m the mode factor (subway 1.5, LRT 1.2, streetcar 1.0, GO 0.6, bus 0.5).
Capital cost:
where L is the line length in km, N the number of stations, and rkm, rstn the per-km and per-station rates: subway $0.5B and $0.15B, LRT and streetcar $0.08B and $0.025B, bus $0.004B and $0.001B.
Evan chose to price stations separately because they drive a large share of real capital cost; per-km pricing alone rates a 6-stop and a 20-stop line of the same length identically.
Transit desert severity:
where ρ is the log-normalized population density (0 to 1), d the distance to the nearest stop in km, f = min(1, 30 / h) the frequency score, w the mode weight (subway and LRT 1.0, GO and streetcar 0.9, bus 0.85), and c = min(1.5, 1 + 0.1(n - 1)) a bonus for the n routes within 800 m.
I chose a 30-minute headway baseline because a 10-minute one made regular bus service score almost as badly as no transit, so the layer just mirrored population density.
Equity score (commuter simulation):
where wi is agent i's income weight (low 1.5, mid 1.0, high 0.5) times its transit dependence, and the numerator sums over agents with a workable transit commute.
Coverage:
where P(d ≤ 0.8 km) is the census population within 800 m of any stop. A block more than 1 km from every stop counts as a service gap.
Launch
The initial launch received 1.4K likes and positive feedback on X.

We also had the opportunity to demo at AI Tinkerers Toronto in the Shopify office.
More features
We're excited to develop this further. Here are some features we've added since:
Surface Route Accuracy
Initially, bus and streetcar routes floated from one point to another. I added automatic snapping to roads as well as portals to indicate underground sections that don't have to follow road medians.
Agentic Commuter Simulation
This mode dispatches hundreds of AI agents to act as commuters. Eventually, this will be a tool available to the transit council members.


More map overlays
Isochrone, Canada-wide population density, transit deserts, custom SHP/KML/KMZ uploads, GTFS live vehicle data, etc.
Next Steps
There are still a lot of features I'd like to explore with Transit Planner. To list a few:
- Data driven analysis of accessibility
- GTFS Realtime and visualization of moving vehicles
- Transit modelling features
- Support for more cities
- Different interaction methods to initiate the AI council, such as chatting or using points of strain from agentic simulation as a jumping off point
Conclusion
This project has introduced me to much of the small but active community of transit data and modelling professionals, from whom I have a lot to learn from.
I hope to make this project either useful professionally or as an educational tool or game for transit enthusiasts. If you have any feedback or suggestions, or would like to collaborate, please reach out!
Also big shoutout to Fiona, Evan, and Chris for building this with me.
The project is fully open source on GitHub. give it a star 🙏