Orientation for contributors to this Astro 5 + bindings Hello World example for Webflow Cloud. Keep this file current when structure or workflows change.
A minimal, branded Hello, world page built with Astro 5 (SSR via
@astrojs/cloudflare) and deployed on Cloudflare Workers via Webflow Cloud.
This is the bindings variant — it wires up all four Cloudflare bindings
provisioned by Webflow Cloud (D1, KV Sessions, KV Flags, R2) and renders live
status cards.
The page shows:
- Webflow brand hero + gradient logo
- A curated set of Webflow Cloud doc cards
- A live BindingsStatus block pinging D1, KV, and R2 via
/api/binding-status
- Framework: Astro 5 with
@astrojs/cloudflareadapter (SSR) - Styling: Tailwind v3 (
@astrojs/tailwind) +wf-*brand tokens - Deploy target: Cloudflare Workers via Webflow Cloud (
wrangler.json) - Bindings:
DB(D1),SESSIONS+FLAGS(KV),MEDIA(R2)
src/
pages/
index.astro ← hero, DOC_LINKS, <BindingsStatus />
api/binding-status.ts ← Astro endpoint: pings D1, KV, R2
layouts/Layout.astro
components/
WebflowLogo.astro
DocCard.astro
BindingsStatus.astro ← client-side fetch of /api/binding-status
styles/global.css ← Tailwind + .wf-* design tokens
drizzle/ ← D1 migrations
astro.config.mjs
tailwind.config.mjs
wrangler.json ← bindings declaration
package.json
npm install
npm run dev # astro dev — bindings stubbed unless platformProxy fires
npm run dev:cf # astro build && wrangler pages dev ./distnpm run buildBuild output lands in dist/.
Declared in wrangler.json:
| Binding | Kind | Purpose |
|---|---|---|
DB |
D1 | SQL database (Drizzle migrations in drizzle/) |
SESSIONS |
KV | Session store |
FLAGS |
KV | Feature flags |
MEDIA |
R2 | Object storage |
Webflow Cloud provisions these on deploy — you don't manage them manually.
src/pages/api/binding-status.ts performs a cheap read/write against each
binding and returns per-binding status + latency.
Seed D1 locally:
npm run db:setup- Page content (hero, CTAs, doc cards):
src/pages/index.astro - Doc card list: search for
DOC_LINKSinsrc/pages/index.astro - Bindings status cards:
src/components/BindingsStatus.astro - Health-check endpoint:
src/pages/api/binding-status.ts - Brand tokens and
.wf-*styles:src/styles/global.css
- Push this repo to GitHub.
- In your Webflow Cloud project, connect the repo and pick a mount path
(e.g.
/my-app). The app runs under any prefix. - Webflow Cloud builds with
npm run buildand provisions all bindings fromwrangler.jsonautomatically on deploy.
See Deployments and Environments.
- Keep the Webflow brand tone: blue gradient (
#4353FF→#146EF5), dark background, minimal copy. Reuse the existing.wf-*CSS tokens. - This is a Hello World. Do not add extra pages, client-state libraries, or UI kits. Small and readable beats clever.
- Run
npm run buildbefore opening a PR. - Keep cross-app parity: if you change shared copy or doc links, update
the sibling
hello-world-*-app[-bindings]apps too.