Menu

How We Built an 8-Language Static Booking Site That Loads in Under 1 Second
📰

How We Built an 8-Language Static Booking Site That Loads in Under 1 Second

DEV Community: react·Marrakech Transport·40 minutes ago
#mYwtMiTr
#devtoreact#devto#dev#static#pages
Reading 0:00
15s threshold

A private car transfer booking site doesn't sound like an interesting engineering problem until you try to serve it in eight languages and guarantee that no bad data ever reaches production. This is how we built navetteforyou.com , a Marrakech airport transfer site.

The stack: TanStack Router with file-based routing, React 19, Tailwind CSS v4, Vite, deployed on Vercel as a fully static site. 624 HTML pages generated at build time with Bun, zero runtime server. Eight languages: English, French, German, Spanish, Italian, Dutch, Portuguese, and Arabic (RTL).

File-Based Routing With Locale Context

TanStack Router's file-based routing gives us 18 route files -- pages like /prices , /fleet , /faq , and dynamic segments like /transfers/$slug and /guides/$slug . Each slug resolves against locale-specific content:

export const Route = createFileRoute ( "/guides/$slug" ) ( { loader : ( { params , context } ) => { if ( ! guideFor ( params . slug , context .…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.