Turf booking platform for local sports venues Next.js frontend, Go/Gin REST API deployed on GCP Cloud Run, PostgreSQL via Supabase.
Booking a local sports venue means WhatsApp messages, phone calls, and double bookings. SlotTurf replaces that with a slot reservation in under 60 seconds.
SlotTurf is a turf booking platform for local sports venues. Users browse available slots, book in under 60 seconds, and pay online. No calls, no WhatsApp back-and-forth, no double bookings.
Venue owners get a dashboard to manage slots, pricing, and bookings without touching a spreadsheet.
Split into two services:
Frontend Next.js + TypeScript, deployed on Vercel. TanStack Query handles data fetching and cache invalidation. Zustand for client state. Built as a PWA installable on mobile, browsable offline.
Backend Go REST API with the Gin framework, containerized and deployed on GCP Cloud Run. Stateless, auto-scales to zero when idle, scales up on traffic without manual intervention. Cold start is fast enough for the use case.
Database PostgreSQL via Supabase. Supabase handles connection pooling, row-level security policies for multi-tenant venue data, and real-time slot availability. Schema designed to prevent double bookings at the database level slot locking happens in a transaction, not in application code.
Razorpay handles payments with server-side order creation and signature verification:
pending in a DB transactionPOST /api/payment/create-order hits Go backend, creates Razorpay order server-sideconfirmed, booking record created atomicallyavailableSignature verification happens in Go before the booking is written. No client-side trust.
The frontend was already in Next.js. Go was chosen for the backend specifically stateless HTTP handlers, easy containerization for Cloud Run, and straightforward concurrency for handling simultaneous booking requests on the same slot without race conditions.
This is also where I moved beyond tutorial Go into production patterns: context propagation, graceful shutdown, structured logging, and database transaction management for slot locking.