Spring Boot web app for managing airline bookings.
- User, Plane, Airport, Flight management
- Client and Employee management (linked to users)
- Flight search by city and date
- Booking system with seat validation
- Miles reward system (discount code after 3 flights per year)
- Backend: Spring Boot 3.2.0, Spring Data JPA
- Frontend: JavaScript, HTML, CSS
- Database: H2
- Build: Maven
- Build:
mvn clean install - Run:
mvn spring-boot:runorjava -jar target/airline-booking-system-1.0.0.jar - Open:
http://localhost:8080
Database is created automatically in ./data/airline.mv.db by Hibernate.
GET /api/users- Get all usersGET /api/users/{id}- Get user by IDPOST /api/users- Create userPUT /api/users/{id}- Update userDELETE /api/users/{id}- Delete user
GET /api/planes- Get all planesGET /api/planes/{id}- Get plane by IDPOST /api/planes- Create planePUT /api/planes/{id}- Update planeDELETE /api/planes/{id}- Delete plane
GET /api/airports- Get all airportsGET /api/airports/{id}- Get airport by IDPOST /api/airports- Create airportPUT /api/airports/{id}- Update airportDELETE /api/airports/{id}- Delete airport
GET /api/flights- Get all flightsGET /api/flights/{flightNumber}- Get flight by numberPOST /api/flights- Create flightPUT /api/flights/{flightNumber}- Update flightDELETE /api/flights/{flightNumber}- Delete flight
GET /api/clients- Get all clientsGET /api/clients/{numPassport}- Get client by passportPOST /api/clients- Create clientPUT /api/clients/{numPassport}- Update clientDELETE /api/clients/{numPassport}- Delete client
GET /api/employees- Get all employeesGET /api/employees/{numEmp}- Get employee by numberPOST /api/employees- Create employeePUT /api/employees/{numEmp}- Update employeeDELETE /api/employees/{numEmp}- Delete employee
GET /api/search/flights?departureCity={city}&arrivalCity={city}&departureDate={date}- Search flights
POST /api/bookings- Create bookingGET /api/bookings/{id}- Get booking by IDDELETE /api/bookings/{id}- Delete bookingGET /api/bookings/available-seats/{flightNumber}- Get available seats
- User: Basic user info (id, firstname, lastname, address, email, phone, birthdate)
- Client: User + passport number
- Employee: User + employee number, profession, title
- Plane: Brand, model, manufacturing year
- Airport: Name, country, city
- Flight: Flight details with pricing for different seat classes
- Book: Booking records
- MilesReward: Tracks client flight history
- Bookings only allowed if seats are available
- Discount code generated after 3 flights in same year
- Cascade deletes handle related data cleanup