Dafthunk - Open-Source Visual Workflows on Cloudflare
Dafthunk is an MIT-licensed visual workflow editor that runs on Cloudflare Workers, with built-in AI nodes for image gen, summarization, and TTS.
TL;DR
TL;DR: Dafthunk is an MIT-licensed, open-source visual workflow editor that runs entirely on Cloudflare Workers, D1, and R2 — letting you wire together AI models, image generation, translation, and TTS into durable serverless pipelines without touching Docker or a VPS.
Source and Accuracy Notes
- Official site: dafthunk.com
- GitHub: github.com/dafthunk-com/dafthunk (85 stars at time of writing, MIT licensed)
- Show HN launch: HN #44394492 — 15 points, June 2025
- Product Hunt: dafthunk
Dafthunk is a small, active project (last commit June 2026) maintained by a student-led team. The platform is genuinely production-shaped — durable execution, persistent storage, real AI integrations — but the documentation and templates surface are still rough compared to n8n or Zapier. Treat this as a builder’s tool, not a finished product.
What Is Dafthunk?
Dafthunk is a browser-based, node-graph workflow editor for building automation pipelines that run on Cloudflare’s edge platform. You drag and drop nodes representing inputs (text, image, audio), AI models (Cloudflare AI, Anthropic, OpenAI, Google, Stable Diffusion XL, M2M100 translation, MeloTTS speech synthesis), and integrations (HTTP webhooks, cron, email, queues) onto a React Flow canvas, connect them with edges, and save the result as a durable workflow.
The whole stack — editor, execution engine, storage, scheduling — runs on Cloudflare infrastructure:
# Cloudflare products Dafthunk uses
- Cloudflare Workers # Serverless function execution
- Cloudflare Workflows # Durable orchestration
- Cloudflare D1 # SQLite-compatible storage
- Cloudflare R2 # Object storage
- Cloudflare KV # Key-value cache
- Cloudflare AI # Built-in inference (Llama, SDXL, Whisper)
- Cloudflare Queues # Reliable message processing
- Cloudflare Analytics # Workflow telemetry
The project is MIT-licensed, with no enterprise tier, no fair-code carve-outs, and the explicit promise that the entire stack is yours to fork, run, and modify. Workflows scale to zero when idle and up with traffic, and durable execution survives Worker restarts and retries — long-running batch jobs don’t die mid-flight when an edge node goes down.
Setup Workflow
Dafthunk is a hosted platform — you sign up at dafthunk.com and build workflows in the browser. If you want to self-host it on your own Cloudflare account, the process looks like this:
Step 1: Clone and install
git clone https://github.com/dafthunk-com/dafthunk.git
cd dafthunk
pnpm install
The repo is a pnpm workspace with separate packages for the API, the editor, and shared types. The project uses TypeScript end-to-end and Vitest for unit tests.
Step 2: Configure Cloudflare credentials
# Local dev uses wrangler for the Workers runtime
pnpm --filter apps/api dev
pnpm --filter apps/web dev
# For production deploy, set secrets in your Cloudflare account:
wrangler secret put CLOUDFLARE_ACCOUNT_ID
wrangler secret put CLOUDFLARE_API_TOKEN
wrangler secret put CLOUDFLARE_AI_TOKEN
The default wrangler.toml binds D1, R2, KV, and AI bindings — you can either reuse the hosted Dafthunk Cloudflare account or provision your own resources and point the bindings at them.
Step 3: Apply database migrations
pnpm --filter apps/api db:migrate
This runs the D1 migrations that create the workflow, execution, and audit log tables. D1 is SQLite-compatible, so you can inspect the schema with wrangler d1 execute --local.
Step 4: Run a workflow
Open the editor at http://localhost:5173, drag a Text Area node and a Stable Diffusion XL Base node onto the canvas, connect the text output to the prompt input, then hit run. The image will be generated by Cloudflare AI and persisted in R2 — you’ll see it appear in the live execution panel.
Step 5: Trigger via webhook
curl -X POST https://api.dafthunk.com/webhooks/<workflow-id> \
-H "Content-Type: application/json" \
-d '{"variable": "A small island with a green palm tree"}'
Webhooks, cron schedules, and email triggers are all wired into the runtime — the same workflow can be invoked from a CI pipeline, a schedule, or an inbound email.
Deeper Analysis
Where Dafthunk fits in the workflow landscape
The visual workflow space is crowded. n8n is the de facto open-source standard, with 60K+ stars and a deep integration library. Zapier is the SaaS incumbent. Pipedream, Temporal, Inngest, and a half-dozen newer entrants all claim some part of the durable-execution / event-driven automation wedge.
Dafthunk’s distinctive bet is “the entire stack is one Cloudflare account”. There’s no Docker, no Kubernetes, no Postgres to provision, no VPS to patch. The tradeoff is that you inherit Cloudflare’s limits — D1’s 10GB database cap, Workers’ CPU time limits, R2’s pricing model — and you can’t easily move the workflows to AWS or GCP without rewriting the runtime.
That tradeoff is also the appeal. For solo developers and small teams building AI-powered automation, “spin up a Cloudflare account, sign in, and ship” is dramatically less friction than “stand up n8n on a Hetzner box, configure Postgres, set up backups, monitor the Worker processes”. Dafthunk’s hosted version is essentially “n8n-as-a-service on Cloudflare”.
AI nodes that actually work
The shipped node library isn’t huge — around 470 workflow nodes, 30+ AI models, and 12+ integrations as of writing — but the ones that exist are wired up correctly and produce real outputs. The example workflow in the README chains:
- Canvas Doodle (input: sketch) → UForm Gen2 Qwen 500M (image captioning) → Single Variable String Template (prompt assembly) → Stable Diffusion XL Base (image generation) → BART Large CNN (summary) → M2M100 1.2B (translation) → MeloTTS (audio narration)
This is a real multimodal pipeline — sketch to description to enhanced image to summary to translated speech — running end-to-end on Cloudflare AI. Most workflow tools at this layer would have you writing custom HTTP request nodes for the AI inference. Dafthunk treats each model as a first-class node with typed inputs and outputs.
Durability and observability
Cloudflare Workflows is the secret weapon. Each Dafthunk execution is a durable workflow step — if a Worker crashes mid-execution, the next one resumes from the last persisted state instead of starting over. For long-running batch jobs (image generation, large file processing, multi-step AI pipelines) this is the difference between “lost 4 hours of work” and “picked up where we left off”.
The execution history is queryable via the UI and the API, with stored state in D1, generated artifacts in R2, and analytics events in Workers Analytics Engine. For a project with no dedicated observability stack, that’s a lot of visibility for free.
Honest limits
Dafthunk is not n8n. The integration library is small — there are nodes for the major AI providers and the most common APIs, but if you need a Salesforce connector or a specific ERP integration, you’ll be writing custom code. The error handling is functional but not granular — failed steps retry with exponential backoff, but you can’t easily add branching logic for “if this step fails, do X”.
The community is also small (85 GitHub stars, ~50 Discord members from the launch post) compared to the workflow-tool mainstream. Documentation is sparse, the editor’s UX has rough edges (no undo/redo, limited keyboard shortcuts), and there’s no marketplace for sharing workflows. If you’re building a serious production pipeline, plan to fork and contribute back.
Practical Evaluation Checklist
Before you adopt Dafthunk for a real project, walk through this:
- [ ] Do you need durable serverless execution? If yes, Dafthunk is one of the few open-source options that gets this right out of the box. If you just need a Zapier replacement for “post to Slack when X happens”, n8n Cloud is more mature.
- [ ] Are you comfortable with Cloudflare’s ecosystem? The win condition is “everything lives in one CF account”. If you need multi-cloud portability, the abstraction is too thin.
- [ ] Is your integration list covered? Check the node library for the APIs and services you need. Custom nodes are possible (the codebase is open) but each one is real work.
- [ ] Have you budgeted for AI inference costs? Cloudflare AI has a free tier, but production Stable Diffusion XL usage will burn through it fast. The pricing model is per-request, not per-second.
- [ ] Is the team willing to contribute back? The project accepts PRs, and a 4-5 person team can realistically maintain a fork. If you need a vendor with an SLA and a support contract, this isn’t it yet.
Security Notes
Dafthunk runs workflows on Cloudflare’s edge network, so the infrastructure is as secure as Workers itself. The risks are application-level:
- API tokens and secrets: Stored as Cloudflare Worker secrets (encrypted at rest), accessible only to the running Workflow. Don’t put secrets in workflow node configuration text — they will be visible in the execution logs.
- Webhook endpoints: Publicly accessible by default. Use the workflow’s built-in auth (HMAC signature verification) or front it with Cloudflare Access for production.
- Execution data: Stored in D1 (your Cloudflare account) and R2 (also your account). If you self-host, you’re responsible for backups and access controls.
- Generated content: AI-generated images and audio are stored in R2 with public-read URLs by default. If you’re processing sensitive data, configure R2 buckets with signed URLs and tight IAM policies.
- Dependency surface: The codebase uses standard npm packages — audit with
pnpm auditand pin versions in your fork. No exotic native dependencies that would expand the supply chain risk.
The MIT license means you can audit, fork, and harden the entire stack yourself. That’s a real security advantage over closed-source workflow tools where you’re trusting the vendor’s implementation.
FAQ
Q: Is Dafthunk really free to self-host? A: Yes, the code is MIT-licensed and the Cloudflare free tier covers small workloads. For production usage, you’ll pay Cloudflare’s standard rates for Workers, D1, R2, and AI inference — there is no separate Dafthunk license fee.
Q: How does it compare to n8n? A: n8n is more mature, with 60K+ stars, a much larger integration library, and self-hosting on your own infrastructure. Dafthunk’s edge is “all-in-one Cloudflare account, no Docker, no VPS” and built-in AI node types. For pure automation without AI, n8n wins. For AI-heavy pipelines where you want minimal infrastructure, Dafthunk is worth trying.
Q: Can I import my n8n workflows? A: No, there’s no migration tool. The workflow format is different (React Flow JSON vs n8n’s node config) and the node types don’t map 1:1. Plan to rebuild workflows from scratch.
Q: Does it support on-prem LLM models? A: Only via Cloudflare AI’s hosted models or by routing through external HTTP nodes. If you have a self-hosted Llama or vLLM endpoint, you can call it from an HTTP node but it won’t show up as a first-class AI node in the editor.
Q: Is the hosted version stable enough for production? A: It depends on your definition of production. The runtime is stable (it’s Cloudflare Workflows underneath), but the editor UX is rough and the integration library is small. For a personal project or internal tool, yes. For a customer-facing product with an SLA, fork it and budget for maintenance.
Conclusion
Dafthunk is a small, opinionated bet on a specific stack: visual workflow editor, durable serverless execution, AI-native node types, MIT-licensed, all running on one Cloudflare account. It’s not trying to be n8n or Zapier — it’s trying to be the workflow tool that ships with Cloudflare.
For builders who already use Cloudflare Workers and just want to wire up some AI pipelines without standing up another VPS, Dafthunk is a genuinely useful tool. The 85-star GitHub repo understates the project’s quality — the architecture is sound, the AI integrations work, and the team is shipping actively. It’s a foundation to build on, not a finished product to deploy.
If you’re starting a new project and your infrastructure choice is still open, sign up for dafthunk.com, build a 3-node workflow, and see if the abstraction holds. If it does, you just saved yourself a Kubernetes cluster.
Related Posts
dev-tools
Automotive Skills Suite for AI Engineering
Evaluate Automotive Skills Suite for APQP, ASPICE, HARA, safety-plan, and DIA workflows with setup notes, governance risks, and SME review guidance.
5/28/2026
dev-tools
awesome-agentic-ai-zh Roadmap Guide
Explore awesome-agentic-ai-zh as a Chinese agentic AI learning roadmap, with setup notes, track selection, study workflow, and evaluation guidance.
5/28/2026
dev-tools
Baguette iOS Simulator Automation Guide
Set up Baguette for iOS Simulator automation, web dashboards, device farms, gesture input, streaming, and camera testing with Xcode caveats.
5/28/2026