
Saas Platforms
This covers the practical architecture of SaaS applications: multi-tenancy strategies (shared database with tenant_id, schema per tenant, or database per tenant), Stripe subscription management with prorations and webhooks, and usage-based billing. The tenant isolation patterns are especially useful, including Prisma middleware for automatic filtering and PostgreSQL row-level security examples. It's aimed at the point where you're building something more sophisticated than a simple app but not yet at hyperscale. The feature flags and entitlement checking code helps you gate features by plan tier. If you're implementing billing or trying to prevent data leaks between tenants, this gives you the patterns that actually matter in production.
- skills.sh installs
- 363
- GitHub stars
- 26
- last updated
- Aug 21, 2026
Install
$ npx -y skills add miles990/claude-software-skills --skill saas-platforms --agent claude-codeInstalls into .claude/skills of the current project.
Files
SaaS Platform Development
Overview
Building Software-as-a-Service applications with multi-tenancy, subscription billing, and user management.
Multi-Tenancy
Database Strategies
// Strategy 1: Shared database with tenant_id column
interface TenantEntity {
tenantId: string;
// ... other fields
}
// Middleware to inject tenant context
function tenantMiddleware(req: Request, res: Response, next: NextFunction) {
const tenantId = req.headers['x-tenant-id'] || req.user?.tenantId;
if (!tenantId) {
return res.status(400).json({ error: 'Tenant ID required' });
}
req.tenantId = tenantId;
next();
}
// Prisma middleware for automatic tenant filtering
prisma.$use(async (params, next) => {
const tenantId = getCurrentTenantId();
if (params.model && hasTenantId(params.model)) {
// Add tenant filter to queries
if (params.action === 'findMany' || params.action === 'findFirst') {
params.args.where = {
...params.args.where,
tenantId,
};
}
// Add tenant ID to creates
if (params.action === 'create') {
params.args.data.tenantId = tenantId;
}
}
return next(params);
});
Sponsors
Details
- Repository
- github.com/miles990/claude-software-skills
- Category
- Code Review & Quality
- First seen
- Jun 3, 2026