Multi-Tenant Architecture
Implements secure data isolation and tenant-aware patterns for multi-tenant SaaS applications using Prisma and TypeScript.
The Multi-Tenant Architecture skill provides a standardized framework for building robust SaaS applications that require strict data separation between organizations. It automates the implementation of tenant context propagation through specialized Express middleware and enforces row-level security patterns within the repository layer. By leveraging Prisma and PostgreSQL, the skill ensures that all database operations are automatically scoped to the correct organization ID, effectively preventing cross-tenant data leakage and simplifying the development of complex, multi-user systems.
Key Features
019 GitHub stars
02Row-level security (RLS) and data isolation enforcement
03Base repository patterns for tenant-scoped CRUD operations
04Automated tenant context propagation via middleware
05Integrated tenant-aware error handling and testing patterns
06Multi-tenant schema design with composite unique constraints
Use Cases
01Implementing row-level security in PostgreSQL using Prisma ORM
02Refactoring a single-tenant backend to support multiple isolated clients
03Building a SaaS platform where users only access their own organization's data