Home / Companies / Railway / Blog / Post Details
Content Deep Dive

Moving Railway's Frontend Off Next.js

Blog post from Railway

Post Details
Company
Date Published
Author
Victor Ramirez
Word Count
1,059
Language
-
Hacker News Points
-
Summary

Railway transitioned its entire production frontend from Next.js to Vite and TanStack Router, achieving zero downtime during the migration. The decision to move away from Next.js arose due to prolonged build times and the framework's server-first approach, which didn't align with Railway's client-driven product needs. Vite and TanStack provided a client-first, fast-to-iterate stack with benefits such as type-safe routing, first-class layouts, and a quick feedback cycle. The migration was executed in two pull requests: the first removed dependencies on Next.js, and the second implemented the new framework, converting over 200 routes and consolidating configurations. While the transition involved trade-offs, like replacing built-in image optimization and ecosystem tools with custom solutions, the improved iteration speed and efficient asset management have significantly enhanced Railway's deployment process. The new setup, optimized for rapid iteration, positions Railway to deliver frontend changes almost instantaneously, aligning with their vision for an efficient and seamless user experience.