This skill provides comprehensive guidance for building robust multi-tenant SaaS applications, focusing on data isolation and security. It guides developers through implementing shared-schema architectures using PostgreSQL Row-Level Security (RLS), ensuring every query is automatically scoped to the correct tenant. From setting up tenant-aware middleware in frameworks like Express or Next.js to configuring ORM-level filters for Prisma and Drizzle, this skill ensures data leakage is prevented at both the application and database layers while maintaining high developer productivity and manageable migration workflows.
主な機能
01PostgreSQL Row-Level Security (RLS) policy implementation
02Tenant-aware middleware for Express, Fastify, and Next.js
03Automatic ORM query scoping for Prisma and Drizzle
04Secure cross-tenant admin access and aggregation patterns
05Standardized tenant provisioning and migration workflows
0640,341 GitHub stars
ユースケース
01Implementing strict data isolation and RLS for security compliance
02Migrating a single-tenant application to a multi-customer SaaS platform
03Automating database query scoping to prevent cross-tenant data leaks