
Overview
tenantkit is a framework-agnostic multi-tenancy library for Node.js. It provides tenant context propagated through the application and automatic Mongoose query scoping, in a single-database model with row-level isolation and fail-closed behavior: without a resolved tenant, no query leaks data.
Process
- Architecture
Tenant context design with async context, single-database row-level model, fail-closed guarantee for unscoped queries
- Development
TypeScript core, automatic scoping plugin for Mongoose, framework-agnostic integration, cross-tenant isolation tests
- Open Source
GitHub release with documentation, integration examples and adoption guides for multi-tenant SaaS
“Fail-closed, row-level isolation for multi-tenant SaaS in Node, without hand-rewriting queries or coupling the codebase to a specific framework”
