Slotwise: multi-tenant appointment booking SaaS backend by Chaitanya MhetreSlotwise: multi-tenant appointment booking SaaS backend by Chaitanya Mhetre

Slotwise: multi-tenant appointment booking SaaS backend

Chaitanya Mhetre

Chaitanya Mhetre

The problem: a booking system looks simple until two people book the same slot in the same second, a client retries a payment request, or one customer's data shows up in another customer's account. Most of these bugs only appear under real traffic.
What I built: the backend for an appointment-booking SaaS, built the way a small team would run it in production. Tenant isolation is enforced by PostgreSQL row-level security, so a missing filter in the code cannot leak data. Double-booking is made impossible by a database exclusion constraint instead of application checks.
Reliability details: idempotent APIs so a retried request never creates a second booking, a transactional outbox so events are never lost, signed webhooks, rotating refresh tokens, and traces that follow one booking from the HTTP request through to the background worker.
How I tested it: 88 tests run against real PostgreSQL and Redis with no database mocks, including property tests of availability across 5 timezones with daylight-saving changes. A k6 load test on a laptop reached about 89 requests per second at a p95 of 41 ms on one process. The load test also found three real bugs, which I fixed and wrote up.
Details: Python, FastAPI, PostgreSQL 16, SQLAlchemy, Redis, Celery, OpenTelemetry, Prometheus, Grafana, Docker, GitHub Actions. This is a personal project. Code is on my GitHub: chaitanya-mhetre, repository production-fastapi.
Like this project

Posted Oct 13, 2026

Booking backend where the database itself blocks double-booking and cross-tenant access. Personal project.