INITIALIZING...
tushar jain.
Booking System

BookMySlot

A multi-tenant reservation SaaS featuring real-time WebSockets synchronization, PostgreSQL Row Level Security (RLS) tenant isolation, and pessimistic transaction locking.

How I got this idea

I saw that local restaurants and clinics still run on paper diaries, phone calls, and memory. Waiters mix up table bookings, patients wait hours without knowing their slot status, and owners have no clear view. They don't need fancy enterprise software; they just need a simple, real-time booking sheet.

Problem

  • Paper diaries in clinics and restaurants lead to frequent double-bookings, scheduling conflicts, and customer waiting friction.
  • Front desk staff, service operators, and business owners lack a centralized, real-time view of daily slots.

Solution

  • Engineering Approach: Developed a multi-tenant booking system isolating database transactions by organization key while pushing instant slot state changes.
  • Architecture: Deployed a multi-tenant schema with PostgreSQL Row Level Security (RLS) policies, using Supabase Realtime listeners (WebSockets) to coordinate UI states.
  • What I Personally Built: Programmed the calendar reservation layout, configured the Supabase database triggers, and designed the real-time client sync loops.
  • Current Status & Result: Live B2B SaaS template adapted for medical clinics (BookMyClinic) and dining rooms (BookMyDine).
HTML/CSS/JSSupabase (Auth + Real-time DB)VercelGoogle Sheets API

Hardest Technical Challenge

Preventing simultaneous double-booking race conditions when two clients attempt to lock the exact same time slot. Solved by writing a PL/pgSQL database trigger that executes a pessimistic lock (`SELECT ... FOR UPDATE`) on the target slot before inserting, ensuring concurrent reservation attempts are queued and evaluated atomically.

Project Demo / Interface

BookMySlot architecture or screenshot

What I learned

  • Pessimistic locking and ACID database transaction isolation.
  • WebSocket connection state management and real-time data sync.
  • Multi-tenant database schema modeling and row isolation policies.