π Production Ready! A fully functional browser automation platform powered by Cloudflare.
- β Cloudflare Workers API (Hono) + D1 database + R2 storage
- β Cloudflare Pages UI (React + Vite)
- β Real browser automation via Cloudflare Browser Rendering + Puppeteer
- β Visual overlays (highlights & captions) during execution
- β Screenshot capture for every step
- β SRT subtitle generation from narrations
- β Element locator resolution with fallback chain
- β Clerk authentication with JWT verification
- β Lemon Squeezy billing integration
- β Flow Builder - Visual drag-and-drop flow creation
- β Element Mapper - Click-to-select element picker with auto-locator generation
- β Project Manager - Organize projects, screens, and elements
- β Cookie Manager - Auth profiles for protected applications
- β Live Progress - Real-time step-by-step execution updates
- β Screenshot Gallery - View and download captured screenshots
- β Error Display - Detailed error information with retry
- Basic: goto, caption, click, fill, highlight, waitFor, pause
- Advanced: selectRow, assertText, screenshot, scroll, hover, select, setCookies
Documentation: See FEATURES.md for complete feature docs and DEPLOYMENT.md for production setup.
coderail-flow/
ββ apps/
β ββ api/ # Cloudflare Worker (Hono) + D1 + R2
β β ββ src/
β β β ββ runner.ts # π Real execution engine
β β β ββ index.ts # API routes
β β ββ migrations/ # D1 SQL migrations
β β ββ wrangler.toml # π Browser Rendering configured
β ββ web/ # Cloudflare Pages UI (React + Vite)
ββ packages/
β ββ dsl/ # Flow DSL schema + validation (Zod)
β ββ overlay/ # Browser overlay library (built)
β ββ runner/ # π Execution engine (Puppeteer)
β ββ src/
β ββ executor.ts # Main flow executor
β ββ locator.ts # Element resolution
β ββ subtitle.ts # SRT generation
β ββ r2.ts # R2 artifact upload
ββ pnpm-workspace.yaml # π Workspace configuration
ββ PHASE1_COMPLETE.md # π Implementation summary
ββ QUICKSTART.md # π Quick start guide
See QUICKSTART.md for detailed setup instructions.
- Node.js 20+
npm i -g pnpm wrangler- Cloudflare account (free tier works)
pnpm install
cd packages/overlay && pnpm run build && cd ../..wrangler login
wrangler d1 create coderail-flow-db
# Copy database_id to apps/api/wrangler.toml
cd apps/api
pnpm run migrate # Apply migrations
cd ../..
wrangler r2 bucket create coderail-flow-artifacts # Optional# Terminal 1: API
cd apps/api && pnpm run dev
# Terminal 2: Web UI
cd apps/web && pnpm run devOpen http://localhost:5173 and run the demo flow!
"Explain a Failed Card Transaction" (13 steps)
- Navigates through admin dashboard
- Searches for card ID
- Highlights error codes
- Shows explanatory captions
- Generates SRT subtitles
- Captures per-step screenshots
Migration 0004_demo_flow.sql creates the full demo with screens, elements, and flow definition.
GET /health- Liveness endpoint with readiness summaryGET /health/ready- Readiness endpoint for load balancers / deploy checksGET /flows- List flowsPOST /runs- Execute flow (real browser automation!)GET /runs- List runsGET /runs/:id- Get run detailsGET /artifacts/:id/download- Download artifactsPOST /projects- Create projectPOST /screens- Create screen mappingPOST /elements- Create element locator
# Run all unit tests
pnpm test
# Run with coverage report
pnpm test:coverage
# Watch mode
pnpm test -- --watchWhat's covered (171+ tests):
- API routes:
flows,runs,resources,analytics - Security:
pii-redaction,encryption,encryption-keys
The web dev server is automatically started before tests run. The API server is not required β API health tests skip gracefully when the API is unreachable.
# Run all E2E tests (headless, starts web server automatically)
pnpm test:e2e
# Run with browser UI visible
pnpm test:e2e:headed
# Interactive Playwright UI
pnpm test:e2e:ui
# Open the HTML report from the last run
pnpm test:e2e:reportE2E test files:
| File | What it tests |
|---|---|
e2e/landing.spec.ts |
Landing page renders, CTA links, no JS errors |
e2e/app.spec.ts |
/app page β app content or Clerk sign-in gate |
e2e/auth.spec.ts |
Protected routes accessible, unknown routes |
e2e/projects.spec.ts |
/projects and /billing pages |
e2e/api-health.spec.ts |
Local API health + security headers (skipped if API not running) |
e2e/api-health-auth.spec.ts |
Production API health + performance (skipped if unreachable) |
Auth-protected tests: When VITE_CLERK_PUBLISHABLE_KEY is set, all tests accept either the real app content or Clerk's sign-in gate, making them resilient to unauthenticated state. Set E2E_TEST_EMAIL + E2E_TEST_PASSWORD to run authenticated flows.
pnpm test:allpnpm run validate:productionAll core browser automation features are implemented:
- β Puppeteer integration with Cloudflare Browser Rendering
- β Locator resolution with fallback chain
- β Visual overlay injection (highlights + captions)
- β Per-step screenshot capture
- β SRT subtitle generation
- β R2 artifact upload pipeline
- β All 7 step types: goto, caption, pause, fill, click, waitFor, highlight
Total: ~1,180 lines of production code replacing a 32-line stub.
- Test End-to-End - Run demo flow against real applications
- Mapping Mode - Visual element picker UI
- Authentication - Cookie import/export for protected apps
- Workflows - Durable execution with Cloudflare Workflows
- Video Recording - Full video capture (CDP screencast)
- Advanced Steps - selectRow, assertText, screenshot
- Flow Builder UI - Visual flow creation interface
- RBAC - User management and access control
See PHASE1_COMPLETE.md for detailed implementation notes.