{"enrichment":{"faq":[{"a":"multi-tenant-architecture guides you through designing a multi-tenant SaaS platform with robust tenant isolation. Start by choosing your hosting layer\u2014Cloudflare Workers or Vercel\u2014then implement tenant identification via subdomain or custom domain routing. Establish clear isolation boundaries at the database, cache, and file storage layers. Use middleware to extract tenant context from the request and propagate it through your application stack, ensuring data and resources remain segregated per tenant.","q":"How do I build a multi-tenant SaaS app with proper tenant isolation?"},{"a":"multi-tenant-architecture compares both platforms for multi-tenant deployments. Cloudflare Workers excel at edge-level tenant routing and request transformation with minimal latency, ideal for high-volume subdomain-based architectures. Vercel offers integrated middleware for tenant identification and works seamlessly with Next.js applications, providing simpler setup for custom domain support and per-tenant static assets like robots.txt and sitemaps. Choose Cloudflare for performance-critical edge routing; choose Vercel for rapid Next.js-based SaaS development.","q":"What's the difference between Cloudflare and Vercel for multi-tenant hosting?"},{"a":"multi-tenant-architecture covers custom domain implementation by routing tenant requests through DNS CNAME records pointing to your platform. Generate SSL certificates for each tenant domain\u2014either via wildcard certificates for subdomains or individual certificates for custom domains. Map the incoming domain to your tenant identifier in middleware, then route requests to the correct tenant context. For scale, consider PSL (Public Suffix List) submission to enable proper cookie isolation across tenant domains.","q":"How do I add custom domains to my multi-tenant app?"},{"a":"multi-tenant-architecture explains subdomain-based tenant routing by extracting the subdomain from incoming requests in your edge layer or middleware. Use wildcard SSL certificates (*.yourdomain.com) to cover all subdomains with a single certificate. Extract the subdomain in your routing logic, map it to a tenant ID, and propagate that context through your application. This approach scales efficiently and keeps tenant identification simple, though it locks tenants to your primary domain.","q":"How do I route tenants by subdomain with SSL certificates?"},{"a":"multi-tenant-architecture connects resource limits to billing plans by defining per-tenant quotas\u2014API rate limits, storage, concurrent users, or feature flags\u2014tied to each pricing tier. Store these limits in your tenant configuration, then enforce them at request time via middleware or application logic. Track usage per tenant and trigger billing events when thresholds are crossed. This approach ensures fair resource allocation and creates natural upgrade incentives as tenants grow.","q":"How do I map platform limits to pricing tiers in a multi-tenant SaaS?"},{"a":"multi-tenant-architecture emphasizes isolation at multiple layers: use separate database schemas or row-level security per tenant, isolate cache keys with tenant prefixes, and segregate file storage by tenant directory. Implement tenant context propagation through middleware so every request carries tenant identity. Avoid cross-tenant data leaks by validating tenant ownership on every query. Test isolation boundaries regularly and use audit logs to track cross-tenant access attempts.","q":"What are multi-tenant architecture best practices for tenant isolation?"}],"shadow_tags":["saas-architecture","tenant-routing","domain-strategy","isolation-patterns","white-labeling","edge-computing","multi-workspace","billing-tiers"],"summary_rewrite":"Plan a multi-tenant SaaS platform by choosing between Cloudflare Workers and Vercel, then work through tenant identification, isolation, routing, context propagation, and custom domain support. Maps platform limits to pricing tiers and covers domain strategy decisions including PSL submission."},"files":[{"bytes":10634,"path":"skills/multi-tenant-architecture/SKILL.md","sha256":"f794b1f082b160aa1874182a2f139636faa4018af5c5b5bc83c442d408383573","url":"https://skillfed.io/files/mblode/agent-skills/multi-tenant-architecture/ca88afdd/SKILL.md"}],"id":"mblode/agent-skills/multi-tenant-architecture","links":{"html":"https://skillfed.io/mblode/agent-skills/multi-tenant-architecture","md":"https://skillfed.io/mblode/agent-skills/multi-tenant-architecture.md","repo":"https://github.com/mblode/agent-skills"},"meta":{"agents_supported":[],"first_seen":"2026-07-28","forks":6,"language":"Shell","last_updated":"2026-07-26","license":"MIT","name":"multi-tenant-architecture","publisher":"mblode","stars":71},"relations":{"similar":[{"id":"qdrant/skills/qdrant-multitenancy"},{"id":"dadbodgeoff/drift/multi-tenancy"},{"id":"qdrant/skills/tenant-scaling"},{"id":"agentsope/SkillAlchemy/agentsop-multi-tenant-rag"},{"id":"BagelHole/DevOps-Security-Agent-Skills/multi-tenant-llm-hosting"},{"id":"rivet-dev/skills/per-tenant-database"},{"id":"cyanheads/mcp-ts-core/security-pass"},{"id":"TheBeardedBearSAS/claude-craft/multitenant"},{"id":"iPythoning/b2b-sdr-agent-template/b2b-sdr-agent-template"},{"id":"patricio0312rev/skills/multi-tenant-safety-checker"}]},"slug":{"owner":"mblode","repo":"agent-skills","skill":"multi-tenant-architecture"},"version":"ca88afdd"}
