Yak & Go Travel & Logistics
Next.js Travel Booking with a Node.js Microservice Backend
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.
- 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
Trips often involved multiple route segments and vehicle changes, and a naive booking flow couldn't validate the whole itinerary atomically.
Built a composable itinerary engine that chains route segments and validates vehicle availability for each leg before confirming the full trip.
Itinerary generation completes in under 2 seconds for multi-stop trips.
Preventing Vehicle Double-Booking
Concurrent booking requests for the same vehicle and date range risked confirming two overlapping trips.
Implemented booking calendar locks with short-lived reservation holds during the checkout window.
Zero double-booked vehicles recorded across 600+ completed bookings.
Independent Frontend/Backend Deployment
Coupling the booking logic directly into the frontend made backend changes risky to ship without redeploying the whole app.
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.
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
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");45router.post("/bookings", "color:#c792ea">async ("color:#ffcb6b">req, "color:#ffcb6b">res) => {6 "color:#c792ea">const { vehicleId, startDate, endDate, itinerary } = "color:#ffcb6b">req.body;78 "color:#c792ea">const available = "color:#c792ea">await VehicleAvailability.check(9 vehicleId,10 startDate,11 endDate12 );1314 "color:#c792ea">if (!available) {15 "color:#c792ea">return "color:#ffcb6b">res16 .status(409)17 .json({ error: "Vehicle unavailable for selected dates" });18 }1920 "color:#c792ea">const booking = "color:#c792ea">await VehicleAvailability.reserve({21 vehicleId,22 startDate,23 endDate,24 itinerary,25 });2627 "color:#c792ea">return "color:#ffcb6b">res.status(201).json({ booking });28});2930module.exports = router;