How We Built an 8-Language Static Booking Site That Loads in Under 1 Second
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 navettef
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.locale)) throw notFound();
return null;
},
});
English is unprefixed (/guides/marrakech-airport-arrivals), every other locale gets a prefix (/fr/guides/...). Eighteen route files times eight locales gives us 624 static HTML pages at build time.
The Entity Graph: JSON-LD as a Connected System
Most sites bolt on structured data as an afterthought -- one schema blob per page, unconnected. We took a different approach: every page references nodes in a shared entity graph, connected by @id references. The operator node is shared across two domains. The interconnected graph means answer engines (Google AI Overviews, Bing Copilot, Perplexity) can resolve "who operates this" without leaving the site's structured data.
The Static Price Check Gate
Before every deploy, a script scans all 624 built HTML pages, their embedded JSON-LD, the llms.txt file, and entity.json -- running 17,113 assertions. No amount under a floor price, no price on quote-only routes, no JSON-LD Offer under the floor. The regex handles Western digits, Arabic-Indic digits, and any thousands separator style. If any assertion fails, exit code 1, deploy blocked.
IndexNow and Arabic RTL
After every deploy, a script pings all 624 URLs to IndexNow (Bing, Yandex, Seznam, Naver). Supporting Arabic flips the entire layout. Performance is a side effect of static -- sub-second loads, near-perfect Lighthouse scores.
Wrapping Up
The interesting parts weren't the React components -- they were the systems around the site: a locale completeness gate, a 17,113-assertion price check, an interconnected entity graph, and a pipeline that turns 18 route files into 624 static pages. If you're building a multilingual static site, invest in the gates.
If you're ever in Marrakech and need a ride from the airport, that's what the site is for: navetteforyou.com
Originally published by Dev.to WebDev. Aggregated on AIWithGhost for educational purposes — full credit and traffic to the original publisher.