Calendar conflicts, time zones, and double-booking: the parts you cannot fake
Booking apps look simple. They are not. The bugs that kill them are all in the parts most prompt-to-app tools skip:
Conflict detection has to be transactional. Two users hitting "book the 3 PM slot" at the same time will both get success unless your booking insert is wrapped in a transaction that locks the slot row first. Webtwizz scaffolds the slot reservation as a Supabase transaction with row-level locking. A naive AI builder will give you a check-then-insert race condition that breaks under any real load.
Time zones are everywhere. Store all slots in UTC. Convert to the user's local zone on display only. Store the user's IANA timezone (America/New_York, not "EST") so DST transitions work. Never use the browser's getTimezoneOffset for storage, it changes twice a year.
Double-booking from external calendars. If your provider syncs their Google Calendar, you need a webhook that watches for new events on their calendar and marks those slots unavailable. Otherwise the customer books a slot the provider already gave away in their personal calendar. Webtwizz scaffolds the Google Calendar push-subscription pattern correctly; it's three different APIs to get right.
Cancellation windows. "No cancellations within 24 hours" needs to be enforced server-side based on the slot's UTC time, not the user's clock. Easy to miss; expensive when missed.
