The Flight Booking Management System (FBMS) is a distributed, microservices and event-driven-based airline reservation platform designed to replicate real-world flight booking workflows with a strong focus on scalability, consistency, and fault tolerance.
The system enables passengers to seamlessly:
- 🔍 Search flights based on source, destination, and travel date
- 🎟️ Select seats using a real-time seat map
- 📖 Create and manage bookings
- 💳 Complete secure payment transactions
- 📩 Receive instant booking confirmations and notifications
In real-world booking systems, challenges such as concurrent seat selection, payment failures, and system scalability can lead to inconsistent data (e.g., double booking).
FBMS addresses these challenges by implementing:
- 🔒 Seat Locking Mechanism to prevent double booking
- 🔄 Booking Lifecycle Management for controlled state transitions
- ⚡ Event-Driven Communication (Kafka) for asynchronous processing
- 🔐 JWT Authentication for secure and stateless interactions
The system supports both Passenger Operations and Admin Operations, ensuring complete control over flight inventory and booking workflows.
- Admin logs in with privileged access
- Admin can:
✈️ Add new aircrafts (seat configuration, capacity)- 🛫 Create flights and schedules
- 🛠️ Update or delete flights (CRUD operations)
- When a flight is created:
- Aircraft is mapped to the flight
- Seat map is generated dynamically
- These flights become immediately available in the system
- Users can search and view these flights in real-time
💡 Admin acts as the source of flight inventory data
- User registers / logs in
- Searches for available flights
- System fetches data from Flight Inventory Service
- User selects a flight and views seat map
- User selects seat → initiates booking
-
Booking Service creates booking (
REQUESTED) -
Booking Service calls Flight Inventory → reserve seat
-
Flight Inventory:
- If AVAILABLE → mark RESERVED
- Else → reject request
-
Payment Service processes transaction
- Payment successful →
- Booking →
CONFIRMED - Seat →
OCCUPIED - Event published (
BookingConfirmedEvent)
- Notification Service:
- Sends Email/SMS confirmation
- Payment fails →
- Booking →
CANCELLED - Seat → RELEASED
- Booking →
- Admin can continuously:
- Add/update flights
- Manage aircrafts
- Users always see latest available flights and seats
- Kafka ensures background processes (notifications) do not block user flow
The system ensures:
- 🔒 Consistent seat handling
- 🔄 Controlled booking lifecycle
- ⚡ Real-time flight availability
- 🧩 Clear separation between Admin and User responsibilities
The system is built using:
-
Microservices Architecture (MSA)
Each domain (User, Flight, Booking, Payment, Notification) is implemented as an independent service. -
Domain-Driven Design (DDD)
Business logic is divided into bounded contexts ensuring clear separation of concerns. -
Event-Driven Architecture (EDA)
Kafka is used for asynchronous communication, enabling loose coupling and high scalability. -
API Gateway Pattern
A centralized gateway handles routing, authentication, and request filtering. -
Service Discovery (Eureka)
Enables dynamic service registration and load balancing.
graph TD
Client --> Gateway(API Gateway)
Gateway --> UserService
Gateway --> FlightInventoryService
Gateway --> BookingService
Gateway --> PaymentService
Gateway --> NotificationService
subgraph Infrastructure
Eureka
Kafka
PostgreSQL
end
BookingService --> FlightInventoryService
BookingService --> PaymentService
BookingService --> Kafka
Kafka --> NotificationService
This project is fully containerized using Docker and Docker Compose, enabling all microservices and infrastructure components to run together seamlessly.
Make sure the following are installed on your system:
- Docker
- Docker Compose
Verify installation:
docker --version
docker compose versionFrom the project root directory, run:
docker compose up -d --buildThis command will:
- Build all microservices
- Start containers in detached mode
- Create required Docker networks
- Launch infrastructure services automatically
| Service | URL |
|---|---|
| Eureka Dashboard | http://localhost:8761 |
| Kafka UI | http://localhost:9090 |
| Frontend Application | http://localhost:3000 |
| PostgreSQL | localhost:5432 |
To stop all running containers:
docker compose downTo remove volumes as well:
docker compose down -vIf changes are made to services:
docker compose up -d --buildThe system includes containerized versions of:
- API Gateway
- Eureka Discovery Server
- User Service
- Flight Inventory Service
- Booking Service
- Payment Service
- Notification Service
- Kafka + Zookeeper
- PostgreSQL
- Frontend (React + TypeScript)
- Service Discovery using Eureka
- Inter-service communication
- Kafka-based event processing
- JWT authentication
- Real-time booking workflow
- Persistent PostgreSQL storage
- Full microservices orchestration