QNSI

Build Pattern · TypeScript

Build a Multi-Tenant B2B Document Platform

Source-linked multi-tenant integration pattern for onboarding, policy, storage, and metering contracts.

Evaluate tenant provisioning, policy, Vault, SSE-X, and quota contracts through the published SDK surface. Complete isolation, metering, billing, and end-to-end runtime behavior are NOT VERIFIED.

Verification boundary: SDK source presence does not prove route reachability, tenant isolation, policy enforcement, quota accounting, billing, or deployment behavior; all remain NOT VERIFIED.

NOT VERIFIEDDeployment timing
TypeScriptPrimary SDK
4Source surfaces

QNSI services used

Stack

Code

Published SDK calls

Snippets show source-linked SDK call shapes. Route reachability and deployment behavior remain NOT VERIFIED.

Provision a tenant + set its crypto policy at signuptypescript
import { QnsiClient } from "@heossihq/qnsi";

const qnsp = new QnsiClient({ apiKey: process.env.QNSI_API_KEY! });

// Self-serve tenant creation (called from your signup handler)
const tenant = await qnsp.tenant.createTenant({
  slug: workspace.slug,
  name: workspace.name,
  // Healthcare/finance customers get strict tier; others default
  cryptoPolicyTier: workspace.industry === "healthcare" ? "strict" : "default",
});

// Subsequent SDK calls scoped to this tenant via the tenant token
const tenantQnsp = new QnsiClient({
  apiKey: process.env.QNSI_API_KEY!,
  tenantId: tenant.id,
});

await tenantQnsp.vault.createSecret({
  name: "first-secret",
  payloadB64: payload,
});

Evaluate

Inspect the source-linked integration surface