saas-multi-tenant

Featured

Design and implement multi-tenant SaaS architectures with row-level security, tenant-scoped queries, shared-schema isolation, and safe cross-tenant admin patterns in PostgreSQL and TypeScript.

AI & Automation 39,350 stars 6386 forks Updated today MIT

Install

View on GitHub

Quality Score: 99/100

Stars 20%
100
Recency 20%
100
Frontmatter 20%
70
Documentation 15%
100
Issue Health 10%
50
License 10%
100
Description 5%
100

Skill Content

# SaaS Multi-Tenant Architecture ## When to Use This Skill - The user is building a SaaS application where multiple customers share the same database - The user asks about tenant isolation, row-level security, or data leakage prevention - The user needs to scope every database query to a specific tenant without manual WHERE clauses - The user asks about shared-schema vs schema-per-tenant vs database-per-tenant tradeoffs - The user is implementing admin endpoints that must access data across tenants - The user needs to add `tenant_id` columns to an existing single-tenant application - The user asks about PostgreSQL RLS policies for tenant isolation - The user is building tenant-aware middleware in Express, Fastify, or Next.js API routes Do NOT use this skill when: - The user is building a single-user application with no shared infrastructure - The user asks about authentication only without tenant scoping (use an auth skill instead) - The user needs general database schema design without multi-tenancy requirements ## Core Workflow 1. Determine the tenancy model. Ask the user about their scale expectations and isolation requirements. For most SaaS apps under 1000 tenants, shared-schema with a `tenant_id` column on every table is the correct default. Schema-per-tenant adds operational overhead (migrations run N times). Database-per-tenant is only justified when tenants have regulatory data residency requirements. 2. Add `tenant_id` to every tenant-scoped table. The column ...

Details

Author
sickn33
Repository
sickn33/antigravity-awesome-skills
Created
4 months ago
Last Updated
today
Language
Python
License
MIT

Integrates with

Similar Skills

Semantically similar based on skill content — not just same category

API & Backend Featured

saas-multi-tenant

Design and implement multi-tenant SaaS architectures with row-level security, tenant-scoped queries, shared-schema isolation, and safe cross-tenant admin patterns in PostgreSQL and TypeScript.

27,705 Updated today
davila7
AI & Automation Listed

saas-tenant-isolation

Audit multi-tenant SaaS applications for cross-tenant data leakage including query scoping, tenant_id enforcement, cache key isolation, file storage path scoping, search index isolation, and tenant binding across billing, analytics, and background jobs. Use this skill whenever the user mentions multi-tenant, tenant isolation, cross-tenant leak, tenant_id, organization scoping, workspace isolation, B2B isolation, "are my tenants isolated", shared database with tenant column, schema-per-tenant, or database-per-tenant. Trigger on phrases like "audit my multi-tenancy", "check tenant isolation", "cross-tenant data leak", "tenant_id scoping", "are my orgs isolated". Use this even when only one isolation surface is mentioned.

1 Updated 1 weeks ago
hlsitechio
AI & Automation Solid

saas-auth-patterns

SaaS authentication and authorization patterns including JWT vs session strategies, multi-tenant isolation, RBAC, API key management, passwordless flows, MFA, and secure session handling.

496 Updated 1 months ago
vibeeval
DevOps & Infrastructure Listed

scaffolding-multi-tenant-azure-apps

Scaffolds a multi-tenant Azure app where each tenant gets its own resource group on a shared subscription, with one Bicep main.bicep driven by a single tenant parameter that cascades through every resource name. The default tenant keeps the original (single-tenant) names byte-identical so the pattern works for the first deployment with no migration. Use when onboarding the second tenant onto an app that started single-tenant, designing a multi-school/multi-clinic/multi-org SaaS, or refactoring shared resources to be per-tenant.

1 Updated 6 days ago
alexpizarro
API & Backend Listed

multi-tenant-architecture

Guidelines for building a white-label, multi-tenant church platform using Next.js App Router, Middleware, and Supabase RLS. Use when setting up subdomains, dynamic theming, or tenant isolation.

0 Updated 3 days ago
Chatesito