AI / Platform

Cantrip is a multi-tenant TTRPG platform where game publishers ship rulesets and players run sessions with an AI Dungeon Master. The same architectural backbone as Chicknz (multi-tenant, oRPC, Prisma, Better Auth) but applied to a creative-tools domain — the AI is the host, not a chatbot.
Flagship ruleset: Zairoo, an Afrocentric original system that doubles as the platform's reference content while the editor and session experience are stress-tested.
Existing virtual-tabletop tools force publishers into a fixed rules engine, and AI DM tools tend to be single-system. Cantrip splits the layer cleanly: an extractable rules engine SDK + a tenant-isolated session runtime + an AI orchestrator that knows the active ruleset's grammar. Publishers get authoring tools; players get a host that doesn't break character.
Three layers: an extractable rules engine SDK (the `cantrip-sdk` package — pure functions, no React), a tenant-isolated session runtime (Next.js App Router with oRPC procedures scoped by `tenantId`), and an AI orchestrator that's bound to the active ruleset's grammar via structured tool definitions (Vercel AI SDK + Anthropic). The same SDK powers both publisher authoring (validates rulesets at write time) and the session runtime (executes them at play time) — no schema drift between authoring and play.
Anthropic Claude orchestrates session flow, generates encounters, and arbitrates rules — bound to the active ruleset's grammar so it stays in-system instead of hallucinating mechanics.
Publisher dashboard for shipping rulesets — character sheets, moves, tables, narrative tone. Same authoring layer that powers Zairoo also opens to third-party publishers.
Each session runs in a tenant-isolated context with its own ruleset, party state, and AI memory. Built on the same multi-tenant primitives as Chicknz — every query scoped, every AI call sandboxed.



