TenancyJS
Set up your stack

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

Next.js

NestJS

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.

On this page