https://github.com/debuggerdragon311/airline-reservation-system
A concurrent flight booking system with seat locking, booking lifecycle management, and admin controls — built with Spring Boot and PostgreSQL.
https://github.com/debuggerdragon311/airline-reservation-system
airline-reservation backend booking-system concurrent-programming docker hibernate java jpa jwt-authentication maven postgresql react rest-api spring-boot swagger
Last synced: 4 days ago
JSON representation
A concurrent flight booking system with seat locking, booking lifecycle management, and admin controls — built with Spring Boot and PostgreSQL.
- Host: GitHub
- URL: https://github.com/debuggerdragon311/airline-reservation-system
- Owner: debuggerdragon311
- License: apache-2.0
- Created: 2026-05-29T05:12:49.000Z (20 days ago)
- Default Branch: main
- Last Pushed: 2026-06-07T16:00:36.000Z (11 days ago)
- Last Synced: 2026-06-07T17:24:50.673Z (11 days ago)
- Topics: airline-reservation, backend, booking-system, concurrent-programming, docker, hibernate, java, jpa, jwt-authentication, maven, postgresql, react, rest-api, spring-boot, swagger
- Language: JavaScript
- Homepage:
- Size: 3.66 MB
- Stars: 4
- Watchers: 0
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# ✈ AEROBOOK
**A concurrent flight reservation platform built for reliability.**
[](https://openjdk.org/projects/jdk/21/)
[](https://spring.io/projects/spring-boot)
[](https://www.postgresql.org/)
[](https://react.dev/)
[](https://www.docker.com/)
[]()
[](LICENSE)
---
> **Work in progress.** Repo is freshly set up — architecture is locked, active development starting now. This document reflects the intended design.
---
## What We're Building
AeroBook is a backend-first flight reservation system that tackles real concurrency and state-management problems: race conditions on seat booking, booking lifecycle transitions, overbooking logic, and JWT-secured role-based access — all through a clean REST API.
This is not a CRUD tutorial. It's modelled on how real airline backends are structured.
---
## Planned Features
**Booking Engine**
- Concurrent seat booking with optimistic locking (no double-booking under load)
- Booking lifecycle: `PENDING → CONFIRMED → CHECKED_IN → CANCELLED`
- Overbooking support (~5–10% oversell, configurable per flight)
- Price tiers based on booking window
**Flight Management**
- Search by origin, destination, date, class, and stops
- Flight state machine: `SCHEDULED → BOARDING → DEPARTED → LANDED → CANCELLED`
- Seat map (rows A–F, Economy / Business)
**Auth & Access**
- JWT authentication with refresh token support
- Role-based access: `PASSENGER` and `ADMIN`
- Secure endpoints via Spring Security
---
## Tech Stack
| Layer | Technology |
|---|-----------------------------|
| Backend | Java 25, Spring Boot 4 |
| Database | PostgreSQL 16 |
| ORM | Spring Data JPA / Hibernate |
| Auth | Spring Security + JWT |
| Frontend | React (Vite) |
| API Docs | Swagger / OpenAPI 4 |
| Build | Maven |
| Infrastructure | Docker, Docker Compose |
---
## Planned API
| Method | Endpoint | Description |
|---|---|---|
| `GET` | `/flights/search` | Search flights by route and date |
| `POST` | `/auth/register` | Create a passenger account |
| `POST` | `/auth/login` | Authenticate and receive JWT |
| `POST` | `/bookings` | Book a seat on a flight |
| `GET` | `/bookings/{id}` | Retrieve booking details |
| `DELETE` | `/bookings/{id}` | Cancel a booking |
| `PATCH` | `/admin/flights/{id}/status` | Update flight status (admin) |
Full spec will live in [`docs/API.md`](docs/API.md) once scaffolding is done.
---
## Project Structure
```
airline-reservation/
├── backend/
│ └── src/main/java/com/airline/
│ ├── controller/ # REST endpoints
│ ├── service/ # Business logic
│ ├── repository/ # JPA repositories
│ ├── model/ # Entities: Flight, Booking, Passenger, Seat
│ ├── dto/ # Request / Response DTOs
│ └── config/ # Security, Swagger
├── frontend/ # React (Vite) app
├── docs/
│ ├── ER-diagram.png
│ └── API.md
├── docker-compose.yml
└── README.md
```
---
## Team
| Track | Scope |
|---|---|
| **Backend — Data** | Schema design, JPA entities, seed data, repositories |
| **Backend — API** | Controllers, services, seat locking, auth endpoints |
| **Frontend / Admin** | React booking flow, admin panel, Swagger validation |
---
## Getting Started (once scaffolding is up)
```bash
git clone https://github.com/your-org/airline-reservation-system.git
cd airline-reservation-system
docker-compose up -d
```
Setup instructions will be expanded as the project progresses.
---
## License
Apache 2.0 — see [`LICENSE`](LICENSE) for details.