Menu

Post image 1
Post image 2
1 / 2
0

Building a Multi-Tenant Clinic SaaS with NestJS + Prisma: What 12 Months in Production Taught Me

DEV Community: nestjs·Abdullah Bayomy·3 days ago
#cRlNdQWw
#dev#clinic#params#tenant#clinicid#string
Reading 0:00
15s threshold

The problem multi-tenant healthcare SaaS has to solve A clinic management product looks simple from the outside: appointments, patients, prescriptions, billing. The hard part isn't features — it's the tenancy model . Real clinics broke my early assumptions fast: One doctor often owns multiple clinics (a downtown branch + a hospital affiliation). A receptionist can work at clinic A in the morning and clinic B in the evening . A patient may have visits at multiple clinics of the same doctor — same medical history. Each clinic has its own subscription lifecycle — active, trial, expired, suspended. Walk-ins outnumber scheduled appointments in this market, so the queue is the product , not the calendar. A naive "one tenant = one customer" model breaks on day one. This post walks through the architecture I shipped for TabeebHub : a NestJS + Prisma + Postgres stack with a shared database, row-level tenant scoping, role-based access, and clinic-scoped subscriptions.…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.

Read More