CrystalFlow uses TypeScript decorators to define nodes, inputs, outputs, and properties.Documentation Index
Fetch the complete documentation index at: https://crystalflow.dev/docs/llms.txt
Use this file to discover all available pages before exploring further.
Requires
experimentalDecorators: true in your tsconfig.json.@defineNode
Define a node type with metadata.Node metadata configuration:
type: string- Unique node type identifierlabel: string- Display namecategory: string- Category for groupingdescription?: string- Optional description
@Input
Define an input port on a node.Input configuration:
type: string- Data type ('string','number','boolean','any', etc.)label: string- Display labelrequired?: boolean- Whether input is required (default:true)defaultValue?: any- Default value if not connecteddescription?: string- Optional description
@Output
Define an output port on a node.Output configuration:
type: string- Data typelabel: string- Display labeldescription?: string- Optional description
@Property
Define a static configuration property.Property configuration:
type: 'string' | 'number' | 'boolean' | 'select'- Property typelabel: string- Display labeldefaultValue?: any- Default valuerequired?: boolean- Whether requireddescription?: string- Optional description
min?: number- Minimum valuemax?: number- Maximum valuestep?: number- Increment step
options: Array<{ value: string; label: string }>- Dropdown options
Property vs Input
@Property
Static configuration - Set in property panel, not connected to other nodes.
Use for: URLs, timeouts, mode selection, formatting options.
@Input
Dynamic data flow - Connected via handles to other node outputs.
Use for: Data processing, computed values, workflow results.
Decorator Metadata
All decorator metadata is stored usingreflect-metadata:
Inheritance
Decorators support inheritance:TypeScript Configuration
Add to yourtsconfig.json:
Complete Example
Related
Creating Custom Nodes
Learn to build nodes
Property System
Deep dive into properties
Node API
Node class reference
Decorators Concept
Understand decorators