Back to projects
Live Web App

Yak & Go Travel & Logistics

Next.js Travel Booking with a Node.js Microservice Backend

ReactNext.jsNode.jsExpressREST APITravel Tech
Itineraries Booked
600+trips
Booking Confirmation
<5sec
API Uptime
99.8%
Route Options
1K+generated

Modern travel booking and adventure transport platform enabling custom itinerary planning, real-time vehicle booking, and route scheduling. Pairs a Next.js storefront with a decoupled Node.js/Express REST API so each layer can scale and deploy independently.

Architecture & System Design

The Next.js frontend consumes a versioned REST API served by a Node.js/Express backend. An itinerary planning engine composes multi-leg routes and checks vehicle availability against a booking calendar before confirming a reservation.

Request Flow
Client Request (Next.js)
REST API (Express)
Itinerary Planning Engine
Vehicle Availability Check
Booking Confirmation
Route Scheduling
Notification Dispatch
  • Server-rendered Next.js frontend backed by an independently deployable Node/Express API
  • Composable itinerary engine that chains route segments across multi-stop trips
  • Booking calendar locks with short-lived holds preventing vehicle double-booking
  • Versioned REST contract allowing frontend and backend to ship independently

Engineering Challenges

Coordinating Multi-Leg Itinerary Planning

Problem

Trips often involved multiple route segments and vehicle changes, and a naive booking flow couldn't validate the whole itinerary atomically.

Solution

Built a composable itinerary engine that chains route segments and validates vehicle availability for each leg before confirming the full trip.

Result

Itinerary generation completes in under 2 seconds for multi-stop trips.

Preventing Vehicle Double-Booking

Problem

Concurrent booking requests for the same vehicle and date range risked confirming two overlapping trips.

Solution

Implemented booking calendar locks with short-lived reservation holds during the checkout window.

Result

Zero double-booked vehicles recorded across 600+ completed bookings.

Independent Frontend/Backend Deployment

Problem

Coupling the booking logic directly into the frontend made backend changes risky to ship without redeploying the whole app.

Solution

Designed a versioned REST API contract served by a standalone Node.js/Express service, consumed by the Next.js app through a typed API client.

Result

Backend and frontend now deploy independently without breaking changes.

Core Features

Itinerary Planning Engine

Composable multi-leg route planning validated against vehicle availability.

Clean Code

bookings.js — Express Route for Vehicle Reservation
1"color:#c792ea">const "color:#ffcb6b">express = require("">express");
2"color:#c792ea">const router = "color:#ffcb6b">express."color:#ffcb6b">Router();
3"color:#c792ea">const VehicleAvailability = require("../services/vehicleAvailability");
4
5router.post("/bookings", "color:#c792ea">async ("color:#ffcb6b">req, "color:#ffcb6b">res) => {
6 "color:#c792ea">const { vehicleId, startDate, endDate, itinerary } = "color:#ffcb6b">req.body;
7
8 "color:#c792ea">const available = "color:#c792ea">await VehicleAvailability.check(
9 vehicleId,
10 startDate,
11 endDate
12 );
13
14 "color:#c792ea">if (!available) {
15 "color:#c792ea">return "color:#ffcb6b">res
16 .status(409)
17 .json({ error: "Vehicle unavailable for selected dates" });
18 }
19
20 "color:#c792ea">const booking = "color:#c792ea">await VehicleAvailability.reserve({
21 vehicleId,
22 startDate,
23 endDate,
24 itinerary,
25 });
26
27 "color:#c792ea">return "color:#ffcb6b">res.status(201).json({ booking });
28});
29
30module.exports = router;