What is Fluxion?

Fluxion is a visual flow designer that lets you build, configure, execute, and export three types of systems using an interactive node-based canvas:

  • API Processing Pipelines — Design request-handling flows with validation, auth, transforms, database operations, and more
  • State Machines — Model stateful systems with states, transitions, guards, actions, and event-driven execution
  • Database Architectures — Design schemas, compose queries, build CRUD pipelines, and export real SQL/Prisma code

Inspired by Unreal Engine Blueprint-style editors. Everything runs in the browser with zero runtime dependencies.

Core Concept

Fluxion combines visual flow design (drag nodes, draw connections) with live execution (watch data packets travel through your pipeline in real-time) and code export (generate working Express.js, XState, TypeScript, SQL, Prisma, or Mermaid code from your visual flow).

Three Modules

The left sidebar lets you switch between the three modules:

  • API (⇄) — Build API processing pipelines with 12 node types
  • State Machine (◇) — Design state machines with 8 node types
  • Database (◫) — Design database schemas, queries, and pipelines with 12 node types

Each module has its own canvas, demos, import/export formats, and independent save slot. Switching modules preserves your saved work — just hit Save before switching.

Feature Overview

Visual Pipeline Builder

The canvas provides an infinite, pannable, zoomable workspace where you place processing nodes and connect them with bezier-curve wires. Right-click anywhere to add new nodes. Drag from output pins to input pins to create connections. Each node type has a distinct color-coded header for instant visual identification.

Multi-Node Selection

Select multiple nodes by dragging a box on empty canvas space. All nodes within the box are selected with a live preview during drag. With multiple nodes selected:

  • Drag any selected node to move all of them together
  • Right-click to open a multi-node context menu with Delete Selected and Straighten options
  • Press Delete or Backspace to delete all selected nodes and their connections

Live Execution Engine

Hit Run to execute your pipeline with sample data. Watch animated data packets travel along connections, see nodes light up as they process, and inspect the exact input/output transformation at each step. Four execution modes: Live, Step, Slow-Motion, and Replay.

Execution Summary & Log Viewer

After execution completes, a summary banner slides up at the bottom of the canvas showing the result (success, warning, or error) with a node count. Click ▸ Details to open the Execution Log — a modal with every node visited, showing guard results, condition evaluations, HTTP status codes, and error messages.

Pause & Resume

Click Pause during execution to freeze the flow mid-run. The button toggles to a Resume icon. Click again to continue from where it stopped.

Inspector Panel

Click any node to open the side panel with two tabs:

  • Config — Edit the node's label and type-specific settings
  • Data — After execution, see diff view with added/removed/changed fields, plus full JSON input/output

Save & Load

Two toolbar buttons persist your work to browser localStorage:

  • Save (💾) — Saves the current graph. Each module has an independent save slot.
  • Clear (🗑) — Clears the saved graph and resets the canvas.

Saved graphs are automatically restored when you return or switch modules.

Export Formats

  • API module: Express.js, Fluxion JSON, Pseudocode
  • State Machine module: Fluxion JSON, XState v5, TypeScript Class, Mermaid diagram
  • Database module: SQL (DDL + DML), Fluxion JSON, Prisma Schema, Mermaid ER diagram

Comment Boxes

Right-click the canvas and select Add Comment Box to create a labeled, resizable grouping box. Comment boxes are drawn behind nodes for visual organization. Drag to move (nodes inside move with it), resize from corners/edges, double-click the header to edit the label, and press Delete to remove. Comment boxes are preserved in save/load and Fluxion JSON export/import.

Connection Reroute Points

Double-click any connection wire to insert a diamond-shaped reroute point. Drag reroute points to reshape wires into clean paths. Press Delete to remove a selected reroute point. Reroute points are preserved in save/load and export.

Node Collapse

Double-click a node header to collapse it to a compact header-only view. Connections are preserved and route to the center edges. Double-click again to expand. Collapsed state persists across save/load.

Minimap

A small overview panel in the bottom-right corner shows all nodes and the current viewport position. Click anywhere on the minimap to pan the canvas to that location. Can be toggled off in Settings.

Grid Highlight on Drag

When dragging nodes, the grid cells around the dragged nodes glow with a subtle highlight, providing spatial awareness. Can be toggled off in Settings.

Arrow Key Nudging

Move selected nodes precisely using arrow keys. When snap-to-grid is enabled, nodes nudge by the grid size. Otherwise, nodes nudge by a configurable pixel amount (default 10px). Can be toggled off in Settings.

Settings Modal

Click the cogwheel icon in the left sidebar to open the Settings modal. Configure theme, canvas visuals (grid, particles, ripples, minimap, grid highlight), snap-to-grid, arrow key nudging, auto-save, and manage storage. All settings persist across sessions.

Import Support

  • Fluxion JSON — Re-import previously exported pipelines (API, SM, and Database), including comment boxes, reroute points, and collapsed state
  • OpenAPI 3.x / Swagger 2.x — Auto-generates API pipeline from your spec
  • Built-in Demos — One-click loading of example flows for all three modules

Technical Details

PropertyDetail
RenderingCanvas2D at 60fps with device pixel ratio scaling
FrameworkZero dependencies — vanilla TypeScript
Bundle Size~266KB JS (66KB gzipped), ~26KB CSS (5KB gzipped)
ConnectionsCubic bezier curves with animated flow particles
API ExecutionWalk-based: follows user-wired connections with pin-based routing
SM ExecutionEvent-driven graph walker supporting cycles
DB ExecutionPipeline walker with error/empty branching and transaction rollback routing
Data SnapshotsImmutable copies via structuredClone at each node
Diff EngineDeep recursive comparison of input vs output at each step
PersistencelocalStorage with separate slots for API, State Machine, and Database

Built-in Demos

API Demos

User Registration Pipeline

A complete POST /api/users/register pipeline with 8 nodes: Input → Validation → Rate Limit → Normalize → GeoIP → Hash Password → DB Insert → HTTP 201.

Error Handling Flow

Conditional branching: Input → Validation (passes → Transform → DB → 201, fails → Error Handler → 400).

State Machine Demos

Traffic Light

Cyclic state machine: Green → Yellow → Red → Green with a POWER_OFF event to Off final state. Demonstrates entry/exit actions.

Door Lock

Locked → Unlocked states with guard conditions and transition actions.

Database Demos

User CRUD

Source → Table(users) → Insert → Query → Where → Result. Basic CRUD pipeline with schema validation and filtering.

Join & Aggregate

Source → Table(users) → Table(orders) → Relation → Query → Join → Where → Aggregate → Result. Multi-table query with JOIN, WHERE, and GROUP BY aggregation.

Bank Transfer (Transaction)

Source → Table(accounts) → Table(tx_log) → Transaction → Debit → Credit → Insert Log → Commit Result, with rollback routing on failure.

NoSQL (MongoDB)

Source(mongodb) → Table(products) → Insert → Query → Where → Aggregate → Result. Same nodes, MongoDB-flavored config and output.

Canvas & Interaction

The Fluxion canvas is an infinite 2D workspace rendered with Canvas2D. It supports panning, zooming, node dragging, pin connections, multi-selection, and context menus.

Navigation

ActionInputDescription
PanMiddle mouse button + dragMove the viewport around the canvas
Pan (alt)Alt + left click + dragAlternative panning method
ZoomScroll wheelZoom in/out centered on cursor (0.1x to 4x)
Fit ViewToolbar ⊞ FitAuto-zoom and pan to fit all nodes

Working with Nodes

Adding Nodes

Right-click anywhere on the canvas to open the context menu. All available node types for the current module are listed with icons and labels. Click to place at the cursor position.

Selecting & Moving

ActionInputResult
SelectLeft click on nodeHighlights node with dashed selection ring, opens Inspector
DragClick + hold + drag (>5px)Repositions the node
Box SelectLeft click + drag on empty spaceDraws selection rectangle; all nodes inside are selected (live preview)
Multi-DragWith multiple selected, drag any oneMoves all selected nodes together
DeselectClick empty canvasClears selection, closes Inspector
DeleteDelete or BackspaceRemoves selected nodes/connections
Nudge Moves selected nodes by grid size or nudge amount
CollapseDouble-click node headerToggles node between full and collapsed (header-only) view
UndoCtrl+ZReverts last action (up to 50 steps). Works for add/delete/move/connect/config changes
CopyCtrl+CCopies selected nodes and their internal connections to clipboard
PasteCtrl+VPastes copied nodes at +40px offset with new IDs. Repeated paste stacks further

Multi-Node Context Menu

When multiple nodes are selected, right-click to open a special context menu:

  • Delete Selected — Removes all selected nodes and their connections
  • Straighten — Aligns nodes horizontally at average Y position with even spacing, sorted left-to-right

Connecting Nodes

Each node has input pins (left) and output pins (right). To create a connection:

  1. Hover over an output pin — cursor changes to crosshair
  2. Click and drag — a dashed bezier wire follows your cursor
  3. Release on an input pin — connection is created

Connected pins show a filled green dot. Unconnected pins show an empty circle.

Bidirectional Connection Dragging

Connections can be initiated from either direction: drag from an output pin (right side) to an input pin, or drag from an unconnected input pin (left side) to an output pin. Either way, the connection is stored as output → input and flows left-to-right during execution.

Deleting Connections

Click on a connection wire to select it (turns red with pulsing glow), then press Delete or Backspace.

Hover & Tooltips

Hovering over a connection after execution shows a floating tooltip with the upstream node's output data as formatted JSON.

Inspector Panel

The Inspector slides in from the right when you click a node. Two tabs:

Config Tab

  • Label — Editable display name
  • Type badge — Read-only node type indicator
  • Type-specific fields — Varies by node type
  • Save Config — Applies changes and regenerates the processor

For list-based config (validation rules, transform mappings, events, actions), use + Add to add entries and × to remove them.

Data Tab

Available after execution. Shows:

  • Duration — Processing time in milliseconds
  • Diff View — Color-coded comparison: + Added, − Removed, ~ Changed, Unchanged
  • Input JSON — Full data entering the node
  • Output JSON — Full data leaving the node
Data Indicator

The Data tab shows a colored dot when execution data is available.

Visual Effects

  • Grid Background — Subtle grid that scrolls with the viewport
  • Node Glow — Active/processing nodes emit a pulsing glow
  • Ripple Effects — Green on entry, yellow for slow nodes (>500ms), red shockwave on errors
  • Flow Particles — Animated dots along active connections
  • Data Packet — Glowing orb with "N fields" badge traveling between nodes (visible in all modules: API, State Machine, and Database)
  • Processing Spinner — Circular indicator on the node header while processing
  • Canvas Data Overlay — Live diff panel next to the currently processing node
  • Empty Canvas Placeholder — Instructions shown when canvas has no nodes
  • Grid Highlight on Drag — Colored grid lines glow around nodes while dragging
  • Minimap — Bottom-right overview panel showing all nodes and viewport position

Comment Boxes

Comment boxes let you visually group and annotate regions of your canvas, inspired by UE5 Blueprint comment nodes.

Creating Comment Boxes

Right-click on empty canvas space and select Add Comment Box from the context menu. A 300×200 box appears at the cursor position with a default "Comment" label.

Interacting with Comment Boxes

ActionInputResult
SelectLeft click on comment boxSelects the comment box (blue dashed border)
MoveClick + dragMoves the comment box AND all nodes whose center falls inside it
ResizeDrag corner or edge handlesResizes the box (minimum 100×60px)
Edit LabelDouble-click headerOpens a prompt to rename the comment box
DeleteDelete or BackspaceRemoves the comment box (nodes inside are kept)
Comment Box Persistence

Comment boxes are saved with your graph and included in Fluxion JSON export/import. They persist across save/load and module switches.

Connection Reroute Points

Reroute points let you reshape connection wires by inserting draggable waypoints, similar to UE5 Blueprint reroute nodes.

Adding Reroute Points

Double-click on any connection wire to insert a diamond-shaped reroute point at that position. The connection is split into segments that route through the reroute point.

Managing Reroute Points

ActionInputResult
AddDouble-click a connection wireInserts a diamond reroute point at cursor position
MoveClick + drag the diamondRepositions the reroute point (respects snap-to-grid)
SelectClick the diamondSelects it (white outline)
DeleteDelete while selectedRemoves the reroute point; wire reconnects directly

Multiple reroute points can be added to a single connection. The wire segments use bezier curves between consecutive points, maintaining smooth paths. Flow particles animate along the full chain during execution.

Reroute Persistence

Reroute points are stored as part of the connection data and persist through save/load and Fluxion JSON export/import.

Node Collapse

Double-click a node header to collapse it to a compact header-only view. This reduces visual clutter for nodes you don't need to inspect frequently.

  • Collapsed nodes show only the header bar with a indicator
  • All connections are preserved — input pins route to the left center edge, output pins to the right center edge
  • Double-click the header again to expand back to full size
  • Collapsed state persists through save/load

Minimap

A 200×140px overview panel in the bottom-right corner provides a bird's-eye view of your entire graph.

  • Each node appears as a small colored rectangle using its theme accent color
  • Comment boxes appear as semi-transparent rectangles
  • A bright outline rectangle shows your current viewport position
  • Click anywhere on the minimap to instantly pan the canvas to that position
  • Drag on the minimap for continuous panning
  • Can be toggled off in Settings (Canvas tab)

Grid Highlight on Drag

When you drag one or more nodes, the grid cells around the dragged nodes illuminate with a subtle colored highlight. This provides spatial context and makes alignment easier.

  • The highlight extends one grid cell beyond the node bounding box in each direction
  • Only visible when the grid is enabled and nodes are being dragged
  • Adapts to light/dark theme
  • Can be toggled off in Settings (Canvas tab)

Arrow Key Nudging

Move selected nodes precisely using keyboard arrow keys:

KeyAction
Move selected nodes up
Move selected nodes down
Move selected nodes left
Move selected nodes right

When snap-to-grid is enabled, nodes nudge by the grid size. Otherwise, they nudge by a configurable pixel amount (default 10px). Both the nudge toggle and nudge amount are configurable in Settings.

Settings Modal

Click the cogwheel icon in the left sidebar to open the Settings modal. Settings are organized into three tabs:

General Tab

SettingDescriptionDefault
ThemeDark or Light modeDark
Default SpeedExecution animation speed (0.05x – 3.0x)1.0x
Auto SaveAutomatically save the graph at regular intervalsOff
Auto Save IntervalSeconds between auto-saves30s

Canvas Tab

SettingDescriptionDefault
Show GridDisplay background gridOn
Grid Highlight on DragGlow grid cells around nodes while draggingOn
Snap to GridSnap node positions to grid intersectionsOff
Grid SizeGrid cell size in pixels20px
Arrow Key NudgingEnable moving nodes with arrow keysOn
Nudge AmountPixels to move per arrow key press (when snap-to-grid is off)10px
Show ParticlesAnimated flow particles on connectionsOn
Show RipplesNode processing ripple effectsOn
Show Data OverlayLive diff panel next to processing nodesOn
Show MinimapOverview panel in bottom-right cornerOn
Line ThicknessConnection wire thickness — increase for better visibility in Light mode. Options: 1px (Thin), 1.5px (Default), 2.5px (Medium), 3.5px (Thick)1.5px

Storage Tab

  • Per-module size bars — Visual indicator of localStorage usage for each module
  • Clear All — Removes all saved graphs from localStorage
  • Export All — Downloads all saved graphs as JSON files
Settings Persistence

All settings are saved to fluxion_settings in localStorage and automatically restored on app load.

API Node Types

The API module has 12 node types covering every stage of a typical API request lifecycle.

Input

Defines the API entry point. Always the first node in a pipeline.

FieldDescriptionDefault
MethodHTTP method (GET, POST, PUT, PATCH, DELETE)POST
PathAPI route path/api/endpoint
BodyKey-value pairs defining initial request dataemail, password, name, Authorization

Processing: Adds _method, _path, _receivedAt. The Body key-value pairs become the initial data packet.

Input Data

The Body field defines the sample data that flows through your pipeline during execution. Add key-value pairs like email = alex@example.com to simulate a real request.

Validation

Enforces field constraints. Throws an error if any rule fails.

Rule FieldDescription
Field NameThe data field to validate
Typestring, number, email, boolean, or any
RequiredWhether the field must be present
Min / MaxMin/max length or value

Pins: valid (success) and invalid (error path).

Authentication

Simulates authentication checks.

FieldDescriptionDefault
Auth Typebearer, api-key, or basicbearer
Header NameWhich header carries the credentialAuthorization

Pins: authenticated and denied.

Transform

Field-level data transformations via configurable mappings.

MappingDescription
From / ToSource and target field names
Transformnone, rename, lowercase, uppercase, trim, hash, delete

Enrichment

Adds computed or lookup data. Config: Source name + key-value pairs to inject.

Database

Simulates a database operation (select, insert, update, delete). Config: Operation, Table, Fields.

Pins: result and error.

External API

Simulates calling a remote HTTP service. Config: URL, Method, Headers.

Pins: response and error.

Condition

Branches flow based on a field comparison. Config: Field, Operator (==, !=, >, <, exists, truthy), Value.

Pins: true and false.

Response

HTTP response node. Config: Status Code, Headers (key-value pairs). Typically the last node.

Error Handler

Handles errors from upstream nodes. Config: Error Type, Message, Status Code.

Middleware

Cross-cutting concerns. Config: Type (logging, rate-limit, cors, custom), Config text.

Delay

Introduces artificial processing delay. Config: Delay in milliseconds (default 1000).

State Machine Module

The State Machine module lets you visually design, execute, and export finite state machines. Switch to it via the ◇ SM tab in the left sidebar. State machines support cyclic transitions, making them ideal for modeling traffic lights, door locks, UI flows, and more.

How SM Execution Differs from API

API flows walk connections once in topological order. State machines are event-driven: they start at the initial state, then process a queue of events. Each event triggers a transition from the current state, potentially with guard conditions and actions. The same state can be visited multiple times.

SM Node Types

8 node types are available in the State Machine module:

Initial (●)

The entry point. Defines machine name, event queue, and initial context.

FieldDescriptionDefault
Machine NameIdentifier for the machinemyMachine
Initial ContextKey-value pairs for initial context data
EventsOrdered list of events to processEVENT_1, EVENT_2

State (□)

Represents a state. Can have entry/exit actions and configurable event slots.

FieldDescription
State NameDisplay name
Event SlotsNumber of outgoing transition slots (output pins)
Entry ActionsActions on entering (e.g., startTimer)
Exit ActionsActions on leaving (e.g., stopTimer)

Transition (→)

Connects states. Triggered by matching events.

FieldDescription
EventEvent name that triggers this transition
GuardOptional condition expression
ActionOptional action name to execute

Final (◉)

Marks the end of the machine. Execution stops when reached.

Choice (◇)

Branching node that evaluates guard conditions.

Pins: if-true and if-false.

Guard

Standalone guard that evaluates a condition expression.

Pins: pass and fail.

Action (⚡)

Executes a side-effect (assign, send, log, custom).

Pins: Single done output.

Parallel (║)

Represents parallel state regions. Config: number of regions (output pins).

SM Execution

State Machine execution is event-driven:

  1. Find the sm-initial node, read event queue and initial context
  2. Follow connection to the first sm-state
  3. For each event in the queue:
    • Find outgoing sm-transition nodes matching the event name
    • If a transition has a guard, evaluate it; skip if false
    • First matching transition fires, its action executes
    • Follow transition output to the next state
    • If no transition matches, stay in current state
  4. If sm-final is reached, execution stops
  5. If all events consumed, execution completes at current state
Cycles Allowed

Unlike API flows, state machines support cycles. A state can transition back to a previous state. The event queue length limits how many transitions occur.

Guards & Conditions

Guard expressions support:

  • true / false — Literal boolean
  • fieldName — Truthy check on a context field
  • field == value — Equality comparison
  • field != value — Inequality comparison

SM Export Formats

XState v5

Generates a createMachine() definition for XState v5 with states, transitions, guards, and actions.

TypeScript Class

Standalone class with State/Event type unions, transition table, guard functions, send(event) method, and entry/exit action support.

Mermaid Diagram

Generates stateDiagram-v2 for rendering in Mermaid-compatible tools (GitHub, docs sites, etc.).

Fluxion JSON

Same portable JSON format as the API module for round-trip import/export.

Database Module

The Database module lets you visually design schemas, compose queries, build CRUD pipelines, and export real SQL or Prisma code. Switch to it via the ◫ DB tab in the left sidebar. Supports both SQL (PostgreSQL, MySQL) and NoSQL (MongoDB) — the same nodes adapt based on the database type configured in the Source node.

How DB Execution Differs from API & SM

API flows walk connections once using topological order. State machines are event-driven with cycles. Database pipelines use a sequential pipeline walker starting from the Source node, with branching on errors and empty results. Nodes with error pins route failures to the error path. Query nodes route to an empty pin when zero rows are returned. Transactions wrap downstream nodes and route to rollback on any failure.

DB Node Types

12 node types are available in the Database module:

Source (◈)

The entry point. Defines the database connection and type. Always the first node in a database pipeline.

FieldDescriptionDefault
DB TypeDatabase engine: postgresql, mysql, sqlite, mongodbpostgresql
Connection StringConnection URIpostgresql://localhost:5432/mydb
Database NameTarget database namemydb
OptionsKey-value connection options (pool size, SSL, etc.)

Processing: Sets _dbType, _dbConnection, _dbName, initializes _dbTables registry and _dbRelations array.

Table (▣)

Defines a table (SQL) or collection (NoSQL) schema. Every column is registered for downstream validation.

FieldDescription
Table NameName of the table or collection
EngineStorage engine (InnoDB, MyISAM, etc.)
ColumnsDynamic list — each entry has Name, Type, Constraint (PRIMARY KEY, UNIQUE, NOT NULL, DEFAULT, REFERENCES), and Nullable toggle

Column types (SQL): SERIAL, INTEGER, BIGINT, VARCHAR(N), TEXT, BOOLEAN, TIMESTAMP, DATE, DECIMAL, JSON, UUID

Column types (NoSQL): String, Number, ObjectId, Date, Boolean, Array, Object

Pins: created (success) and error (validation failure).

Schema Validation

Table definitions are registered into a runtime schema registry (_dbTables). Downstream Query, Insert, Update, and Delete nodes validate that their target table exists and that referenced columns match the schema. Invalid references throw descriptive errors.

Relation (↭)

Defines a foreign key relationship between two tables.

FieldDescription
From Table / ColumnSource side of the relationship
To Table / ColumnTarget side of the relationship
Relation Typeone-to-one, one-to-many, many-to-many
ON DELETE / ON UPDATECASCADE, SET NULL, RESTRICT, NO ACTION

Processing: Validates both tables exist in _dbTables. Pushes relationship to _dbRelations array. Throws if either table is undefined.

Query (🔎)

SELECT query. Builds real SQL from config and validates fields against the table schema.

FieldDescriptionDefault
TableTarget table to query
FieldsComma-separated column list (or *)*
DistinctSELECT DISTINCT togglefalse
LimitMaximum rows to return
OffsetRows to skip

Pins: rows (results found) and empty (zero rows matched).

Empty Result Routing

If a Query returns zero rows, execution routes to the empty output pin. If empty is not wired, execution continues normally through rows. This lets you handle "not found" scenarios explicitly.

Insert (✚)

INSERT operation. Validates fields exist in the table schema.

FieldDescription
TableTarget table
FieldsComma-separated column names to insert
ReturningColumns to return after insert (RETURNING clause)
On ConflictConflict resolution strategy (ignore, update, error)

Pins: inserted (success) and error (validation/conflict failure).

Update (✎)

UPDATE operation. Sets specific fields with optional WHERE clause.

FieldDescription
TableTarget table
SET FieldsComma-separated column = value pairs
WHEREFilter condition
ReturningColumns to return after update

Pins: updated (success) and error (failure).

Delete (✕)

DELETE operation with optional soft-delete support.

FieldDescription
TableTarget table
WHEREFilter condition
CascadeWhether to cascade to related records
Soft DeleteUses SET deleted_at = NOW() instead of actual deletion

Pins: deleted (success) and error (failure).

Join (⋈)

JOIN operation between two tables.

FieldDescription
Join TypeINNER, LEFT, RIGHT, FULL, CROSS
Right TableTable to join with
ON Left / ON RightJoin condition columns
Select FieldsWhich columns to include from joined result

Processing: Validates both tables exist. Builds JOIN SQL fragment. Merges column data from both tables.

Where (⚙)

Filtering, ordering, and grouping. Attaches to the upstream query node.

FieldDescription
ConditionsDynamic list — each entry has Field, Operator (=, !=, >, <, >=, <=, LIKE, IN, IS NULL, IS NOT NULL), Value, and Conjunction (AND/OR)
ORDER BYColumn to sort by
Order DirectionASC or DESC
GROUP BYColumn to group by

Processing: Every condition in the list is read and applied. All operators produce real SQL clauses.

Aggregate (Σ)

GROUP BY with aggregate functions.

FieldDescription
TableTarget table
Group ByColumn to group by
AggregationsDynamic list — each entry has Function (COUNT, SUM, AVG, MIN, MAX), Field, and Alias
HavingHAVING clause for filtering aggregated results

Transaction (🔒)

Wraps downstream operations in a database transaction.

FieldDescriptionDefault
Isolation LevelREAD COMMITTED, REPEATABLE READ, SERIALIZABLEREAD COMMITTED
Auto RollbackAutomatically rollback on any errortrue

Pins: commit (all downstream succeeded) and rollback (any downstream failed).

Transaction Rollback Routing

If any node downstream of the Transaction throws an error while the transaction is active, execution automatically routes to the rollback pin. Wire a Result node to the rollback pin to visualize the failure path.

Result (■)

Terminal output node. Displays the final pipeline data.

FieldDescriptionDefault
FormatOutput format: json, table, csvjson
LabelDisplay label for the resultQuery Result

DB Execution

Database execution follows a sequential pipeline model:

  1. Find the db-source node, read connection config and options
  2. Follow connections sequentially — each node receives the output of the previous node
  3. At each node, the processor:
    • Reads all config fields from the inspector form
    • Validates references (table names, column names) against the runtime schema registry
    • Builds real SQL strings (stored in _dbQuery for inspection)
    • Transforms the data packet and passes it downstream
  4. Branching: Nodes with dual output pins route based on success/failure:
    • Error pins fire when a processor throws (invalid table, missing column, constraint violation)
    • Query empty pin fires when zero rows are returned
    • Transaction rollback pin fires when any downstream node errors
  5. Execution completes at a db-result node or when no more connections exist

Schema Validation

The Database module performs real validation at execution time:

  • Table existence — Query, Insert, Update, and Delete nodes check their target table is defined in _dbTables. If not, they throw a descriptive error listing available tables.
  • Column existence — SELECT fields are validated against the table's column definitions. Referencing a non-existent column throws an error listing valid columns.
  • Relation validation — The Relation node checks both tables exist before creating a foreign key.
  • Empty column names — Table node rejects columns with blank names.

DB Export Formats

SQL (DDL + DML)

Generates complete, usable SQL from your pipeline. Every config field is reflected in the output:

  • CREATE TABLE — With all columns, types, constraints, and nullability
  • ALTER TABLE ... ADD CONSTRAINT ... FOREIGN KEY — With ON DELETE/ON UPDATE actions
  • SELECT — With DISTINCT, fields, LIMIT, OFFSET, WHERE, ORDER BY, GROUP BY
  • JOIN — Attached to the SELECT with correct join type and ON clause
  • INSERT INTO — With parameterized values and RETURNING clause
  • UPDATE — With SET fields, WHERE clause, and RETURNING
  • DELETE FROM — With WHERE clause; soft delete uses SET deleted_at = NOW()
  • BEGIN / COMMIT — Wraps transaction body with isolation level
  • Aggregate — Full SELECT groupBy, FN(field) AS alias GROUP BY ... HAVING ...

Prisma Schema

Generates a valid Prisma schema file with:

  • datasource db with provider and connection URL from Source config
  • model blocks for each Table node with field types, @id, @unique, @default
  • @relation directives from Relation nodes with references and fields
  • Proper Prisma type mapping (SERIAL → Int @id @default(autoincrement()), UUID → String @default(uuid()), etc.)

Mermaid ER Diagram

Generates erDiagram syntax for Mermaid-compatible tools with:

  • Entity blocks with column names, types, and constraint annotations (PK, FK, UK)
  • Relationship lines with correct cardinality (||--o{, ||--||, }o--o{)

Fluxion JSON

Same portable JSON format as the other modules for round-trip import/export.

SQL vs NoSQL

The Database module is config-driven. The same node types work for both SQL and NoSQL databases — the Source node's dbType field determines the behavior:

AspectSQL (PostgreSQL/MySQL)NoSQL (MongoDB)
Table nodeCREATE TABLE with typed columnsCollection with flexible fields
Query outputSELECT ... FROM ...db.collection.find({...})
Insert outputINSERT INTO ... VALUES ...db.collection.insertOne({...})
Column typesSERIAL, VARCHAR, INTEGER, etc.String, Number, ObjectId, etc.
RelationsForeign keys with constraintsReferences (application-level)
TransactionsBEGIN / COMMIT / ROLLBACKsession.startTransaction()

Execution & Export

Fluxion's execution engine processes your pipeline by following the connections you've wired, applying each node's processor to a data packet as it flows through the graph.

Toolbar Controls

ButtonDescription
▶ RunExecute the flow with sample input data
⏩ StepAdvance to next node (starts in Step mode if not running)
⏸ Pause / ▶ ResumePause execution; click again to resume. Icon toggles.
⏹ StopStop execution and reset visual state
ImportOpen import modal (paste JSON or load demo)
ExportOpen export modal with format tabs
⊞ FitAuto-zoom to center all nodes
💾 SaveSave graph to browser localStorage
🗑 ClearClear saved graph and reset canvas

Execution Modes

Live Mode

Default mode. Full animation with configurable speed. Each node type has a characteristic delay with ±20% jitter.

Step Mode

Pauses before each node. Click Step to advance. Status shows "Waiting for step..."

Slow-Motion Mode

Like Live but at 0.2x speed (5x slower).

Replay Mode

After execution, scrub through the timeline with a slider.

Speed Control

Slider adjusts speed from 0.05x to 3.0x.

Execution Summary & Log

After execution, a summary banner appears at the bottom of the canvas:

  • Green ✓ — Completed successfully
  • Yellow ⚠ — Completed with warnings
  • Red ✕ — Execution failed

Click ▸ Details to open the Execution Log modal — a step-by-step breakdown with node names, type badges, and context-specific details (guard results, HTTP codes, condition evaluations, error messages).

The banner auto-dismisses after 12 seconds or click to dismiss.

How API Execution Works

  1. Entry Node — Starts at the Input node (or first node with no incoming connections)
  2. Packet Creation — Data packet from the Input node's Body key-value pairs
  3. Node Processing — Enter node → snapshot input → run processor → snapshot output → compute diff
  4. Pin-Based Routing — Branching nodes route to specific output pins (valid/invalid, true/false, result/error)
  5. Connection Travel — Animated packet along bezier curve
  6. Error Handling — Errors route through error pin; no error route = execution stops
  7. Completion — Finishes when no outgoing connection exists
Data Immutability

Each snapshot uses structuredClone for deep copies. You can inspect data at any point without worrying about mutations from later nodes.

API Export Formats

Express.js

Production-ready Node.js/Express server with route handlers, validation, auth, DB queries, and error handling. ~80% production-ready.

Fluxion JSON

Portable pipeline definition with nodes, connections, pins, and configs. Use to save, share, or re-import.

Pseudocode

Human-readable step-by-step description for documentation and reviews.

Importing

Fluxion JSON

Paste exported JSON to restore any pipeline. Works for API, State Machine, and Database modules.

OpenAPI / Swagger

Paste OpenAPI 3.x or Swagger 2.x JSON. Auto-generates API pipeline with Validation, Auth, Transform, DB, and Response nodes.

Demos

Each module has built-in demos. Click a demo card to instantly load it. API has 2 demos, State Machine has 2, and Database has 4 (User CRUD, Join & Aggregate, Bank Transfer, NoSQL MongoDB).

Format Detection

Fluxion auto-detects: Fluxion graph (_fluxionVersion), OpenAPI (openapi field), or Swagger (swagger field).

Save & Persistence

Graphs are stored in browser localStorage with separate slots:

  • fluxion_graph_api — Saved API pipeline
  • fluxion_graph_sm — Saved State Machine
  • fluxion_graph_db — Saved Database pipeline

Saved graphs auto-restore on app load or module switch. Uses the same Fluxion JSON format as export.

Browser Storage

Clearing browser data erases saved graphs. For backups, use Export → Fluxion JSON and save the file to disk.

Syntax Highlighting

The export modal highlights code:

  • Keywords — const, let, function, async, await, return, if, else
  • Strings — Single-quoted, double-quoted, template literals
  • Numbers
  • Comments
  • Built-ins — app, res, req, data, db, console

Provides Copy to Clipboard and Download File buttons.