The booking form: save, check, protect

About 2 hoursYou need: your project in Cursor with npm run dev running, the Cloudflare MCP connected, the Cloudflare, Vercel and Supabase dashboards, your password manager, your phone, and adjoas-kitchen (to copy three proven files)
This video is in the full courseGet the course to watch every video and read every lesson in full. GHS 399, paid once.Get the course · GHS 399
Video · 17:09
Goal

Make the booking form save real requests to Supabase through a Server Action that checks every field on the server (including the date, in the business's time zone), put a Cloudflare Turnstile widget in front of it, and prove that sneaky visitors and bots are refused, on your laptop and on the live site.

Why this matters

This is the front door of the business. Every real customer will come through it, and so will every bot that finds the site. In Adjoa's Kitchen it took you three lessons to build this door properly: saving with a Server Action (7.6), checking every field (10.4) and Turnstile (10.6). Here you do all three in one sitting, because you've already built and tested the parts.

The order matters, and it's the same order you used for Adjoa:

The booking chain: form, server checks, Turnstile, database insert, success. Cheap checks first, Cloudflare second, database last. 1 Phone: BookingForm (browser) 2 Server Action requestBooking 3 verifyTurnstile (lib/turnstile.ts) → Cloudflare siteverify 4 Supabase Supabase insert 5 Success the slip is filled in; a Turnstile tick is added the clerk's checklist name 2–80 ✓ phone ✓ email (optional) ✓ service is a real active slug ✓ date: tomorrow to 60 days, not Monday (Africa/Accra) ✓ time is one of the slots ✓ notes ≤ 300 ✓ any ✗ → friendly message, nothing saved “human?” ✗ → ‘Please complete the security check’ the bouncer checks the grant and policy (the side door from 11.4) ‘Thank you, Efua. Your request is in.’ Emails (Lesson 11.6) Cheap checks first, Cloudflare second, database last. Fail closed at every step.
  1. Field checks first. They cost nothing and catch most mistakes.
  2. Turnstile second. It asks Cloudflare whether this was a person. If the answer isn't a clear yes, the door stays shut (fail closed, Lesson 10.6).
  3. Save last, with the database's own rules as a final check.

In the full lesson

  1. The idea in plain English
  2. Do it
  3. Check it worked
  4. Understand what AI wrote
  5. Quick check
  6. What you can do now
Stage 2 · Make it workYou’ve seen the why. The how is in the course.

The step-by-step, the prompt to copy, the video and the check-it-worked list, for every lesson in all 15 modules. GHS 399 ($40), paid once by mobile money or card, yours to keep.

Get the course · GHS 399See what’s inside
Already have the course? Open the full lesson