Interactive map explorer for FlixBus GTFS routes, built with React, TypeScript, Vite, and Leaflet.
- Browse routes on an interactive dark-themed map
- Search by city, station, and country
- Filter routes by selected city, station, or country
- Click routes/stops to inspect route paths and stop lists
- Regenerate map data from GTFS feeds
- React + TypeScript
- Vite
- Leaflet + react-leaflet
- PapaParse (GTFS CSV parsing)
- Node.js 18+
- npm
npm install
npm run devApp runs on: http://localhost:5175
npm run dev— start development servernpm run build— type-check and build production assetsnpm run preview— preview production build locallynpm run process:gtfs— parse GTFS feeds and regenerate route network JSON
The app loads network data from:
public/flixbus_network.json
In the project root, create these folders (already gitignored):
gtfs_eu/gtfs_us/gtfs_gb/
Each region folder must include:
stops.txtroutes.txttrips.txtstop_times.txt
npm run process:gtfsThis writes a new output file to:
public/flixbus_network.json
GTFS IDs are namespaced during processing to avoid collisions across regions:
- Stop IDs become
EU:<stop_id>,US:<stop_id>,GB:<stop_id> - Route IDs become
EU:<route_id>,US:<route_id>,GB:<route_id>
This prevents cross-region key/selection conflicts in the UI.
This repo ignores generated and local-only artifacts via .gitignore, including:
dist/node_modules/.vite//node_modules/.vite/gtfs_eu/,gtfs_us/,gtfs_gb/
Only source code and the generated public network file are tracked.
Check that each GTFS folder exists and contains all required .txt files.
After regenerating GTFS data:
- Restart
npm run dev - Hard refresh browser (Ctrl+F5)
Run:
npm install
npm run buildsrc/
components/
Map.tsx
Sidebar.tsx
App.tsx
main.tsx
index.css
public/
flixbus_network.json
process_gtfs.js
This was an experiment to see how much Github Copilot improved and how far I could take it. Almost all the code was written by agentic AI. Human author Duncan Harry Whyte.