ditto190/crispy-nextjs-turborepo-monorepo/multi-tenancy-architecture
Claude Code and agent skill by ditto190/crispy-nextjs-turborepo-monorepo
- community
Checking that the SKILL.md file is still in the repository.
Imported TRAE skill from architecture/Multi_Tenancy_Architecture.md
Install
npx vskill@latest install ditto190/crispy-nextjs-turborepo-monorepo/multi-tenancy-architectureSKILL.md
The same SKILL.md was published earlier as ditto190/crispy-nextjs-turborepo-monorepo/multi-tenancy-architecture.
Multi-Tenancy Architecture
Overview
Serving multiple customers (tenants) from a single instance of the application.
Procedure
1. Choosing an Isolation Level
Select based on compliance, budget, and performance needs.
- Shared Database, Shared Schema: Use a
tenant_idcolumn on all tables. (Cheapest, easiest to scale). - Shared Database, Separate Schema: Use Postgres schemas or separate DBs on the same server.
- Separate Database: High isolation for enterprise clients.
2. Implementation: Middleware for Tenant Identification
Identify the tenant from the request (Subdomain, Header, or JWT claim).
3. Implementation: Scoped Database Queries
Ensure all queries are automatically filtered by the current tenant_id.
4. Handling Migrations
Ensure migrations run across all tenant schemas if using the "Schema per Tenant" approach.
Constraints
- Data Leakage: The biggest risk in shared-schema multi-tenancy. Always use automated filters (RLS in Postgres or ORM middleware).
- Noisy Neighbors: One tenant's heavy usage shouldn't crash the app for others. Use rate limiting per tenant.
- Global Data: Decide how to handle shared data (e.g., a global
Countrylist) that doesn't belong to any specific tenant.
Expected Output
A system architecture that allows scaling to thousands of customers while keeping their data logically or physically separated.
Security
- Security scanPassed, 95 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryChecking.github/skills/architecture/multi-tenancy-architecture/SKILL.md
Popularity
- 7-day trend score
- 5
Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/ditto190/crispy-nextjs-turborepo-monorepo/multi-tenancy-architecture)