QNSP

Build Pattern · TypeScript

Build a Multi-Tenant B2B Document Platform

Self-serve onboarding, tenant-isolated storage and search, and usage metering across thousands of workspaces.

Ship faster by outsourcing encryption, compliance controls, and tenant isolation to QNSP. Self-serve tenant provisioning via tenant-service, tenant-scoped vault + SSE-X, and per-tenant usage metering via quota-service for billing across thousands of customer workspaces.

20 minTime to first PQC
TypeScriptPrimary SDK
4Services used

QNSP services used

Stack

Code

Real code, real SDK calls

Snippets reference the published @cuilabs/qnsp SDK surface (TypeScript, Python, Go, Rust mirror byte-for-byte).

Provision a tenant + set its crypto policy at signuptypescript
import { QnspClient } from "@cuilabs/qnsp";

const qnsp = new QnspClient({ apiKey: process.env.QNSP_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 QnspClient({
  apiKey: process.env.QNSP_API_KEY!,
  tenantId: tenant.id,
});

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

Ship it

Get an API key and start building