zfb
GitHub repository

Type to search...

to open search from anywhere

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.

ExampleRenderingBindings and secretsStylingLinks
AI SummarizerSSG plus one prerender = false API route (adapter)Workers AI AI, declared only in the named ai environmentTailwind v4repo · demo
JSON APISSG plus two prerender = false API routes (adapter)noneTailwind v4repo · demo
KV GuestbookSSR for every route except /404 (adapter)Workers KV GUESTBOOK, ADMIN_TOKEN secretTailwind v4repo · demo
Password GatePure SSG behind a hand-written Worker, run_worker_first = true, no adapterSITE_PASSWORD secretTailwind v4repo · demo
Reverse ProxySSG plus one catch-all prerender = false route (adapter)none, one public PROXY_ORIGIN varTailwind v4repo · demo
WebshopSSR on every route, no HTML emitted (adapter)D1 DBTailwind v4repo · demo
Workers CacheSSR on every route, no HTML emitted (adapter)PURGE_TOKEN secretTailwind v4repo · 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.

ExampleRenderingBindings and secretsStylingLinks
BlogPure SSG, assets-only WorkernoneTailwind v4repo · demo
Corporate WebsitePure SSG, assets-only WorkernoneCSS Modules, tailwind: { enabled: false }repo · demo

Revision History

CreatedUpdated