A clinic website with real online booking, not just a "we'll call you back" form.
The patient selects a service, then a doctor, then a date — and sees only truly available times. Each step resets the following ones, so it’s impossible to choose a slot that is no longer available.
The most interesting part is that overlapping bookings are blocked by a unique index in the database, not by a check in the code. Two people physically cannot occupy the same slot, even if they click at the same time. A check in the code is unreliable here — a foreign request can come in between reading and writing.
There is an admin panel: schedule, doctors, services, requests. Access to data is restricted by row-level policies.
Stack: Next.js, TypeScript, Supabase (PostgreSQL), TailwindCSS. 12 pages, deployment on Vercel.
The patient selects a service, then a doctor, then a date — and sees only truly available times. Each step resets the following ones, so it’s impossible to choose a slot that is no longer available.
The most interesting part is that overlapping bookings are blocked by a unique index in the database, not by a check in the code. Two people physically cannot occupy the same slot, even if they click at the same time. A check in the code is unreliable here — a foreign request can come in between reading and writing.
There is an admin panel: schedule, doctors, services, requests. Access to data is restricted by row-level policies.
Stack: Next.js, TypeScript, Supabase (PostgreSQL), TailwindCSS. 12 pages, deployment on Vercel.