Software Design

Designing a Reliable Hotel Room Booking State Machine

State Diagrams · made in Skemio

State diagram showing hotel room states: Available to Held, transitioning to Booked, Occupied, Cleaning, and returning to Available, with an exit to final.
State diagram showing hotel room states: Available to Held, transitioning to Booked, Occupied, Cleaning, and returning to Available, with an exit to final.

What it shows

  • Temporary holds lock inventory for 10-15 mins during checkout.
  • Payment confirmation transitions held rooms to booked instantly.
  • Post-checkout cleaning resets rooms back to available inventory.

The takeaway

Strict state transitions with TTLs eliminate double-booking in busy systems.

More state diagrams