Back to Projects

Deployed

My Trip

Flight and hotel booking platform focused on concurrency management, fast user experience, and scalable architecture

Next.js · TypeScript · Node.js · Express.js · MongoDB · Mongoose

Role

Architecture design and full-stack development

Duration

Personal project — under development and optimization

Tech Stack

Next.js · TypeScript · Node.js · Express.js · MongoDB · Mongoose

Overview

My Trip is a full-stack flight and hotel booking platform built with Next.js on the frontend and Express on the backend, focused on solving real-world booking system challenges such as concurrency, capacity management, and fast user experience.

01

Problem

Booking systems require precise concurrency management to prevent double bookings, while also handling pending reservation states and providing fast search and filtering experiences for users.

02

Approach & Technical Decisions

  1. Designing RESTful API with Express and modular structure (routes, controllers, services)

  2. Data modeling with Mongoose for User, Flight, Hotel, Booking, and Review

  3. Implementing authentication with JWT (access + refresh token)

  4. Managing booking states with pending, confirmed, and cancelled statuses

  5. Implementing automatic expiration for pending bookings (15 minutes)

  6. Using Next.js for improved performance and frontend routing

  7. Implementing advanced search and filtering system (by destination, date, price)

03

Challenges

Challenge 01

Preventing concurrent bookings (Race Condition)

Managing concurrency to prevent multiple users from booking the same seat or room, using conditional queries and designing towards atomic operations.

Challenge 02

Managing pending bookings and expiration

Implementing a mechanism for expiring half-completed bookings without cron jobs, using lazy cleanup on each request.

Challenge 03

Implementing optimized search and filtering

Designing a filter and search system for flight and hotel data while maintaining performance, reducing unnecessary re-renders, and improving user experience.

Challenge 04

Managing complex booking state

Controlling and keeping various booking states synchronized between client and server (pending, confirmed, expired) without creating inconsistencies.

Challenge 05

Database design for real-world scenarios

Modeling relationships between users, bookings, and resources (flights/hotels) in a scalable and extensible way.

04

Result

A full-stack booking system focused on solving real-world challenges like concurrency, capacity management, and fast search experience, providing a solid foundation for developing into a real large-scale service.