Back to engineering work

Case study · iSeatz

Server-side data loading for booking and checkout

Fetching and coordinating checkout data on the server so booking pages arrive ready, and hydrating client state from it.

  • Next.js
  • React
  • TypeScript
  • Node.js
  • SWR

Problem

Booking and checkout pages depend on several backend responses before they are useful. Loading them in the browser after the page arrives means request waterfalls, more loading states and duplicate calls.

Context

Part of the Next.js white-label platform, serving checkout for flights, hotels and cars across several enterprise brands.

Constraints

  • Server-rendered output and client state must agree after hydration, or the page flickers or refetches.
  • Personal and payment data must not leak into logs or client-side persistence.

Technical approach

  • Fetch checkout data on the server, coordinating the API requests a page needs before rendering it.
  • Initialize client application state from the server results, so the browser hydrates with the data already present instead of requesting it again.

My contribution

Implemented the server-side data fetching, request coordination and state initialization for booking and checkout.

Written from my own work. Proprietary code, internal system names and confidential business details are left out.

Next case study: A typed API layer with consistent error handling