Skip to Content

Multitenant

Config-driven tenant and market resolution for TypeScript: one tenants.config.json, createTenantRegistry, and adapters for Next.js (App + Pages), Express, Nest, and React — with typed errors you can branch on in production.

  • Why Multitenant? — mental model, when not to use this, pitfalls.
  • Getting started — install, minimal config, validation, async/bootstrap.
  • Configurationtenants.config.json schema, flags, merge rules.
  • Packages — scoped @multitenant/* installs at a glance.
  • Examples — copy-paste from the real express-minimal and next-minimal workspaces.
  • ErrorsMultitenantError hierarchy and stable code strings.
  • CLIinit, dev proxy, check, print.
  • Frameworks — Next, Express, Nest, React.

30-second bootstrap

npx multitenant init --force npx multitenant check

Then wire @multitenant/next-app, @multitenant/express, or another adapter — see Getting started.

The monorepo also ships reference ORM packages (Drizzle, Kysely, Prisma, TypeORM) and @multitenant/database (ALS scope). Deep-dive markdown for contributors remains in the GitHub docs/ tree.

Last updated on