A Train Map That Broke the Internet

Developer Benjamin Td built Chronotrains as a spontaneous side project: an interactive map of European rail travel times. He deployed it on Vercel with Next.js, then left for vacation. When he returned, the site had surpassed one million visits.

The project made the front page of Hacker News, was shared widely on Twitter, and drew commentary from politicians and newspapers across Europe. The discussions touched on infrastructure, public transport policy, and rail service quality—in several languages at once. Yet for Benjamin, the more remarkable detail was that the application never required his attention during the traffic surge.

"I posted Chronotrains and went on vacation. By the time I came back, there were more than a million visits. The site was quoted by politicians and newspapers. It started debates about infrastructure, public policy, green transportation, and rail service quality in many different languages. I never had to think about load or response times."

What Chronotrains Actually Does

Chronotrains shows how far a traveler can get from any European train station within one to five hours. The data behind it starts as geometry: before the app ever runs, scripts compute possible journeys between pairings of stations, building a graph of connections at each duration threshold. Those pre-computed geometries are stored in a PostgreSQL database hosted with Supabase.

At runtime, moving the mouse over a station triggers a network request to fetch the associated isochrone geometry. These requests are handled by Next.js API Routes deployed as Vercel Functions. Benjamin used straightforward caching for the results on Vercel's Edge Network, keeping the interaction smooth even with a large concurrent audience. Each geometry represents a different travel-time envelope, adding up to a lot of possible route permutations to visualize.

Visualizing different train route permutations with Chronotrains.

Keeping the Database Quiet

The architecture leans on Incremental Static Regeneration to shield the PostgreSQL database from the weight of thousands of simultaneous visitors. With this setup, the app never fired more than one request per station per day. Benjamin could update the underlying data without concerning himself with frontend scaling.

"I've been a Vercel user for years and really love the platform. Vercel makes it easy for me to start new projects and scale them with ease. This helps me validate ideas quickly."

The full codebase is now public on GitHub. Benjamin continues to post his development work on Twitter, and the live demo remains available for anyone who wants to explore Europe by rail—no load testing required.