Skip to content
Than Nguyen Minh Khoavi (Tiếng Việt)

All projects

SpaceBooking

Workspace and resource booking system: a layered Spring Boot REST API that prevents double bookings under concurrent requests.

role=Course projectperiod=Aug 2024 – Oct 2025

Source codeLive demo

Abstract cover: a grid of room time slots with one slot highlighted

What it does

Users search for rooms by capacity, equipment and free time slot, then book them. Admins manage rooms and schedules. Bookings move through a validated lifecycle: pending, confirmed, cancelled and no-show. A scheduled job marks no-shows automatically.

How it is built

  • Layered REST API. Room, booking and schedule endpoints in Spring Boot, split into controller, service, repository and DTO layers.
  • Authentication and authorization. Spring Security with stateless JWT, BCrypt-hashed passwords and role-based access for users and admins.
  • Double-booking prevention. The time-overlap check and the save run in one transaction with optimistic locking (@Version). When two users book the same room and slot at the same moment, only one booking is saved; the other request gets 409 Conflict.
  • Query optimization. Room filtering with JPA Specification and pagination. The daily schedule used to run 1 + N queries; @EntityGraph brought it down to a single query.
  • Testing and delivery. JUnit 5 and Mockito, including parameterized tests for time-overlap edge cases, at over 80% line coverage measured with JaCoCo. Tests run on every push through GitHub Actions; the API is deployed with Docker on Render.
  • Front end. A simple Angular interface for login, room search and booking, deployed on Vercel.