AI booking agent — calendar, availability & payments in one flow. Built for Pondicherry with Supabase, Google Calendar & Razorpay.
Open Live Website →Goal: let visitors book a session without double-booking, with real calendar blocking and instant payment.
Visitor
│
├─► Frontend (Vercel)
│ booking form + calendar UI
│ shows price, validates email/phone
│
├─► Availability check
│ Edge Function: bookingslots
│ merges in order:
│ 1) booked sessions from database
│ 2) events from Google Calendar (free/busy)
│ 3) rules → 09:00–20:00 IST, 30-min slots, Thursday off
│ returns only free slots
│
├─► Booking
│ Edge Function: booking-create
│ re-validates + atomic lock
│ → guarantees no two people grab same slot
│ → creates PENDING hold (15 min)
│
└─► Payment
Razorpay order → checkout → verify
PENDING → PAID (or auto-released if not paid)
paid slots then block future availability
Frontend never holds secrets — all calendar & payment keys stay server-side. Same rules run in frontend & backend so UI and database always agree.