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.
Read next
- Why Multitenant? — mental model, when not to use this, pitfalls.
- Getting started — install, minimal config, validation, async/bootstrap.
- Configuration —
tenants.config.jsonschema, flags, merge rules. - Packages — scoped
@multitenant/*installs at a glance. - Examples — copy-paste from the real
express-minimalandnext-minimalworkspaces. - Errors —
MultitenantErrorhierarchy and stablecodestrings. - CLI —
init,devproxy,check,print. - Frameworks — Next, Express, Nest, React.
30-second bootstrap
npx multitenant init --force
npx multitenant checkThen 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