AI Letter App

Ship your SaaS on Effect v4

The opinionated multi-tenant SaaS template. Effect v4, React, Alchemy on Cloudflare. Type-safe end to end, batteries included.

Built for production from day one

Every pattern in the template is the one we ship to customers — no toys, no demos.

Effect v4 end to end

Services, layers, schemas, and structured concurrency from the API edge to the browser. One type system, one error model.

Multi-tenant by default

TenantSqlClient auto-injects org scoping on every query. Cross-tenant reads are a type error, not a code review.

Auth, billing, invites

Better-auth sessions, Polar billing webhooks, org invites, and RBAC ship in the box. Rip out what you don't need.

shadcn + Effect-Atom

Full shadcn registry vendored under @ai-letter-app/ui. Reactive React via @effect/atom-react with typed HTTP clients.

Alchemy on Cloudflare

Infrastructure-as-code with Alchemy v2. Workers, D1, R2, Pages — provisioned and deployed from a single Effect program.

Strict gates

tsgo composite build, 38 Effect language-service diagnostics at error severity, vitest, ESLint. Every commit, no warnings.

Ready to ship?

Clone the template, point Alchemy at your Cloudflare account, and have a multi-tenant SaaS running in an afternoon.