AI Letter App
The opinionated multi-tenant SaaS template. Effect v4, React, Alchemy on Cloudflare. Type-safe end to end, batteries included.
Every pattern in the template is the one we ship to customers — no toys, no demos.
Services, layers, schemas, and structured concurrency from the API edge to the browser. One type system, one error model.
TenantSqlClient auto-injects org scoping on every query. Cross-tenant reads are a type error, not a code review.
Better-auth sessions, Polar billing webhooks, org invites, and RBAC ship in the box. Rip out what you don't need.
Full shadcn registry vendored under @ai-letter-app/ui. Reactive React via @effect/atom-react with typed HTTP clients.
Infrastructure-as-code with Alchemy v2. Workers, D1, R2, Pages — provisioned and deployed from a single Effect program.
tsgo composite build, 38 Effect language-service diagnostics at error severity, vitest, ESLint. Every commit, no warnings.
Clone the template, point Alchemy at your Cloudflare account, and have a multi-tenant SaaS running in an afternoon.