efforge
A scaffolder for Effect apps on Cloudflare Workers, with the database, auth, and platform services already wired as Effect layers.
- Year
- 2026
- Role
- Author and maintainer
- Stack
- TypeScript, Effect, TanStack Start, Cloudflare Workers
The problem
Starting a new Effect project on Cloudflare means making the same dozen decisions every time: which database and ORM, how auth plugs in, how Worker bindings reach application code, and how to keep all of it testable. Existing starters cover parts of this. create-effect-app gives you an Effect project, and npm create cloudflare gives you a TanStack Start app on Workers, but nothing wires the whole server side in Effect.
What it does
npm create efforge generates a TypeScript monorepo with a TanStack Start app on Cloudflare Workers. You choose the database, ORM, auth, infrastructure tool, AI, and extras up front, and efforge add adds more later.
npm create efforge my-app -- --database=d1 --orm=effect-sql --auth=better-authArchitecture
Worker environment
cloudflare.ts
Layers
layers.ts
Effect services
packages/core
Routes and handlers
- Each capability (database, auth, mail, storage, AI) is an Effect service with tagged errors in
packages/core, implemented as a layer and composed in one file. - Only
apps/web/src/server/cloudflare.tsreads the Worker environment. Everything else receives bindings through layers, so code that uses them can be tested with@effect/vitest. efforge addedits the generated project with AST transforms, wiring a new add-on into the layers, exports, bindings, and secrets instead of asking you to paste code.
Decisions and trade-offs
- Narrow on purpose. efforge is for writing the whole server side in Effect, on Cloudflare. If you want Next.js, another runtime, or plain async code, a different starter is a better fit.
- Agent-ready output. The generated project includes an
AGENTS.mdwith the same layout and rules, andpnpm checkruns formatting, linting with Effect diagnostics, and type checking. - Early dependencies. The default ORM is pinned to a release candidate and the optional Alchemy support uses a beta. That is a deliberate choice for an early project and a cost for anyone adopting it today.
Status
Version 0.1, early, and MIT licensed.