The best way to control Claude Code, Codex and more from any computer or phone

main
mdx 114 lines 5.48 KB
Raw
1 ---
2 title: Cloudflare
3 description: Build and deploy full applications on Cloudflare with Alchemy — one Worker runtime plus resources like Durable Objects, D1, R2, Queues, and Hyperdrive, wired together by typed bindings.
4 ---
5
6 An alchemy app on Cloudflare is one **Worker** runtime plus the
7 resources it talks to — databases, object storage, queues,
8 stateful objects — all declared in the same TypeScript program and
9 wired together by typed bindings. Deploy the whole thing with
10 `bun alchemy deploy`; Alchemy figures out what changed.
11
12 New here? [Set up your account](/cloudflare/setup), then start the
13 [tutorial](/cloudflare/tutorial/part-1).
14
15 ## Compute
16
17 - [Workers](/cloudflare/compute/workers) — the compute runtime; every app has
18 at least one.
19 - [Durable Objects](/cloudflare/compute/durable-objects) — globally-unique
20 stateful instances with transactional storage and typed RPC.
21 - [Containers](/cloudflare/compute/containers) — long-lived processes and
22 arbitrary runtimes, paired with a Durable Object for typed RPC.
23 - [Workflows](/cloudflare/compute/workflows) — durable multi-step jobs with
24 checkpointed, replayable steps.
25
26 ## Frontend
27
28 - [Vite](/cloudflare/frontend/vite) — deploy any pure-Vite app
29 (SPAs, TanStack Start, React Router, SolidStart) as a Worker with
30 assets.
31 - [Static sites](/cloudflare/frontend/static-site) — any build
32 command's static output, including frameworks Vite doesn't cover
33 yet.
34
35 ## Data
36
37 - [D1](/cloudflare/data/d1) — serverless SQLite with migrations managed as
38 part of the deploy.
39 - [KV](/cloudflare/data/kv) — edge key-value storage for config, sessions,
40 and cached lookups.
41 - [R2](/cloudflare/data/r2) — object storage with read/write-scoped
42 bindings.
43 - [Hyperdrive](/cloudflare/data/hyperdrive) — edge connection pooling for
44 external Postgres and MySQL.
45 - [Pipelines](/cloudflare/data/pipelines) — ingest events into R2 as files or
46 Iceberg tables.
47 - [Iceberg tables](/cloudflare/data/iceberg-tables) — an Apache Iceberg
48 warehouse on R2 that Spark, DuckDB, and PyIceberg can query.
49
50 ## Messaging
51
52 - [Queues](/cloudflare/messaging/queues) — at-least-once message delivery
53 between Workers.
54 - [K2 streams](/cloudflare/messaging/k2) — a durable, replayable log with
55 independent subscriptions.
56
57 ## Networking
58
59 - [Domains & DNS](/cloudflare/networking/domains) — zones, DNS records, and zone
60 settings as resources; adopt the domains you already own.
61
62 ## Email
63
64 - [Email](/cloudflare/email) — route inbound mail on a zone you own
65 and send from Workers.
66
67 ## Security & secrets
68
69 - [Secrets & env](/cloudflare/security/secrets-env) — bind `.env` values and
70 secrets into your Workers.
71 - [Protect a Worker with Access](/cloudflare/security/access) — put a login
72 wall in front of a Worker and read the authenticated identity from
73 `ctx.access`.
74
75 ## What are you building?
76
77 | App shape | Stack |
78 | --- | --- |
79 | HTTP API | [Worker](/cloudflare/compute/workers) + [D1](/cloudflare/data/d1) — see [Effect HTTP API](/cloudflare/apis/effect-http-api) |
80 | Call one Worker from another (internal RPC) | [Worker](/cloudflare/compute/workers) — see [Schemaless RPC](/cloudflare/compute/workers#call-another-worker) and the [concept](/apis/schemaless) |
81 | Typed API for external clients | [Effect RPC](/cloudflare/apis/effect-rpc) for Effect clients, [Effect HTTP API](/cloudflare/apis/effect-http-api) for plain HTTP |
82 | Real-time / WebSockets | [Durable Objects](/cloudflare/compute/durable-objects) — see [Accept WebSockets](/cloudflare/compute/hibernatable-websockets) |
83 | Full-stack app | [Worker](/cloudflare/compute/workers) + a React SPA — see [Add a React SPA](/cloudflare/frontend/vite-spa) or [Frontend frameworks](/cloudflare/frontend/frontends) |
84 | Background jobs | [Queues](/cloudflare/messaging/queues) |
85 | Event log with replay | [K2 streams](/cloudflare/messaging/k2) |
86 | Analytics events as tables | [Pipelines](/cloudflare/data/pipelines) → [Iceberg tables](/cloudflare/data/iceberg-tables) |
87 | Postgres-backed API | [Hyperdrive](/cloudflare/data/hyperdrive) + [Drizzle](/cloudflare/data/drizzle) |
88 | Durable multi-step jobs | [Workflows](/cloudflare/compute/workflows) |
89 | AI apps | [AI Gateway](/cloudflare/ai/ai-gateway), [Effect AI](/cloudflare/ai/effect-ai), [AI Search](/cloudflare/ai/ai-search) |
90 | App on your own domain | [Domains & DNS](/cloudflare/networking/domains) — see [Custom domains & routes](/cloudflare/networking/custom-domains) |
91 | Production observability | [Ship Worker telemetry to Axiom](/cloudflare/observability/axiom-observability) |
92
93 For frontends, alchemy is Workers-first: Pages resources exist, but
94 static assets served from a [Worker](/cloudflare/compute/workers) is the
95 recommended path.
96
97 ## Where next
98
99 - [Setup](/cloudflare/setup) — install alchemy and connect your
100 Cloudflare account.
101 - [Tutorial](/cloudflare/tutorial/part-1) — from empty directory to a
102 deployed Worker with tests, stages, and CI.
103 - [Custom domains & routes](/cloudflare/networking/custom-domains) — put
104 your Worker on a domain you own.
105 - [Ship Worker telemetry to Axiom](/cloudflare/observability/axiom-observability) —
106 datasets, ingest tokens, and monitors in the same Stack as the Worker.
107 - [API reference](/providers) — every Cloudflare resource and binding.
108
109 ## Everything else
110
111 The blocks above are what most apps are built from, but coverage goes
112 much further: the zero-trust and zone-security long tail — roughly 60
113 more services, produced by the resource factory — ships as
114 reference-only documentation in the [API reference](/providers).