I built a trip planner for concerts in France. Here's what 12 transport and event APIs taught me
Going to a concert in another city usually means six tabs: the ticket, the train, the hotel, a map, and a spreadsheet to add it all up.
Bundle Events puts that into one flow. You pick where you leave from and the event. You get the outbound and return trip (train, bus, car or plane), a hotel near the venue, the total price, and pre-filled booking links. The trip lives at a shareable URL. The site is in French and covers France.
The stack is Next.js 16 (App Router), React 19, TypeScript, Tailwind 4 and Supabase, with MapLibre and OpenFreeMap for the maps. The interesting part is not the stack. It is gluing together a dozen public APIs that were never meant to work together. Here are three things that broke and how we fixed them.
1. The SNCF API changed its format overnight
Train times come from the SNCF Navitia API. On 24 November 2026 its format changed:
- stop area ids no longer carry the station's UIC code;
- high-speed trains report a
commercial_modeof plain "Train", and only thephysical_modelink says it is long distance; - the train number moved to
trip_short_name, andheadsignnow holds the destination; - an unpriced journey returns
fare.found: falsewith a total of "0.0".
The last one is the dangerous one: without a check, the app shows a 0 € train. We now read the UIC codes from the SNCF open data station list, match main stations by name, and treat found: false as "price unknown". The lesson: wrap every provider in an adapter that maps its payload to your own types, so a format change is fixed in one file.
2. No plane when a train takes less than 2h30
France bans domestic flights on routes where a train makes the trip in under 2h30. We do not hard-code a list of routes. When the router finds a rail link under 2h30 between the two cities, it drops the plane option. The trip also offers "fastest", "cheapest" and "greenest" picks, with CO2 per option.
Drawing the train on the map is its own problem. We ask OpenRailRouting for the rail geometry. It answers 403 to Node's default user agent, so every call now sends a named User-Agent. Some stations also fail on one routing profile and work on another, so we try the profiles in turn and only cache a result that follows the rails.
3. Autosave that lost the user's last click
Every change to a trip is autosaved with a debounced PATCH. In testing, "I booked this" vanished after a reload. The cause was two races:
- When the database answered slowly, an older save could land after a newer one and overwrite it.
- A reload read the trip before the last save had landed, then autosaved that old state again.
The fix has two parts. Each save carries an increasing savedAt stamp, and the server only writes it if the stored trip is older. With Supabase, that is a filter on the JSON column:
let update = supabase.from("bundles").update({ data }).eq("uuid", uuid); if (savedAt) update = update.or(`data->>savedAt.is.null,data->>savedAt.lt.${savedAt}`); A stale save gets { ok: true, stale: true } and writes nothing. Then, until the server confirms a save, a copy stays in sessionStorage. On load, if that copy is newer than the database, the page restores it and sends it again.
What I'd like from you
The site is live and free, no account needed. If you have a concert, match or festival coming up in France, try it and tell me in the comments:
- Which trip looked wrong (time, price, route)?
- Where did you get stuck?
- What would make you use it for real?
- What do you like/dislike about the site, or what else would you like to see on it?
👉 https://bundleevent.me/?utm_source=devto&utm_medium=article&utm_campaign=retours
Happy to go deeper on any of these: the rail routing, the API caching, or the trip snapshot model.