Back to projects

Transactional booking

Movie Ticket Booking App

A transactional booking flow for listings, showtimes, seats, and authenticated users.

  • Spring Boot
  • PostgreSQL
  • Next.js
  • JWT
Movie ticket booking interface

The problem

A ticket-booking system must connect movie discovery, showtime selection, authentication, and seat reservation without leaving booking data in a partial state.

The approach

The Next.js client drives the booking flow while Spring Boot owns authentication and booking rules. PostgreSQL transactions protect multi-step persistence during ticket creation.

System flow

System flow: Next.js client to JWT authentication to Spring Boot API to PostgreSQL.

Engineering decisions

Protect booking writes with transactions

The database transaction boundary keeps related booking changes together instead of committing a partial reservation.

Use token-based authentication

JWT authentication gives the frontend a defined way to access protected booking operations.

Keep booking rules on the server

Seat and ticket operations are enforced by the Spring Boot API rather than relying on client state.

Challenges and tradeoffs

  • Coordinating seat selection with the final booking write.
  • Keeping the multi-step flow understandable while preserving server authority.