Live demo · Accounts are shared and data resets every night.

Tennis Coaching Scheduler

Production-Ready Scheduling

A full-stack tennis coaching app for booking, cancellations, and coach availability.

Built with Next.js App Router, Supabase Auth, PostgreSQL, and Row Level Security to keep every booking accurate and every user scoped correctly.

What it does

Secure session booking

Race-safe reservations backed by PostgreSQL constraints and transactional RPCs.

Weekly court calendar

Browse open coaching sessions in a clean week view optimized for quick booking.

Coach-ready operations

Time slot management, booking oversight, and admin-friendly access controls.

How it works

The interesting parts are the ones you can't see.

No double bookings, even under a race

Booking runs inside a PostgreSQL function that locks the slot row (SELECT … FOR UPDATE) before checking it. A partial unique index allows only one active booking per slot as a second safety net. If two players click at the same moment, one gets the session and the other gets a clear "already booked" error.

Access rules live in the database

Row Level Security policies decide who sees what. Players only ever see their own bookings, and coaches see everyone's. The open-slots view checks availability through a SECURITY DEFINER helper that reveals only yes or no, so it's accurate without exposing other players' bookings.

One time zone, everywhere

Every session happens at one club, so dates are computed and shown in Pacific Time whether the server runs in UTC or the visitor is in Tokyo. The coach's slot form reads typed times the same way.

A demo that resets itself

One-click demo sign-in happens on the server, so the shared password never reaches the browser, and it repairs itself if a visitor changes it. A Vercel Cron job wipes visitor accounts and re-seeds two fresh weeks of sessions every night.

Tennis Coaching Scheduler · Live Demo