What you get
- Tenant-aware authentication with automatic session isolation
- Database queries automatically scoped to the current tenant
- Role-based access control with per-tenant permission policies
- Billing integration with per-tenant usage tracking
- Audit logging for compliance and governance
Quick start
Using @scalemule/sdk
Code example
import { createScaleMule } from '@scalemule/sdk'
const client = createScaleMule({
apiKey: process.env.SCALEMULE_API_KEY,
tenant: 'acme-corp'
})
// Create a user — automatically scoped to the tenant
const user = await client.auth.createUser({
email: 'admin@acme.com',
role: 'admin'
})
// Query data — tenant isolation enforced at the query layer
const projects = await client.data.query('projects', {
where: { status: 'active' }
})