A powerful visual workflow editor built with SvelteKit that enables drag-and-drop creation of complex workflows with AI integration, data processing, and automation capabilities.
- Visual Workflow Editor: Drag-and-drop interface for building complex workflows
- AI Integration: OpenAI, Anthropic, and other AI model integrations
- Data Processing: Advanced data manipulation and transformation nodes
- HTTP Integration: Webhook and API request capabilities
- File Operations: Upload, download, and file processing
- Conditional Logic: Advanced branching and decision-making nodes
- Real-time Execution: Live workflow execution with status monitoring
- SvelteKit Application: Full-featured web application with SSR support
- Node.js Server: Standalone server deployment
fd-node-demo/
βββ src/ # SvelteKit application source
β βββ routes/ # SvelteKit routes
β β βββ api/ # API endpoints
β β β βββ flowdrop/ # FlowDrop API
β β β βββ workflows/ # Workflow API
β β βββ workflow/ # Workflow pages
β β βββ +page.svelte # Home page
β βββ lib/ # Shared components and utilities
β β βββ components/ # Svelte components
β β βββ services/ # Business logic services
β β βββ stores/ # Svelte stores
β β βββ types/ # TypeScript type definitions
β βββ app.html # HTML template
βββ static/ # Static assets
βββ build/ # Built application (after npm run build)
βββ dist/ # Compiled TypeScript
- SvelteKit Framework: Full-stack web application framework
- Visual Editor: XYFlow-based drag-and-drop workflow editor
- API Layer: RESTful API for workflow operations
- Node Runtime: Execution engine for workflow nodes
- State Management: Svelte stores for application state
- AI Models: OpenAI Chat, Embeddings, HuggingFace
- Data Processing: Calculator, Dataframe Operations, Data Operations
- Input/Output: Text Input, Chat Output, File Upload
- HTTP Operations: URL Fetch, HTTP Request, Webhook
- Conditional Logic: Conditional nodes, Loop operations
- Utility: DateTime, Regex Extractor, Split Text
- Storage: Save to File, Chroma Vector Store
- Node.js 18+
- npm or pnpm
-
Install dependencies:
npm install
-
Start development server:
npm run dev
The application will be available at
http://localhost:5173 -
Build for production:
npm run build
-
Start production server:
npm start
The production server will run on port 3000 by default (configurable via
PORTenvironment variable)
Start the development server with hot module replacement:
npm run dev
# Or specify a different port
npm run dev -- --port 3000Build and run the application in production mode:
# Build the application
npm run build
# Start the Node.js server
npm start
# With custom port
PORT=8080 npm startFlowDrop includes production-ready Docker configuration and automated builds via GitHub Actions.
# Pull from GitHub Container Registry
docker pull ghcr.io/OWNER/REPO:latest
# Run the container
docker run -d \
-p 3000:3000 \
-e PUBLIC_API_BASE_URL=https://api.example.com/flowdrop \
ghcr.io/OWNER/REPO:latest# Quick start with Docker Compose
docker-compose up -d
# Or build and run manually
docker build -t flowdrop:latest .
docker run -d -p 3000:3000 --name flowdrop flowdrop:latestSee .github/DOCKER_DEPLOYMENT.md for GitHub Actions deployment documentation
- Navigate to the root URL
- Create a new workflow or edit an existing one
- Use the visual editor to build your workflow
- Add Nodes: Drag nodes from the palette to the canvas
- Configure Nodes: Set parameters and configuration for each node
- Connect Nodes: Create connections between node inputs and outputs
- Test Execution: Use the execution panel to test your workflow
- Save & Deploy: Save your workflow for later use
- OpenAI Chat: GPT model integration
- OpenAI Embeddings: Text embedding generation
- HuggingFace Embeddings: Alternative embedding models
- Simple Agent: Basic AI agent implementation
- Calculator: Mathematical operations
- Dataframe Operations: Advanced data manipulation
- Data Operations: General data processing
- Data to Dataframe: Data format conversion
- Text Input: User input collection
- Text Output: Display text results
- Chat Output: Chat interface output
- File Upload: File upload handling
- URL Fetch: HTTP GET requests
- HTTP Request: Full HTTP client
- Webhook: Webhook endpoint handling
- Conditional: If/else logic branching
- Loop: Iterative operations
- Split Text: Text segmentation
- DateTime: Date/time operations
- Regex Extractor: Pattern matching
- Conversation Buffer: Chat history management
- Structured Output: Formatted output generation
-
Create Node Class:
<?php namespace Drupal\flowdrop\Plugin\FlowDropNodeProcessor; use Drupal\flowdrop\Attribute\FlowDropNodeProcessor; #[FlowDropNodeProcessor( id: "my_custom_node", label: new \Drupal\Core\StringTranslation\TranslatableMarkup("My Custom Node") )] class MyCustomNode extends AbstractFlowDropNodeProcessor { public function execute(array $inputs, array $config): array { // Your node logic here return ['result' => 'processed data']; } public function getConfigSchema(): array { return [ 'type' => 'object', 'properties' => [ 'mySetting' => ['type' => 'string'], ], ]; } }
-
Implement Required Methods:
execute(): Main node logicgetConfigSchema(): Configuration schemagetInputSchema(): Input validation schemagetOutputSchema(): Output schemavalidateInputs(): Input validation
This is a SvelteKit application with a comprehensive development setup:
npm run dev # Start development server
npm run build # Build for production
npm run preview # Preview production build
npm run check # Type check
npm run test # Run tests
npm run lint # Lint code
npm run format # Format codeIf you need to build FlowDrop as a library for integration with other systems:
npm run build:drupal # Build IIFE bundle for Drupal
npm run build:production # Build standalone library bundleThe application exposes the following API endpoints:
GET /api/workflows- List workflowsPOST /api/workflows- Create workflowGET /api/workflows/{id}- Get workflowPUT /api/workflows/{id}- Update workflowDELETE /api/workflows/{id}- Delete workflow
GET /api/flowdrop/nodes- List available node typesPOST /api/flowdrop/nodes- Create/register new nodeGET /api/flowdrop/nodes/{id}- Get node details
GET /api/flowdrop/port-config- Get port configuration for nodes
Each node type defines its configuration schema:
interface NodeConfigSchema {
type: "object";
properties: {
[key: string]: {
type: string;
title?: string;
description?: string;
default?: unknown;
};
};
}- CSRF protection enabled on all API routes
- Input validation on all endpoints
- Type-safe API with TypeScript
- Error handling and logging
- Secure server-side rendering
npm run test:unitnpm run test:e2enpm run checkThe application supports the following environment variables:
PORT- Server port (default: 3000)HOST- Server host (default: 0.0.0.0)ORIGIN- Application origin for CSRF protection
Create a .env file in the project root:
PORT=3000
HOST=0.0.0.0
ORIGIN=http://localhost:3000Not accepting contributions until the project stabilizes. Stay tuned.
For issues and questions:
- Check the API documentation in
API.md - Review the security guidelines if available
- Create an issue in the project repository
- Framework: SvelteKit 2.x with Svelte 5
- Language: TypeScript 5.x
- Build Tool: Vite 6.x
- Workflow Editor: @xyflow/svelte
- Icons: @iconify/svelte
- Styling: CSS with modern features
- Server: Node.js with adapter-node
- Testing: Vitest + Playwright
FlowDrop - Visual workflow automation with SvelteKit.