Skip to main content
FlowDrop is organized as tree-shakable sub-modules. Import only what you need to minimize bundle size.

Module structure

@flowdrop/flowdrop — full bundle (re-exports everything)
core — types & utilities, zero heavy deps
editor — visual workflow editor (@xyflow/svelte)
form — JSON Schema → dynamic forms
form/code — code & JSON editor (+CodeMirror, ~300KB)
form/markdown — markdown editor (+CodeMirror)
display — content rendering
playground — testing & human-in-the-loop
settings — user preferences
styles — CSS design tokens

@flowdrop/flowdrop/core

Types and utilities with zero heavy dependencies. Safe to import anywhere without pulling in Svelte components or CodeMirror. Key exports:
CategoryPurposeExports
Core typesThe workflow graph data modelWorkflow, WorkflowNode, WorkflowEdge, NodeMetadata, NodePort
Node typesBuilt-in node type enumsBuiltinNodeType, NodeCategory
Auth providersStrategies for authenticating backend requestsAuthProvider, StaticAuthProvider, CallbackAuthProvider, NoAuthProvider
ConfigurationLibrary and endpoint setupFlowDropConfig, EndpointConfig, createEndpointConfig
Event handlersEditor event hooks and feature flagsFlowDropEventHandlers, FlowDropFeatures
Port systemPort typing and connection compatibilityPortConfig, PortDataTypeConfig, PortCompatibilityRule
UI SchemaDeclarative layout for generated formsUISchemaElement, UISchemaControl, UISchemaGroup
Form typesField-level form schemaFieldSchema, FieldType, SchemaFormProps
Agent SpecImport/export interop with Agent SpecTypes and adapters
ThemeTheme state and switchingtheme, resolvedTheme, setTheme, toggleTheme
UtilitiesGraph and UI helperscolors, icons, node types, connections, cycle detection

@flowdrop/flowdrop/editor

Visual workflow editor with @xyflow/svelte. Key exports:
CategoryPurposeExports
ComponentsTop-level editor UIWorkflowEditor, App, NodeSidebar, ConfigForm, ConfigPanel
Node componentsPer-node-type renderersWorkflowNodeComponent, SimpleNode, ToolNode, NotesNode, GatewayNode, SquareNode, TerminalNode, UniversalNode
Mount functionsImperative mount/unmount entry pointsmountFlowDropApp, mountWorkflowEditor, unmountFlowDropApp
HelpersProgrammatic workflow and styling operationsWorkflowOperationsHelper, NodeOperationsHelper, EdgeStylingHelper, ConfigurationHelper
Store classesInstance-scoped editor state (resolve with getInstance())WorkflowStore, HistoryStore, HistoryService, PortCoordinateStore
Instance accessCreate and resolve editor instancesgetInstance, provideInstance, createFlowDropInstance
ServicesAPI client, toasts, and node executionEnhancedFlowDropApiClient / ApiContext, toast service, node execution
RegistrationRegister custom nodes and pluginsNodeComponentRegistry (fd.nodes), createPlugin, isValidNamespace

@flowdrop/flowdrop/form

Dynamic form generation from JSON Schema. Key exports:
CategoryPurposeExports
ComponentsForm renderer and field wrappersSchemaForm, FormField, FormFieldWrapper
Field typesBuilt-in field widgetsFormTextField, FormTextarea, FormNumberField, FormToggle, FormSelect, FormArray, FormCheckboxGroup, FormRangeField
UISchemaLayout and grouping renderersFormFieldset, FormUISchemaRenderer
RegistryRegister custom field typesFieldComponentRegistry (fd.fields), matchers

@flowdrop/flowdrop/form/code

Code and JSON editor support (adds ~300KB, requires CodeMirror). Key exports:
CategoryPurposeExports
ComponentsCode and template editorsFormCodeEditor, FormTemplateEditor
RegistrationRegister the field typesregisterCodeEditorField(fd.fields), registerTemplateEditorField(fd.fields)

@flowdrop/flowdrop/form/markdown

Markdown editor support (requires CodeMirror + @codemirror/lang-markdown). Key exports:
CategoryPurposeExports
ComponentMarkdown editorFormMarkdownEditor
RegistrationRegister the field typeregisterMarkdownEditorField(fd.fields)

@flowdrop/flowdrop/display

Content rendering components. Key exports:
CategoryPurposeExports
ComponentRenders markdown via the marked libraryMarkdownDisplay

@flowdrop/flowdrop/playground

Interactive workflow testing and human-in-the-loop. Key exports:
CategoryPurposeExports
ComponentsPlayground UIPlayground, PlaygroundModal, ChatPanel, SessionManager, ExecutionLogs, MessageBubble
InterruptsHuman-in-the-loop prompt UIInterruptBubble, ConfirmationPrompt, ChoicePrompt, TextInputPrompt, FormPrompt, ReviewPrompt
ServicesSession and interrupt logicPlaygroundService, InterruptService
StorePlayground and interrupt stateplayground state, interrupt management
Mount functionsImperative mount/unmountmountPlayground, unmountPlayground
TypesSession and interrupt typesPlaygroundSession, PlaygroundMessage, Interrupt, InterruptType

@flowdrop/flowdrop/settings

User preferences with hybrid persistence. Key exports:
CategoryPurposeExports
ComponentsSettings and theme UIThemeToggle, SettingsPanel, SettingsModal
StoreSettings statetheme, editor, UI, behavior, API categories
TypesSettings typesFlowDropSettings, ThemeSettings, EditorSettings, UISettings

@flowdrop/flowdrop/styles

CSS styling with design tokens. Exports: CSS files with --fd-* custom properties for theming.

@flowdrop/flowdrop

Full bundle — re-exports from all sub-modules for convenience. Use this when bundle size is not a concern.

REST API

FlowDrop expects a backend implementing these endpoint groups. Not all are required — see Backend Implementation for which tier each belongs to.

Required (Tier 1 — Minimum Viable Backend)

MethodPathPurpose
GET/healthHealth check (called on mount)
GET/nodesList available node types
GET/workflows/:idLoad a workflow
POST/workflowsCreate a new workflow
PUT/workflows/:idUpdate a workflow
MethodPathPurpose
GET/categoriesCategory definitions for sidebar groups
GET/port-configPort data types and compatibility rules
GET/nodes/:idGet single node metadata
GET/workflowsList all workflows
DELETE/workflows/:idDelete a workflow
GET/system/configRuntime configuration

Optional (Tier 3 — Advanced Features)

GroupPathsPurpose
Execution/workflows/{id}/execute, /executions/{id}Workflow execution
Pipelines/pipeline/{id}Pipeline status & logs
Playground/workflows/{id}/playground/sessions, /playground/sessions/{id}/messagesInteractive testing
Interrupts/interrupts/{id}, /interrupts/{id}/cancelHuman-in-the-loop
Agent Spec/agentspecAgent Spec import/export
See the API reference for full endpoint documentation, or follow the Backend: Express.js recipe to get started quickly.