This skill provides a comprehensive framework for building robust multi-tenant applications, focusing on data isolation, tenant-scoped querying, and strict security best practices. It guides developers through selecting the right tenancy model (shared-schema vs. isolated), implementing PostgreSQL Row-Level Security (RLS) for database-layer enforcement, and configuring application-level middleware to ensure every query is automatically scoped to the correct tenant, effectively preventing cross-tenant data leaks in production environments.
主な機能
01PostgreSQL Row-Level Security (RLS) configuration for hardened data isolation
02Automatic tenant scoping middleware for Prisma, Drizzle, and raw SQL
03Tenant-aware request handling for Express, Fastify, and Next.js
04Strategic guidance on shared-schema vs. schema-per-tenant trade-offs
05Secure cross-tenant admin patterns and automated tenant provisioning
06130 GitHub stars
ユースケース
01Building a B2B SaaS platform where multiple organizations share a single database
02Retrofitting an existing single-tenant application with multi-tenancy and RLS
03Implementing strict data compliance and isolation requirements at the database level