An open-source, Cloudflare-native foundation for testing email and SMS integrations. The current milestone is a working Alchemy V2 blueprint: Alchemy provisions D1, a TanStack Start website, a private Effect RPC backend, and a public schema-first Effect HTTP API. The homepage calls a typed hello RPC on load.
The project is intentionally small: D1 is its only application storage service, outbound email will use Cloudflare's structured transactional API, and Twilio webhooks will not carry signature-verification machinery.
- A Cloudflare account with Workers and D1 enabled
- Bun 1.3.14
- Cloudflare credentials available through Alchemy's interactive login or the
CLOUDFLARE_ACCOUNT_IDandCLOUDFLARE_API_TOKENenvironment variables
bun install
bun alchemy devAlchemy runs the application locally while using a real, stage-isolated D1
database in your Cloudflare account. Open the printed websiteUrl; the home
page calls Effect RPC through TanStack Start's /rpc server route and a private
service binding. The result includes the row count from test_records.
The printed apiUrl exposes the starter HTTP API:
GET /health
GET /v1/system
Both routes come from a shared Effect HttpApi contract, so handlers and typed
clients are checked against the same request and response schemas.
bun alchemy plan --stage dev-your-name
bun alchemy deploy --stage dev-your-nameUse a unique stage name for development. staging and prod are reserved for
shared environments.
bun run checkThis runs strict TypeScript, unit tests, and the Vite client/Worker build.
With Cloudflare credentials configured, exercise a temporary real deployment in both Alchemy dev and deploy modes:
bun run test:liveSet NO_DESTROY=1 only when intentionally preserving the test stage for
inspection.
After changing packages/db/src/schema.ts, generate and review the next
committed migration with:
bun run db:generateapps/api Public Effect HttpApi Worker and private RPC Worker
apps/web TanStack Start, React, TanStack Router, and Atom RPC
packages/contracts Shared HTTP API schemas and RPC contracts
packages/domain Business services and repository ports
packages/db Drizzle schema, migrations, and Alchemy D1 resource
docs Architecture, versions, and product design
alchemy.run.ts Complete cloud resource graph
See the architecture and the design.
Apache-2.0