A modern visual AI workflow builder built with Next.js, Vercel AI SDK, React Flow, and Neon Database.
- 🎨 Visual workflow editor with drag-and-drop blocks
- 🤖 AI-powered blocks (Summarize, Translate, Generate Text, etc.)
- 🔗 Connect blocks to create complex workflows
- 💾 Save and load workflows from Neon database
- ⚡ Execute workflows with Vercel AI SDK
- 🗨️ AI chat assistant to create/modify workflows (Lovable/Base44 style)
- 📥 Execution input dialog before running
- 📊 Live execution progress with polling
- 🧾 Execution results viewer with per-block input/output
- 🕓 Execution history with status and details
- 🗑️ Delete workflows with confirmation dialog
- Next.js 16 - App Router
- Vercel AI SDK v5 - AI streaming and orchestration
- React Flow - Visual workflow editor
- ShadCN UI - Modern UI components
- Neon Database - PostgreSQL database
- Drizzle ORM - Type-safe database queries
- TypeScript - Type safety
- uuid - Stable IDs for blocks and connections
npm installCreate a .env.local file in the root directory:
# Neon Database Connection
DATABASE_URL=postgresql://neondb_owner:[email protected]/neondb?sslmode=require
# OpenAI API Key
OPENAI_API_KEY=sk-your-openai-api-key-hereThe database schema is already set up in Neon. The migration includes:
workflows- Workflow definitionsblocks- Workflow blocksconnections- Connections between blocksworkflow_runs- Execution historyblock_executions- Individual block execution results
npm run devOpen http://localhost:3000 in your browser.
- Click "New Workflow" to create a new workflow
- Enter a name and optional description
- Click "Create" to start building
- Use the block palette on the left to add blocks
- Click "Add Block" on any block type
- Blocks will appear on the canvas
- Click on a block to open the configuration dialog
- Set the prompt, model, temperature, and other parameters
- Click "Save" to apply changes
- Drag from the output handle (bottom) of a block
- Connect to the input handle (top) of another block
- Blocks will execute in sequence based on connections
- Click "Save Workflow" to save your changes
- Click "Execute" to open the input dialog
- Provide input text and start the run
- Watch progress in real time
- View the results in the Results viewer (per block input/output)
- Review past runs in the History tab
- Use the Chat tab to ask the AI to create or modify workflows.
- The AI can add blocks, rewire connections, and configure prompts/models.
- Changes are reflected live in the editor and can be saved.
- Summarize - Summarize text content
- Translate - Translate text to another language
- Generate Text - Generate text using AI
- Generate Image - Generate images (coming soon)
- Extract - Extract information from text
- Format - Format and structure data
GET /api/workflows- List all workflowsPOST /api/workflows- Create a new workflowGET /api/workflows/[id]- Get workflow details (with blocks and connections)PUT /api/workflows/[id]- Update workflow, blocks, and connectionsDELETE /api/workflows/[id]- Delete workflowPOST /api/workflows/[id]/execute- Execute workflowGET /api/workflows/[id]/runs- List runs for a workflowGET /api/workflows/[id]/runs/[runId]- Run details with block executionsPOST /api/chat- AI chat assistant for workflow edits
See lib/schema.ts for the complete database schema definition.
├── app/
│ ├── api/ # API routes
│ ├── page.tsx # Main page
│ └── layout.tsx # Root layout
├── components/ # React components
│ ├── ui/ # ShadCN UI components
│ ├── workflow-editor.tsx
│ ├── block-palette.tsx
│ ├── block-config-dialog.tsx
│ ├── ai-chat.tsx
│ ├── execution-input-dialog.tsx
│ ├── execution-results-viewer.tsx
│ └── execution-history.tsx
├── lib/
│ ├── db.ts # Database connection
│ ├── schema.ts # Database schema
│ └── types.ts # TypeScript types
└── public/ # Static assets
- Add image generation support
- Real-time server-sent events for block streaming
- Add user authentication
- Add workflow templates
- Add conditional logic blocks
- Integrate with Modal.com for backend processing
MIT