Install @tenantscale/sdk and add tenant isolation, audit logging, scoped keys,
and plan enforcement to any API — one line per feature.
🍀 First 20 signups get lifetime 40% off. No spam, just updates.
import { TenantScale } from '@tenantscale/sdk'
import { authenticateApiKey } from '@tenantscale/hono'
const ts = new TenantScale({
supabaseUrl: process.env.SUPABASE_URL,
supabaseKey: process.env.SUPABASE_SERVICE_ROLE_KEY,
})
// One line — every request is tenant-isolated
app.use('/api/*', authenticateApiKey({ ts }))
app.get('/api/tenant', (c) => {
const tenant = ts.getTenant(c)
return c.json({ tenant: tenant.name })
})
import { TenantScale } from '@tenantscale/sdk'
import { authenticateApiKey } from '@tenantscale/express'
const ts = new TenantScale({
supabaseUrl: process.env.SUPABASE_URL,
supabaseKey: process.env.SUPABASE_SERVICE_ROLE_KEY,
})
// One middleware — auth, tenant isolation, audit logging
app.use('/api', authenticateApiKey({ ts }))
app.get('/api/usage', (req, res) => {
res.json({ tenant: req.tenantId })
})
import { TenantScale } from '@tenantscale/sdk'
import { createHandler } from '@tenantscale/next'
const ts = new TenantScale({
supabaseUrl: process.env.SUPABASE_URL,
supabaseKey: process.env.SUPABASE_SERVICE_ROLE_KEY,
})
const h = createHandler({ ts })
// app/api/tenants/route.ts
export const GET = h.withApiKey(async (req, { apiKey }) => {
return Response.json({ tenant: apiKey.tenant_id })
})
# Analyze existing codebase for multi-tenant readiness
npx @tenantscale/cli migrate
# Detects: framework, ORM, routes, auth patterns
# Generates: migration SQL, tenant middleware, plan config
# Scaffold a new multi-tenant project
npx @tenantscale/cli init --framework hono
# Works with: Express, Hono, Next.js, Fastify (coming)
⇡ Drop in any adapter. All share one TenantScale instance. Works with Express, Hono, Next.js, and more.
Add multi-tenancy to any API in three steps. No new infra, no heavy refactors.
npm install @tenantscale/sdk @tenantscale/express
Point it at your Supabase project — that's it. The SDK handles the rest.
app.use('/api', authenticateApiKey({ ts }))
One line per feature. Auth, plan limits, rate limiting, audit logs — all middleware.
Every request is tenant-isolated. Audit trail, plan gating, SSRF-safe webhooks, and rate limits — all working, all tested.
Because multi-tenancy is a trap. What looks like a weekend project turns into months of edge cases. Here's what you're actually signing up for:
Open source (MIT) — no lock-in, no upsells. Self-host unlimited tenants for free.
Star on GitHubThe MIT-licensed SDK is free forever with zero tenant limits — self-host it, scale infinitely. The hosted cloud API has paid tiers based on tenant count. 🍀 First 20 founders get 40% off cloud for life.
@tenantscale/sdk and @tenantscale/mcp packages are MIT — unrestricted. Run them on your own infrastructure with unlimited tenants, API calls, and audit logs forever. The API server is BSL 1.1 (free to self-host). The hosted cloud service (managed auth, dashboard, webhook dispatch) is coming soon.Unlimited hosted tenants, dedicated infrastructure, custom SLA, phone support, and white-label options. SOC 2 Type II report available on request (coming soon). For large organizations with compliance needs. (SDK self-host is always free and unlimited — no enterprise plan needed for that.)