Set up your stack
A complete, copy-pasteable setup-agent prompt for each framework + ORM - plus a manual walkthrough. Wire fail-closed multi-tenancy in one paste.
Each page here is a full, imperative setup-agent prompt for one stack - hand it to an AI assistant (Claude Code, Cursor, …) and it executes the wire-up step by step, verifying each change and finishing by proving isolation with a two-tenant test. Every page also has a manual walkthrough with the real code if you'd rather do it by hand.
This is the "batteries-included, but not out-of-the-box" seam: TenancyJS scopes and fails closed for you, but wiring it into your app - and provisioning each tenant's storage
- is a deliberate, reviewed step. These recipes make that step a single paste.
Pick your stack
Express
Express + Prisma
Row-level · PostgreSQL
Express + Knex
Row-level (forced RLS) · PostgreSQL
Express + TypeORM
Row-level (forced RLS) · PostgreSQL
Express + Sequelize
Row-level (forced RLS) · PostgreSQL
Express + Drizzle
Row-level (forced RLS) · PostgreSQL
Express + Mongoose
Row-level · MongoDB
Next.js
Next.js + Prisma
Row-level · PostgreSQL
Next.js + Knex
Row-level (forced RLS) · PostgreSQL
Next.js + TypeORM
Row-level (forced RLS) · PostgreSQL
Next.js + Sequelize
Row-level (forced RLS) · PostgreSQL
Next.js + Drizzle
Row-level (forced RLS) · PostgreSQL
Next.js + Mongoose
Row-level · MongoDB
NestJS
NestJS + Prisma
Row-level · PostgreSQL
NestJS + Knex
Row-level (forced RLS) · PostgreSQL
NestJS + TypeORM
Row-level (forced RLS) · PostgreSQL
NestJS + Sequelize
Row-level (forced RLS) · PostgreSQL
NestJS + Drizzle
Row-level (forced RLS) · PostgreSQL
NestJS + Mongoose
Row-level · MongoDB
AdonisJS
MySQL
MySQL has no schema-per-tenant, and row-level is experimental (facade-only, no backstop). The production path is database-per-tenant - one page covers every ORM.
These recipes default to row-level - the fastest way to a working, tested isolation boundary. For
schema-per-tenant or database-per-tenant, follow the same wiring, then switch the adapter's strategy
and add the provisioning recipe for your ORM.