dev-tools 6 min read

Daf·thunk – Visual Workflow Automation on Cloudflare

An open-source visual workflow editor built on Cloudflare Workers, D1, R2, KV, and AI. Drag-and-drop workflow creation with AI-powered nodes, serverless execution, and MIT licensing.

By
Share: X in
Daf·thunk visual workflow editor product screenshot

TL;DR

TL;DR: Daf·thunk is an open-source, MIT-licensed visual workflow editor built on Cloudflare’s serverless stack. It lets you build AI-powered workflows by dragging nodes onto a canvas — no infrastructure to manage.

Source and Accuracy Notes

⚠️ This section is MANDATORY. All links must be verified from actual source, not guessed.

What Is Daf·thunk?

Daf·thunk is a browser-based visual workflow editor built on top of Cloudflare’s infrastructure. The name is a play on “thunk” — a computer science term for a function that delays computation — and “DAF,” the Dutch word for the car manufacturer, which the author references as a nod to a professor who drove one.

From the README:

Daf·thunk is a powerful, visual workflow automation platform that allows you to create, manage, and execute workflows directly in your browser. Built on Cloudflare’s infrastructure, it leverages Cloudflare Workers and Workflows for serverless execution, Cloudflare AI for intelligent processing, and Cloudflare D1, R2, and KV for persistent storage.

The platform uses React Flow for its node-based visual editor. Think digital LEGO for serverless workflows — connect AI processing nodes, HTTP triggers, data transformations, and storage operations into a directed graph, then deploy and run it on Cloudflare’s edge network.

Key Features

From the README:

  • Visual Workflow Editor — drag-and-drop interface built with React Flow
  • AI-Powered Nodes — Cloudflare AI integration for text summarization, sentiment analysis, translation, image classification, audio transcription, and image generation
  • Serverless Execution — runs on Cloudflare Workers and Workflows
  • Live Monitoring — real-time UI and API for watching workflow executions
  • Persistent Storage — Cloudflare D1 (SQLite) and R2 for data persistence
  • Triggers and Integrations — HTTP APIs, email, and more

Technology Stack

The stack is documented in the README:

Backend

  • Hono — lightweight REST API framework
  • Cloudflare Workers — serverless function execution
  • Cloudflare D1 — SQLite at the edge
  • Cloudflare R2 — object storage
  • Cloudflare AI — AI model inference
  • Drizzle ORM — type-safe database operations
  • Zod — runtime type validation

Frontend

  • Vite — build tool and dev server
  • React 19 — UI framework
  • React Router v7 — client-side routing
  • React Flow (@xyflow/react) — node-based diagram editor
  • Tailwind CSS — styling
  • shadcn/ui — accessible component primitives

Package Manager

  • pnpm — workspace-aware package management (not npm or yarn)

Setup Workflow

Prerequisites

  • Node.js v18 or later
  • pnpm v8 or later
  • A Cloudflare account with Workers, D1, R2, KV, and AI access

Step 1: Clone the Repository

git clone https://github.com/dafthunk-com/dafthunk.git
cd dafthunk

Step 2: Install Dependencies

pnpm install

Step 3: Configure Environment Variables

cp apps/api/.dev.vars.example apps/api/.dev.vars

Edit apps/api/.dev.vars with your values. Generate a master key:

node apps/api/scripts/generate-master-key.js

Required variables in .dev.vars:

WEB_HOST=http://localhost:3001
CLOUDFLARE_ENV=development
JWT_SECRET=your_jwt_secret_here
SECRET_MASTER_KEY=your_6_character_prefix_here

Step 4: Configure OAuth (GitHub)

Create a GitHub OAuth App at github.com/settings/applications/new:

  • Homepage URL: http://localhost:3000
  • Authorization callback URL: http://localhost:3002/auth/login/github

Add to .dev.vars:

GITHUB_CLIENT_ID=your_client_id_here
GITHUB_CLIENT_SECRET=your_client_secret_here

Google OAuth is also supported as an optional provider.

Step 5: Run the Development Server

pnpm dev

Deeper Analysis

Daf·thunk occupies an interesting space between no-code platforms like Zapier or n8n and infrastructure-as-code tools like Terraform or Pulumi. The visual editor lowers the barrier to entry, while the serverless Cloudflare backend means there is no servers to SSH into, no containers to manage, and no Kubernetes manifests to write.

The React Flow foundation is notable — it is a well-maintained open-source library with over 25,000 GitHub stars, and Daf·thunk uses the @xyflow/react package specifically. The node-and-edge model maps naturally to workflow orchestration: each node is a discrete unit of work (an AI call, a database write, an HTTP request), and edges define the data flow between them.

The MIT license and the fact it is a student-initiated project make it an interesting alternative to managed platforms. For developers already on Cloudflare, Daf·thunk leverages existing D1/R2/KV resources without requiring a separate workflow engine.

Practical Evaluation Checklist

  • Clone and run locally with pnpm install && pnpm dev
  • Connect a real Cloudflare account and provision D1/R2/AI resources
  • Build a simple AI workflow: trigger (HTTP) → AI text summarization → store in D1
  • Test live monitoring during execution
  • Verify OAuth login works with GitHub and Google
  • Check that workflow executions persist across page reloads

Security Notes

  • OAuth credentials are stored in .dev.vars (never commit this file)
  • JWT and master key encryption are generated locally
  • Workflows run on Cloudflare’s edge network — network-level security is handled by Cloudflare
  • For production deployment, review Cloudflare’s own security hardening guides for Workers and D1
  • The codebase uses Zod for runtime type validation on API inputs

FAQ

Q: Is this production-ready? A: The project is actively maintained and the architecture is sound, but as with any relatively new open-source project, thorough testing in a staging environment before production use is recommended.

Q: Does it require a credit card? A: Cloudflare’s free tier covers Workers, D1 (up to 100K rows), KV (up to 1GB), and AI (limited). The README notes “a Cloudflare account with Workers, D1, R2, KV, and AI access” — some features may require a paid plan at scale.

Q: How does it compare to n8n or Zapier? A: Unlike n8n or Zapier, Daf·thunk runs entirely on Cloudflare’s edge network with no self-hosted server required. It is MIT-licensed and open-source, whereas n8n has a proprietary licensing model for certain features.

Q: Can I self-host it outside Cloudflare? A: The architecture is tightly coupled to Cloudflare Workers and edge services. A full port would require significant rework.

Conclusion

Daf·thunk is a well-crafted open-source tool for developers who want visual workflow orchestration without managing servers. The Cloudflare-native stack means infrastructure concerns disappear, and the React Flow editor makes complex workflows tangible. It is MIT-licensed and actively developed on GitHub.

If you are already embedded in the Cloudflare ecosystem, Daf·thunk is worth evaluating for lightweight workflow automation tasks that do not require the full feature set of a managed platform like Temporal or Conductor.