Menu

Building a Multi-Tenant Clinic SaaS with NestJS + Prisma: What 12 Months in Production Taught Me
πŸ–ΌοΈ

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

DEV Community: nestjsΒ·Abdullah BayomyΒ·5 months ago
#cRlNdQWw
#dev#clinic#params#tenant#clinicid
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.