Skip to content

dkritarth/FreeFlow

Repository files navigation

FreeFlow

Publish AI-generated HTML plans, mockups, and idea boards to your own edge infrastructure — no third-party host, no vendor lock-in.

License: MIT

The story

The idea started from watching Theo Browne — the person behind the T3 stack, t3.gg, and t3.chat — build things that let you go from "AI generated this" to "here's a live link" in seconds. That instant-publish loop, where a generated artifact becomes a shareable URL with zero deploy ceremony, is genuinely great UX. But every version of it I'd seen lived on someone else's servers, under someone else's terms.

I wanted the same loop, minus the "someone else's servers" part. Claude, Codex, and every other coding agent I use can already generate a complete, self-contained HTML plan or mockup in one shot — what they can't do is put it somewhere without me copy-pasting into a gist or standing up a whole app. FreeFlow closes that gap: a Cloudflare Worker you deploy once, and a one-line CLI any agent can call to turn a local HTML file into a live URL on infrastructure you own.

What it is

Two small pieces:

  • A Cloudflare Worker + KV backend (src/index.js) — the edge gateway. POST /upload stores an HTML draft (bearer-token authenticated, optional PIN lock); GET /d/<id> serves it back, byte-for-byte, from the edge.
  • A Node CLI, dkraft-publish (cli/) — reads a local HTML file, uploads it, prints back the live URL. That's the entire publish flow.

No build step on the served content, no bundler, no database beyond Workers KV. You deploy it to your own Cloudflare account, so the data, the domain, and the uptime are all yours.

Quick Start

  1. Copy the config template and fill in your own KV namespace IDs:
cp wrangler.toml.example wrangler.toml
wrangler kv namespace create HTML_DRAFTS
wrangler kv namespace create HTML_DRAFTS --preview
wrangler kv namespace create UPLOAD_RATE_LIMITS
wrangler kv namespace create UPLOAD_RATE_LIMITS --preview
# paste the returned ids into wrangler.toml
  1. Set the worker secret:
wrangler secret put SECRET_API_KEY
  1. Deploy:
npm install
npm run worker:deploy

Publishing a draft

The CLI is published on npm as freeflow-dkraft-publisher — no local checkout needed, install it directly:

npm install -g freeflow-dkraft-publisher
# or run it ad hoc without installing:
npx freeflow-dkraft-publisher ./plan.html

Then:

export DK_PUBLISH_KEY="<your SECRET_API_KEY>"
export DK_PUBLISH_URL="https://<your-worker-domain>"

dkraft-publish ./templates/plan-template.html --secure 1234

Prints back https://<your-worker-domain>/d/<id>. Drop --secure <pin> for a public draft; with it, viewers hit an edge lock screen and unlock with ?key=<pin>.

Giving This to an Agent

.claude/skills/freeflow-publish/SKILL.md documents the full publish workflow — draft requirements, credential checks, the CLI invocation, and a troubleshooting map for every CLI error string. Claude Code auto-discovers it from this repo. Any other agent (Codex, etc.) can be pointed at the same file directly and follow it as plain-language instructions; nothing in it is Claude-specific beyond the frontmatter.

Repository Layout

  • /wrangler.toml.example — Cloudflare Worker configuration template. Copy to wrangler.toml (git-ignored) and fill in your own KV IDs.
  • /src/index.js — Edge gateway logic for secure upload + rendering.
  • /cli — npm CLI package for local file upload (dkraft-publish), published as freeflow-dkraft-publisher.
  • /templates/plan-template.html — High-density interactive planning template.
  • /.claude/skills/freeflow-publish — Agent skill teaching Claude Code (or any agent that reads SKILL.md as plain instructions) how to publish drafts through this CLI.
  • /docs — Source for the project's GitHub Pages site.

License

MIT — see LICENSE.

About

Publish AI-generated HTML plans, mockups, and idea boards to your own Cloudflare Worker — self-hosted, no vendor lock-in. One CLI command turns a local HTML file into a live URL.

Topics

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages