Examples
A comparison matrix of the nine standalone Cloudflare Workers repositories that demonstrate zfb in real, deployable projects.
zfb ships nine standalone example repositories, each one a small, deployable project that demonstrates a single Cloudflare recipe end to end. Every repo is independently pnpm install-able and includes its own README with local run steps and Cloudflare provisioning commands — clone one to see the whole thing assembled rather than copying snippets piecemeal.
This page is the comparison matrix. Each row links to a full walkthrough under Recipes, which explains what that example demonstrates, how it works, and how to run it locally.
All nine deploy as Cloudflare Workers on takazudomodular.com subdomains. Seven ship server code; two are assets-only Workers that serve a static build and run no Worker script at all.
password-gate answers 401 by design
Every demo below is deployed and live, with one deliberate exception:zfb-example-password-gate.takazudomodular.comanswers 401 Unauthorized with a login page instead of showing you a site. That is the example working — gating the content is its entire point.
Worker-backed examples
These seven emit or hand-write a Worker script that runs on every request they own. Six use @takazudo/zfb-adapter-cloudflare to run prerender = false routes — the pattern covered in SSR and Cloudflare Bindings. The seventh, password-gate, installs no adapter and puts a Worker of its own in front of a static build.
| Example | Rendering | Bindings and secrets | Styling | Links |
|---|---|---|---|---|
| AI Summarizer | SSG plus one prerender = false API route (adapter) | Workers AI AI, declared only in the named ai environment | Tailwind v4 | repo · demo |
| JSON API | SSG plus two prerender = false API routes (adapter) | none | Tailwind v4 | repo · demo |
| KV Guestbook | SSR for every route except / (adapter) | Workers KV GUESTBOOK, ADMIN_TOKEN secret | Tailwind v4 | repo · demo |
| Password Gate | Pure SSG behind a hand-written Worker, run_worker_first = true, no adapter | SITE_PASSWORD secret | Tailwind v4 | repo · demo |
| Reverse Proxy | SSG plus one catch-all prerender = false route (adapter) | none, one public PROXY_ORIGIN var | Tailwind v4 | repo · demo |
| Webshop | SSR on every route, no HTML emitted (adapter) | D1 DB | Tailwind v4 | repo · demo |
| Workers Cache | SSR on every route, no HTML emitted (adapter) | PURGE_TOKEN secret | Tailwind v4 | repo · demo |
Static examples
These two deploy the dist/ directory as Workers Static Assets with no Worker script: wrangler.toml carries an [assets] table and deliberately no main key, and @takazudo/zfb-adapter-cloudflare is not a dependency. They are the shape to copy when a site needs no server code at all.
| Example | Rendering | Bindings and secrets | Styling | Links |
|---|---|---|---|---|
| Blog | Pure SSG, assets-only Worker | none | Tailwind v4 | repo · demo |
| Corporate Website | Pure SSG, assets-only Worker | none | CSS Modules, tailwind: { enabled: false } | repo · demo |