FerrumFlow
A high-performance, extensible node-based editor built with Rust and gpui. Designed for building visual programming tools, workflow editors, and graph-based UIs.
This project is in early stage (alpha), API may change
Features
- Plugin-based architecture
- Interaction system (drag, pan, select, etc.)
- Undo / Redo (Command pattern)
- Viewport control (zoom & pan)
- Box selection & multi-select
- Node / Port / Edge model
- Custom node rendering system
- Built with performance in mind
- Multi-user collaboration support (by plugin)
Usage
Architecture Overview
The system is designed with clear separation of concerns:
Core Concepts
-
Graph Stores persistent data (nodes, edges, ports)
-
Viewport Handles zooming and panning
-
Plugin System Extends behavior (rendering, input handling, etc.)
-
Interaction System Manages ongoing user interactions (dragging, selecting, etc.)
-
Command System Enables undo/redo support
Plugin System
Plugins are the primary extension mechanism:
Responsibilities
A plugin can:
- Handle input events
- Start interactions
- Render UI layers
- Modify graph state
Interaction System
Interactions represent ongoing user actions, such as:
- Node dragging
- Box selection
- Viewport panning
Interaction Lifecycle
Start → Update → End / Replace
Command System (Undo / Redo)
Implements the Command Pattern:
Built-in Features
- Undo / Redo stacks
- Composite commands
- Easy integration via PluginContext
ctx.execute_command;
Node Rendering
Rendering is fully customizable via a registry:
Render example:
div
.absolute
.left
.top
.w
.h
.bg
Graph Model
🏗️ Creating Nodes (Builder API)
graph.create_node
.position
.input
.output
.build;
Performance
Designed to scale to large graphs:
- Viewport-based rendering (virtualization)
- Layered rendering system
- Interaction-aware rendering (degraded mode during drag)
- Ready for spatial indexing
Design Principles
- Separation of data and interaction
- Plugins over hardcoded behavior
- Explicit state transitions
- Performance-first rendering
- Composable architecture
Roadmap
- Edge rendering improvements
- Connection (drag-to-connect)
- Spatial indexing (Quadtree/Grid)
- Interaction priority & conflict resolution
- Collaboration support
Contributing
Contributions are welcome!
Feel free to open issues or PRs for:
- New plugins
- Performance improvements
- API design suggestions
License
Apache2.0
