Base substrate
The fifteen packages every module family sits on — kernel, auth, tenancy RLS, UI tokens, billing, jobs, email, AI config, the MCP server, registry-schema, observability, rate-limit, ds-manifest, and the generator tooling (cli, migrate) — plus three modules that extend the base without joining a family.
The Base substrate is the floor every Caisson module family composes on. It is Apache-2.0 and installs like any other package, and carries the load-bearing contracts, the typed error hierarchy, fail-closed tenancy, the billing port, and the token floor that every other module extends but never forks.
What's in the base
- kernel: the typed
CaissonErrorhierarchy, the credit-gate and tenancy-denial error shapes, and the one standards gate every package ships through. - auth: self-hosted better-auth that owns its Drizzle tables, with an EdDSA-signed JWT and a JWKS cross-plane seam.
- tenancy-rls: fail-closed multi-tenant Postgres RLS: a query with no tenant context returns nothing.
- billing: Stripe, Paddle, LemonSqueezy, and Polar behind a
BillingProviderport, with HMAC raw-body webhook verification. - ai-config: provider-agnostic AI configuration with agent-assisted setup.
- mcp-server: the MCP server your agent connects to, auth-gated with a timing-safe Bearer check.
- ui: a typed token floor:
--cs-*OKLCH tokens, one light and one dark theme. - jobs: a Trigger.dev job port with test drivers; billing and credit side-effects are enqueued, not inline.
- email: a Resend email port with a test driver.
- registry-schema: the open module-manifest and index schema plus the allowlist helpers — the contract the generator's catalog-index builder implements.
- observability: a vendor-neutral OpenTelemetry bootstrap; env-gated NodeSDK with an OTLP/HTTP exporter.
- rate-limit: token-bucket rate limiting with per-key and global ceilings and an injectable clock.
- ds-manifest: the design-system contracts an agent reasons over — the component-manifest schema, its typed reader, and the pure contrast and static-usage checkers.
The generator tooling, the create-caisson CLI and
@caisson-sh/migrate, completes the base; start at
create-caisson.
That is the base: fifteen packages, thirteen substrate plus two generator tooling. Like every package in the repository, each one is Apache-2.0.
Three more base-adjacent modules
Three modules extend the base without living in one of the five persona families:
- org-controls: WorkOS SSO, the owner-gated multi-user surface, and the admin-write RLS layer.
- billing-orchestration: the full verify → parse →
checkout → idempotency flow composed on the open
BillingProviderport. - ui-pro: the advanced component tier on the open
@caisson-sh/uitoken floor: DataTablePro, OpsMatrix, AuditTimeline, CommandPalette, charts, and the interactive primitives.
Like every other module, these three are Apache-2.0 and included in the Everything family.
Licensing
Every package is Apache-2.0 and installs from public npm. The base packages never depend "up" on a higher-layer module.