feat: online booking portal (closes #3) #27

Merged
ghost merged 1 commits from feat/online-booking-portal into main 2026-03-17 20:16:12 +00:00
ghost commented 2026-03-17 20:15:01 +00:00 (Migrated from github.com)

Summary

Implements the customer-facing online booking portal for GitHub issue #3.

  • Public API (/api/book/*, no auth): GET /services, GET /availability?serviceId&date, POST /appointments
  • 4-step booking wizard in React: service selection → date & time → contact/pet info → confirm
  • Availability computed from real groomer schedules with slot-level conflict detection
  • Booking auto-creates or matches clients by email; always creates a new pet record
  • Final INSERT wrapped in a transaction to prevent double-booking race conditions
  • "Book" button added to main nav

How it works

  1. Customer picks a service (price + duration shown)
  2. Customer picks a date; available slots shown based on groomer availability (09:00–17:00 UTC)
  3. Customer fills in name, email, phone (optional), pet name, species, breed (optional), notes
  4. Confirmation screen with full summary → submit → success screen

Test plan

  • CI passes
  • GET /api/book/services returns active services without auth
  • GET /api/book/availability?serviceId=&date= returns time slots
  • POST /api/book/appointments creates appointment, client, and pet
  • Slots that are booked no longer appear as available
  • /book page renders correctly on mobile

🤖 Generated with Claude Code

## Summary Implements the customer-facing online booking portal for GitHub issue #3. - **Public API** (`/api/book/*`, no auth): `GET /services`, `GET /availability?serviceId&date`, `POST /appointments` - **4-step booking wizard** in React: service selection → date & time → contact/pet info → confirm - Availability computed from real groomer schedules with slot-level conflict detection - Booking auto-creates or matches clients by email; always creates a new pet record - Final INSERT wrapped in a transaction to prevent double-booking race conditions - "Book" button added to main nav ## How it works 1. Customer picks a service (price + duration shown) 2. Customer picks a date; available slots shown based on groomer availability (09:00–17:00 UTC) 3. Customer fills in name, email, phone (optional), pet name, species, breed (optional), notes 4. Confirmation screen with full summary → submit → success screen ## Test plan - [ ] CI passes - [ ] `GET /api/book/services` returns active services without auth - [ ] `GET /api/book/availability?serviceId=&date=` returns time slots - [ ] `POST /api/book/appointments` creates appointment, client, and pet - [ ] Slots that are booked no longer appear as available - [ ] `/book` page renders correctly on mobile 🤖 Generated with [Claude Code](https://claude.com/claude-code)
This repo is archived. You cannot comment on pull requests.