Overview
It started with one awkward evening in Aachen. I was driving home, and my girlfriend had to get somewhere else by train. Drop her at the nearest station and she might just miss a train and wait an hour; drive her further and I’m home late. Every option meant juggling a route planner, a train app and the clock, while driving.
Dubble does that juggling. Tell it where the driver goes and where each passenger needs to be, and it tries every station along the way, every departure time and the real, live timetables, then shows the few plans that are actually good: who gets out where, when to leave, how many changes, and what it costs. It works for 1 to 4 passengers, for dropping people off and for picking them up, to any address. Once a plan is chosen, it follows the trip live for the driver and for every passenger.
The live demo is open to anyone: plan any trip in Belgium and around, up to 5 plans an hour. Alerts with the phone locked and live sharing with passengers are part of the full version, which I share with friends through an invite link.
Key features
- Every combination, in seconds: every station within the driver’s detour limit, in route order, on a grid of departure times (“leave as late as still works”), scored on everyone’s arrival, relaxed connections, risk and price
- Clear choices: the same arrangement at different times becomes one card with time chips, and a timeline shows car, train, bus and waiting time for everyone on one axis; sort by recommended, everyone there first, driver first, cheapest or fewest changes
- Honest prices: the price on a plan is the passengers’ tickets; the driver’s extra fuel is shown separately, with a button to each operator’s ticket shop
- Live trip: a countdown, Waze and Google Maps buttons, live train delays, and an automatic re-plan when a connection is lost
- Passenger links: each passenger gets a WhatsApp-able link with only their part of the trip, the car’s live position on pick-ups, and one-tap updates back to the driver (“I’m at the pick-up point”)
- Everyone knows what’s going on: on a pick-up round, each waiting passenger sees who’s already in the car and who’s next (”✓ Margot picked up · Next: you”), and gets an alert even with their phone locked: “Benjamin picked up Margot, now on the way to you, ETA 15:57”, running later or earlier, and “almost there”
- Stops tick off by themselves: when the car waits at a stop and then drives on, Dubble marks that person as picked up or dropped off, with an Undo in case it guessed wrong
- Alerts with the phone locked: “leave in 10 minutes”, every stop, and delays, cancellations and platform changes of the trains that matter
- Late-evening safety net: plans that rely on the last train of the night show a backup (the extra drive, or a rough taxi price)
- Installable and offline: adds to the home screen on iPhone and Android, and the trip screen and passenger links still open without a connection
How a plan is made
- Corridor: all stations within the driver’s detour limit, with exact drive times
- Shortlist: the most promising stations per passenger, big hubs always included
- Drive matrix: drive times between everyone and every station, with live traffic
- Timetables: about 40 live timetable searches for a two-passenger trip, most promising first
- Optimise: every combination of stops, simulated on a grid of departure times and scored
- Refine: the best plans are re-timed with live traffic per stretch between stops, then grouped per arrangement
The first three steps run on the server. The timetable searches and the optimisation run on the phone itself, using the same planning code (more on why below).
Data & architecture
Everything runs on open data: Transitous (MOTIS) for timetables and real-time delays across Europe, OSRM for driving times, iRail for SNCB disruptions, OpenFreeMap for the map, and TomTom for live traffic. The app is a Next.js / React / TypeScript progressive web app on Vercel, with Upstash Redis for live location sharing and resumable plans, QStash and Web Push for alerts, and MapLibre GL for the map.
Passenger links carry their part of the plan inside the link itself, so no trip data has to live in a database. Friends get full access through an invite link; everyone else gets a public demo on its own, smaller budget (5 plans an hour per visitor, 100 a day in total), so visitors can never use up what friends rely on. On top of that: fair-use limits per connection and per day, keys that stay on the server, and strict security headers.
UI design
Taxi orange for the car, teal for trains and blue for buses, used the same way on the map, the timelines and the cards. The layout is a map on top and one calm panel below, so the important thing (when to leave, where to stop) is always the biggest text on screen. Plans are explained with a timeline instead of tables, and an animated “planning your trip” story keeps the wait from feeling stuck. It follows the phone’s light or dark mode.
Challenges
- Being throttled: the timetable service limits searches per internet address, and the hosting servers share theirs with many other apps, so a two-passenger plan took about 45 seconds online. I split planning in two: the server prepares the trip, and each phone does the timetable searches with its own allowance. Plans now take about 10 seconds, and the server still plans if a phone can’t reach the service
- Proving it’s right: a validation script plans random real trips and checks every suggestion: the time arithmetic, an independent car route, every SNCB train against iRail, live status, prices, and whether a much wider search finds anything better
- Phones fall asleep: locking the phone mid-plan killed the request. Plans are now resumable, and the app picks up the finished plan when it’s opened again
- Alerts with the app closed: Web Push combined with a scheduler, so timed reminders and train watching work even when the app isn’t open, without showing the same alert twice
- Live location on a phone: a web app can’t use the location in the background on an iPhone. Instead of pretending it can, the driver’s screen says plainly when the location is being shared and with whom, keeps the screen on while driving, and the passenger’s page shows “last seen” with the time when updates stop
- Errors I’d never see: every unexpected error is filed automatically as an issue with what’s needed to reproduce it, which caught a real timeout in the first hours online
What I learned
- Turning a personal itch into a product: talking through real trips, then cutting until each screen answers one question
- Working with live public transport and traffic data, and their limits (rate limits, missing real-time feeds, fares nobody publishes)
- Designing an optimisation that is fast enough for a phone yet checked against reality, instead of trusting the model
- Shipping a web app like a mobile app: installable, offline, push alerts, and a phone that can fall asleep at any moment
- Building with an AI pair programmer: I set the product direction, the design and every decision and tested on real trips, while Claude Code wrote the code in short, tested cycles that I reviewed and merged