TenancyJS

Set up your stack

A complete, copy-pasteable integration-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 integration-agent prompt for one stack - hand it to an AI assistant (Claude Code, Cursor, …) and it works on a new or existing app: it assesses your app first, integrates with your existing models and auth, verifies each change, and finishes by proving isolation with an isolated two-tenant leak 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

All three AdonisJS + Lucid strategies live on one page - each card jumps to its integration-agent prompt.

By strategy

The stack pages above default to row-level. For the other two isolation strategies, one page each covers every ORM (worked integration-agent prompt + a per-ORM swap table), and pairs with the provisioning recipes.

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