Transit Planner

Web App, 2026

🥇 This project was awarded at Hack Canada 2026

Try it out!

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.

Architecture

Database

Transit Planner uses PostgreSQL for its PostGIS extension.

Frontend

Transit Planner uses Next.js, TypeScript, and is styled with Tailwind.

CI/CD

Test builds are released at https://test.transitplanner.app/ for testing. Personally love this preview badge.

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).

const PROPOSE_ROUTE_TOOL: ToolDefinition = {
  name: "propose_route",
  description: "Submit the proposed subway route after your written analysis.",
  inputSchema: {
    type: "object",
    properties: {
      name:  { type: "string" },
      type:  { type: "string", enum: ["subway"] },
      color: { type: "string", description: "Hex colour, e.g. #2563eb" },
      stops: {
        type: "array",
        minItems: 6,
        maxItems: 20,
        items: {
          type: "object",
          properties: {
            name:   { type: "string" },
            coords: { type: "array", items: { type: "number" }, minItems: 2 },
          },
          required: ["name", "coords"],
        },
      },
    },
    required: ["name", "type", "color", "stops"],
  },
};

Launch

The initial launch received 1.4K likes and positive feedback on X.

Transit Planner Launch Tweet by Fiona Fang

We also had the opportunity to demo at AI Tinkerers Toronto in the Shopify office.

Transit Planner Presentation at AI Tinkerers Toronto, Shopify. Shoutout to Amanda Xi for the photo.

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
  • Graph-based, non-deterministic council debating
  • 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 🙏