Tenants
Tenant and project administration for multi-tenant Cuitty installs, gated by admin RBAC.
What Tenants does
Tenants provides the project administration layer for multi-tenant Cuitty installs: project configuration, ingest limits, feature entitlements, and owner metadata.
The module reads from auth-owned identity tables where needed, but keeps Cuitty-specific tenant configuration in its own schema so self-hosted installs can reason about limits and defaults without coupling to one auth implementation.
Wire payload
Same shape, three syntaxesThe wire protocol is plain HTTP, plain JSON, HMAC-SHA256. The TypeScript tab uses the SDK; the cURL tab is the raw HTTP equivalent; the Python tab shows the preview SDK shape.
import { createCuittyClient } from "@cuitty/sdk";
import { tenantsPlugin } from "@cuitty/sdk/plugins/tenants";
const cuitty = createCuittyClient({
portalUrl: "https://app.cuitty.com",
projectId: process.env.CUITTY_PROJECT_ID!,
apiKey: process.env.CUITTY_API_KEY!,
});
cuitty.use(tenantsPlugin());
cuitty.start();
await cuitty.emit({
type: "tenant",
timestamp: new Date().toISOString(),
data: {
projectId: "proj_01",
action: "config.updated",
ingestRpsLimit: 250,
},
});
Database schema
Excerpt from modules/tenants/schema.sql.
One libSQL file per module — back it up with cp.
CREATE TABLE cuitty_tenants.project_config (
project_id TEXT PRIMARY KEY,
ingest_rps_limit INTEGER NOT NULL DEFAULT 100,
retention_days INTEGER NOT NULL DEFAULT 30,
enabled_modules JSONB NOT NULL DEFAULT '[]',
updated_at BIGINT NOT NULL
);Related modules
Feature Flags
Manage rollout rules, targeting, and audit-backed flag changes from the same portal.
Webhooks
Outgoing webhook delivery with signed payloads, retries, and delivery history.
Audit
Comprehensive audit logging for all admin actions with before/after diffs.