A React-based visual workflow editor built with React Flow, inspired by n8n. Create, edit, and export complex workflows using a drag-and-drop interface with custom node types.
- Visual Workflow Canvas: Drag-and-drop interface powered by React Flow
- Custom Node Types: Extensible node system defined by JSON schemas
- Parameter Editing: Click nodes to edit their parameters in a dedicated panel
- Export/Import: Save workflows as JSON files and load them later
- Categorized Node Palette: Organized by functionality (data, communication, logic, etc.)
- TypeScript Support: Fully typed for better development experience
- Node.js (v14 or later)
- npm or yarn
- Clone the repository:
git clone <repository-url>
cd workflow-editor- Install dependencies:
npm install- Start the development server:
npm startThe application will open at http://localhost:3000 (or the next available port).
- Browse Node Palette: The left sidebar contains all available node types organized by category
- Filter by Category: Use the dropdown to filter nodes by category (data, communication, logic, etc.)
- Add Node: Click any node type to add it to the canvas
- Select Node: Click any node on the canvas to select it
- Edit Parameters: The right panel will show all configurable parameters for the selected node
- Parameter Types: Support for various input types:
- Text inputs
- Number inputs
- Dropdowns/Select
- Textareas for longer text
- JSON objects
- Arrays (one item per line)
- Checkboxes for boolean values
- Drag from Handles: Click and drag from output handles (right side) to input handles (left side)
- Handle Types: Color-coded by connection type:
- 🟡 Orange: Trigger connections
- 🟢 Green: Data connections
- 🔴 Red: Error connections
- Naming: Edit the workflow name in the top toolbar
- Export: Click "💾 Export" to download the workflow as a JSON file
- Import: Click "📁 Import" to load a previously saved workflow
- Clear: Click "🗑️ Clear" to start fresh (with confirmation)
The application includes several built-in node types:
- HTTP Request: Make API calls with configurable methods, headers, and body
- Database Query: Execute SQL queries with connection and timeout settings
- Email Sender: Send emails using templates or custom content
- Condition: Route workflow execution based on conditional logic
Node types are defined as JSON files in src/data/nodeTypes/. Each file defines:
{
"id": "unique-node-id",
"name": "Display Name",
"description": "What this node does",
"category": "data|communication|logic|etc",
"icon": "🌐",
"color": "#3b82f6",
"inputs": [
{
"id": "input-id",
"name": "Input Name",
"type": "trigger|data|error"
}
],
"outputs": [
{
"id": "output-id",
"name": "Output Name",
"type": "trigger|data|error"
}
],
"parameters": [
{
"id": "param-id",
"name": "Parameter Name",
"type": "string|number|boolean|select|textarea|object|array",
"required": true,
"default": "default-value",
"placeholder": "Placeholder text",
"options": ["option1", "option2"] // for select type
}
]
}- Create a new JSON file in
src/data/nodeTypes/ - Import it in
src/features/workflow/hooks/useNodeTypes.ts - Add it to the
nodeTypesarray
src/
├── components/ # Shared components
├── features/
│ └── workflow/
│ ├── components/ # Workflow-specific components
│ ├── hooks/ # React hooks and context
│ └── types/ # TypeScript type definitions
├── data/
│ └── nodeTypes/ # Node type JSON definitions
└── types/ # Global TypeScript types
- React with TypeScript
- React Flow for the visual editor
- Context API for state management
- CSS-in-JS for styling
- UUID for unique identifiers
Workflows are exported as JSON with the following structure:
{
"id": "workflow-uuid",
"name": "Workflow Name",
"description": "Optional description",
"nodes": [...],
"edges": [...],
"createdAt": "ISO-date",
"updatedAt": "ISO-date",
"version": "1.0.0"
}This format is designed to be consumed by Rails applications or other backend systems.
Runs the app in the development mode.
Open http://localhost:3000 to view it in the browser.
Launches the test runner in the interactive watch mode.
Builds the app for production to the build folder.
It correctly bundles React in production mode and optimizes the build for the best performance.
Note: this is a one-way operation. Once you eject, you can't go back!
If you aren't satisfied with the build tool and configuration choices, you can eject at any time.
- Add new node types by creating JSON schema files
- Extend the parameter input types in
ParameterPanel.tsx - Add new connection types by updating the TypeScript types
This project is licensed under the MIT License.