FOUNDATIONS / DESIGN PARTNER PREVIEW
One model. Explicit boundaries.
How Effect, Alchemy and Cloudflare fit together—and where the prototype ends.
The application path
The trusted host reads and writes D1. The generated tool receives only a serialized input snapshot. In the current fixture, neither a database binding nor credentials cross into generated code.
Effect carries the dependencies
The application’s research service uses an Effect Layer that declares how the database capability is provided. Typed service requirements make missing wiring visible during development. Tagged errors distinguish expected failures such as version conflicts.
Alchemy joins runtime and infrastructure
The D1 resource declaration sits next to the service that uses it. The Worker and its bindings are composed into the same stack. This is the tested resource declaration:
export const Database = Cloudflare.D1.Database(
"ResearchDB",
{ migrations: "./migrations" },
);See the downloaded src/research.ts for the complete service and binding implementation. The landing-page lifecycle is an interactive explanation, not a live cloud deployment console.
The provisioning path
We deployed a separate controller Worker and ran a real KV create → rename → delete lifecycle inside it. It explicitly supplies the relevant provider, credentials, HTTP client, stage, context and state service.
The managed design
The next version needs a persisted operation journal, stable resource identities, serialized reconciliation per capability, scoped provider authority, and recovery after ambiguous provider responses. Every resource must have an owner and a cleanup policy. These are development requirements, not shipped guarantees.
Why the browser is different
Effect bundled for browsers in our test. The stock Alchemy deployment and Plan/Apply entry points did not: transitive Node imports blocked bundling. The successful Worker experiment uses nodejs_compat and two granular internal imports. General browser portability remains unverified.