RizTech Academy logo
RizTech Academy
Web AppOpen source

Appointment Booking Portal

Online booking for a multi-practitioner clinic: live availability, booking without an account, and a staff diary. Built so a slot can never be double-booked, even when people book at the same moment.

Web App Development, Backend & APIs, Testing & CI
Appointment Booking Portal — Web App case study

The problem

Booking looks simple until two patients click the same 10:00 slot at the same moment, a phone on a poor connection retries a request, or the clocks change. Most booking bugs live in exactly those cases, and they rarely show up in a demo.

How it’s built

PostgreSQL itself refuses overlapping bookings with an exclusion constraint, and writers queue on a per-practitioner lock, so losing a race returns an instant "taken" rather than a slow error. Bookings accept an idempotency key, so a retry returns the original instead of a duplicate. One pure scheduling module decides both which times to show and which to accept, built on wall-clock times so daylight-saving days are correct. Patients manage their booking through a signed link instead of an account.

What it does

  • Ten simultaneous requests for one slot: exactly one succeeds, nine are told it is taken
  • Retried requests return the original booking, never a duplicate
  • Daylight-saving-safe availability, shared by the booking page and the API
  • Booking and cancelling work without JavaScript; a staff diary behind sign-in
  • Unit, API and browser tests running in CI on every push

Learn to build software like this

The courses teach the same craft — from the basics to a real, running project.