Go-RED

module
v0.0.0-...-0c19b3a Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 10, 2026 License: MIT

README

Go—RED

Node-RED-inspired Flow Editor in Go - Complete utilization of Go features (Goroutines, Channels, Interfaces, Generics, etc.)


Overview

Go—RED is a flow-based programming editor similar to Node-RED, but completely implemented in Go. The project leverages Go's strengths to create a high-performance, scalable, and extensible platform for data flows.

Features
  • Flow-based programming - Drag & Drop nodes, connections between nodes
  • Real-time WebUI - Live updates via WebSocket
  • Plugin System - Custom nodes in Go or JavaScript
  • High Performance - Optimized for > 100,000 messages/second
  • Go-specific implementation:
    • Goroutines & Channels for parallel processing
    • Interfaces for plugin architecture
    • Generics for type-safe nodes
    • Context for timeouts/cancellation
    • Reflection for dynamic node registration
  • Extensible - Community plugins, custom nodes
  • Scalable - Worker pools, message batching, caching
Target Platforms
  • Cloud - Docker, Kubernetes, Serverless
  • Desktop - Linux, macOS, Windows

Documentation

Document Description
Architecture Technical architecture, components, data flow
Implementation Plan Detailed roadmap with phases and timeline
Node Development Guide for developing custom nodes
Node Palette Plan Plan for full Node-RED core node palette parity

Quick Start

Prerequisites
  • Go 1.21+
  • Node.js 18+ (for WebUI)
Installation
  1. Clone repository:
git clone https://github.com/GrimbiXcode/Go-RED.git
cd Go-RED
  1. Install Go dependencies:
go mod download
  1. Start Go—RED:
go run cmd/go-red/main.go

Application will be available at http://localhost:8080


Project Structure

Go-RED/
├── cmd/
│   └── go-red/
│       └── main.go              # Main application
├── internal/
│   ├── engine/                  # Flow Engine
│   │   ├── flow.go              # Flow management
│   │   ├── engine.go            # Flow execution engine
│   │   └── message.go           # Message structure
│   ├── nodes/                   # Built-in Nodes
│   │   ├── debug/
│   │   │   └── node.go
│   │   ├── function/
│   │   │   └── node.go
│   │   └── inject/
│   │       └── node.go
│   ├── registry/                # Node Registry
│   │   └── registry.go
│   └── state/                   # State Manager
│       └── manager.go
├── docs/                       # Documentation
├── web/                        # WebUI
│   └── index.html
├── go.mod
├── Makefile
├── Dockerfile
└── README.md

Contributing

See CONTRIBUTING.md for details.


License

MIT License

Directories

Path Synopsis
cmd
gentypes command
Command gentypes generates the canonical TypeScript wire types (web/src/types/generated.ts) from the Go structs that define the frontend/backend contract: internal/dto, internal/registry, and cmd/go-red/websocket.
Command gentypes generates the canonical TypeScript wire types (web/src/types/generated.ts) from the Go structs that define the frontend/backend contract: internal/dto, internal/registry, and cmd/go-red/websocket.
go-red command
Package main is the entry point for the Go—RED application.
Package main is the entry point for the Go—RED application.
go-red/websocket
Package websocket provides WebSocket communication for Go-RED.
Package websocket provides WebSocket communication for Go-RED.
internal
dto
Package dto defines the canonical wire format shared between the Go backend and the TypeScript frontend for REST and WebSocket payloads.
Package dto defines the canonical wire format shared between the Go backend and the TypeScript frontend for REST and WebSocket payloads.
engine
Package engine provides the core flow execution engine for Go—RED.
Package engine provides the core flow execution engine for Go—RED.
nodes/batch
Package batch provides the Batch node implementation.
Package batch provides the Batch node implementation.
nodes/catch
Package catch provides the Catch node implementation.
Package catch provides the Catch node implementation.
nodes/change
Package change provides the Change node implementation.
Package change provides the Change node implementation.
nodes/comment
Package comment provides the Comment node implementation.
Package comment provides the Comment node implementation.
nodes/complete
Package complete provides the Complete node implementation.
Package complete provides the Complete node implementation.
nodes/csvnode
Package csvnode provides the CSV node implementation (Node-RED type ID "csv" - named csvnode here to avoid shadowing the imported encoding/csv package within this file).
Package csvnode provides the CSV node implementation (Node-RED type ID "csv" - named csvnode here to avoid shadowing the imported encoding/csv package within this file).
nodes/debug
Package debug provides the Debug node implementation.
Package debug provides the Debug node implementation.
nodes/delay
Package delay provides the Delay node implementation.
Package delay provides the Delay node implementation.
nodes/execnode
Package execnode provides the Exec node implementation (Node-RED type ID "exec" - named execnode here to avoid shadowing the imported stdlib os/exec package within this file).
Package execnode provides the Exec node implementation (Node-RED type ID "exec" - named execnode here to avoid shadowing the imported stdlib os/exec package within this file).
nodes/file
Package file provides the File node implementation (Node-RED's "file" node - writes, appends to, or deletes a file).
Package file provides the File node implementation (Node-RED's "file" node - writes, appends to, or deletes a file).
nodes/filein
Package filein provides the "File in" node implementation (Node-RED type ID "file in" - reads a file into the message).
Package filein provides the "File in" node implementation (Node-RED type ID "file in" - reads a file into the message).
nodes/function
Package function provides the Function node implementation.
Package function provides the Function node implementation.
nodes/htmlnode
Package htmlnode provides the HTML node implementation (Node-RED type ID "html" - named htmlnode here to avoid shadowing the imported golang.org/x/net/html package within this file).
Package htmlnode provides the HTML node implementation (Node-RED type ID "html" - named htmlnode here to avoid shadowing the imported golang.org/x/net/html package within this file).
nodes/httpin
Package httpin provides the "http in" node implementation - registers a (method, path) route on a shared HTTP listener and emits one message per matching incoming request, pairing it with a *ResponseHandle so a downstream "http response" node (internal/nodes/httpresponse) can complete it.
Package httpin provides the "http in" node implementation - registers a (method, path) route on a shared HTTP listener and emits one message per matching incoming request, pairing it with a *ResponseHandle so a downstream "http response" node (internal/nodes/httpresponse) can complete it.
nodes/httpproxy
Package httpproxy provides the "http proxy" config node - a reusable outbound HTTP/HTTPS proxy configuration referenced by ID from other nodes (http request), rather than being wired into a flow itself (see docs/NODE_PALETTE_PLAN.md, Phase 6's config-node concept).
Package httpproxy provides the "http proxy" config node - a reusable outbound HTTP/HTTPS proxy configuration referenced by ID from other nodes (http request), rather than being wired into a flow itself (see docs/NODE_PALETTE_PLAN.md, Phase 6's config-node concept).
nodes/httprequest
Package httprequest provides the "http request" node implementation - issues an outgoing HTTP request and returns the response.
Package httprequest provides the "http request" node implementation - issues an outgoing HTTP request and returns the response.
nodes/httpresponse
Package httpresponse provides the "http response" node implementation - completes the in-flight HTTP request an upstream "http in" node (internal/nodes/httpin) paired with the message via a *httpin.ResponseHandle stored under httpin.KeyResponseHandle.
Package httpresponse provides the "http response" node implementation - completes the in-flight HTTP request an upstream "http in" node (internal/nodes/httpin) paired with the message via a *httpin.ResponseHandle stored under httpin.KeyResponseHandle.
nodes/inject
Package inject provides the Inject node implementation.
Package inject provides the Inject node implementation.
nodes/join
Package join provides the Join node implementation.
Package join provides the Join node implementation.
nodes/jsonnode
Package jsonnode provides the JSON node implementation (Node-RED type ID "json" - named jsonnode here to avoid shadowing the imported encoding/json package within this file).
Package jsonnode provides the JSON node implementation (Node-RED type ID "json" - named jsonnode here to avoid shadowing the imported encoding/json package within this file).
nodes/junction
Package junction provides the Junction node implementation.
Package junction provides the Junction node implementation.
nodes/linkin
Package linkin provides the Link In node implementation.
Package linkin provides the Link In node implementation.
nodes/linkout
Package linkout provides the Link Out node implementation.
Package linkout provides the Link Out node implementation.
nodes/mqttbroker
Package mqttbroker provides the "mqtt-broker" config node - a single shared paho.mqtt.golang connection, referenced by ID from mqtt in/mqtt out nodes rather than each opening its own connection (see docs/NODE_PALETTE_PLAN.md, Phase 6's config-node concept).
Package mqttbroker provides the "mqtt-broker" config node - a single shared paho.mqtt.golang connection, referenced by ID from mqtt in/mqtt out nodes rather than each opening its own connection (see docs/NODE_PALETTE_PLAN.md, Phase 6's config-node concept).
nodes/mqttin
Package mqttin provides the "mqtt in" node implementation - subscribes to a topic on a shared mqtt-broker config node (internal/nodes/mqttbroker) and emits one message per received publish.
Package mqttin provides the "mqtt in" node implementation - subscribes to a topic on a shared mqtt-broker config node (internal/nodes/mqttbroker) and emits one message per received publish.
nodes/mqttout
Package mqttout provides the "mqtt out" node implementation - publishes msg.payload to a topic on a shared mqtt-broker config node (internal/nodes/mqttbroker).
Package mqttout provides the "mqtt out" node implementation - publishes msg.payload to a topic on a shared mqtt-broker config node (internal/nodes/mqttbroker).
nodes/rangenode
Package rangenode provides the Range node implementation (Node-RED type ID "range" - named rangenode here since "range" is a Go keyword and can't be a package name).
Package rangenode provides the Range node implementation (Node-RED type ID "range" - named rangenode here since "range" is a Go keyword and can't be a package name).
nodes/rbe
Package rbe provides the RBE ("report by exception") / Filter node implementation.
Package rbe provides the RBE ("report by exception") / Filter node implementation.
nodes/sortnode
Package sortnode provides the Sort node implementation (Node-RED type ID "sort" - named sortnode here to avoid shadowing the imported stdlib sort package within this file).
Package sortnode provides the Sort node implementation (Node-RED type ID "sort" - named sortnode here to avoid shadowing the imported stdlib sort package within this file).
nodes/split
Package split provides the Split node implementation.
Package split provides the Split node implementation.
nodes/status
Package status provides the Status node implementation.
Package status provides the Status node implementation.
nodes/switchnode
Package switchnode provides the Switch node implementation (Node-RED type ID "switch" - named switchnode here since "switch" is a Go keyword and can't be a package name).
Package switchnode provides the Switch node implementation (Node-RED type ID "switch" - named switchnode here since "switch" is a Go keyword and can't be a package name).
nodes/tcpin
Package tcpin provides the "tcp in" node implementation - either listens for TCP connections (Server mode) or connects out to a remote host (client mode), emitting one message per line or per raw read from every connection.
Package tcpin provides the "tcp in" node implementation - either listens for TCP connections (Server mode) or connects out to a remote host (client mode), emitting one message per line or per raw read from every connection.
nodes/tcpout
Package tcpout provides the "tcp out" node implementation - connects out to a remote host:port and writes msg.payload, once per message (a new connection per Execute call, not a persistent one reused across messages).
Package tcpout provides the "tcp out" node implementation - connects out to a remote host:port and writes msg.payload, once per message (a new connection per Execute call, not a persistent one reused across messages).
nodes/tcprequest
Package tcprequest provides the "tcp request" node implementation - connects out, writes msg.payload, half-closes the write side (signaling EOF to the peer, the common TCP request/response idiom), and returns whatever the peer sends back before closing its own side (or before TimeoutMs/maxReplyBytes is hit).
Package tcprequest provides the "tcp request" node implementation - connects out, writes msg.payload, half-closes the write side (signaling EOF to the peer, the common TCP request/response idiom), and returns whatever the peer sends back before closing its own side (or before TimeoutMs/maxReplyBytes is hit).
nodes/template
Package template provides the Template node implementation.
Package template provides the Template node implementation.
nodes/tlsconfig
Package tlsconfig provides the "tls-config" config node - a reusable TLS client/server certificate configuration referenced by ID from other nodes (http request, mqtt-broker, websocket-client), rather than being wired into a flow itself (see docs/NODE_PALETTE_PLAN.md, Phase 6's config-node concept).
Package tlsconfig provides the "tls-config" config node - a reusable TLS client/server certificate configuration referenced by ID from other nodes (http request, mqtt-broker, websocket-client), rather than being wired into a flow itself (see docs/NODE_PALETTE_PLAN.md, Phase 6's config-node concept).
nodes/trigger
Package trigger provides the Trigger node implementation.
Package trigger provides the Trigger node implementation.
nodes/udpin
Package udpin provides the "udp in" node implementation - listens for UDP datagrams on Port and emits one message per received datagram.
Package udpin provides the "udp in" node implementation - listens for UDP datagrams on Port and emits one message per received datagram.
nodes/udpout
Package udpout provides the "udp out" node implementation - sends msg.payload as a single UDP datagram to Host:Port.
Package udpout provides the "udp out" node implementation - sends msg.payload as a single UDP datagram to Host:Port.
nodes/watch
Package watch provides the Watch node implementation - a registry.EmittingNode with no input port that emits a message whenever one of its configured files or directories changes.
Package watch provides the Watch node implementation - a registry.EmittingNode with no input port that emits a message whenever one of its configured files or directories changes.
nodes/websocketclient
Package websocketclient provides the "websocket-client" config node - an outgoing WebSocket connection to a remote URL, referenced by ID from websocket in/websocket out (see docs/NODE_PALETTE_PLAN.md, Phase 6's config-node concept).
Package websocketclient provides the "websocket-client" config node - an outgoing WebSocket connection to a remote URL, referenced by ID from websocket in/websocket out (see docs/NODE_PALETTE_PLAN.md, Phase 6's config-node concept).
nodes/websocketin
Package websocketin provides the "websocket in" node implementation - emits one message per message received on a shared websocket-listener or websocket-client config node (internal/nodes/websocketlistener, internal/nodes/websocketclient - either works, since both expose the same OnMessage method this node type-asserts for).
Package websocketin provides the "websocket in" node implementation - emits one message per message received on a shared websocket-listener or websocket-client config node (internal/nodes/websocketlistener, internal/nodes/websocketclient - either works, since both expose the same OnMessage method this node type-asserts for).
nodes/websocketlistener
Package websocketlistener provides the "websocket-listener" config node - a server-side WebSocket endpoint mounted on the shared "http in" listener (internal/nodes/httpin), referenced by ID from websocket in/websocket out (see docs/NODE_PALETTE_PLAN.md, Phase 6's config-node concept).
Package websocketlistener provides the "websocket-listener" config node - a server-side WebSocket endpoint mounted on the shared "http in" listener (internal/nodes/httpin), referenced by ID from websocket in/websocket out (see docs/NODE_PALETTE_PLAN.md, Phase 6's config-node concept).
nodes/websocketout
Package websocketout provides the "websocket out" node implementation - sends msg.payload through a shared websocket-listener or websocket-client config node (internal/nodes/websocketlistener, internal/nodes/websocketclient).
Package websocketout provides the "websocket out" node implementation - sends msg.payload through a shared websocket-listener or websocket-client config node (internal/nodes/websocketlistener, internal/nodes/websocketclient).
nodes/xmlnode
Package xmlnode provides the XML node implementation (Node-RED type ID "xml" - named xmlnode here to avoid shadowing the imported encoding/xml package within this file).
Package xmlnode provides the XML node implementation (Node-RED type ID "xml" - named xmlnode here to avoid shadowing the imported encoding/xml package within this file).
nodes/yamlnode
Package yamlnode provides the YAML node implementation (Node-RED type ID "yaml" - named yamlnode here to avoid shadowing the imported yaml.v3 package within this file).
Package yamlnode provides the YAML node implementation (Node-RED type ID "yaml" - named yamlnode here to avoid shadowing the imported yaml.v3 package within this file).
registry
Package registry manages all available node types and their factories.
Package registry manages all available node types and their factories.
state
Package state provides persistence for flows and configurations.
Package state provides persistence for flows and configurations.
typedvalue
Package typedvalue resolves Node-RED-style "typed input" values: a (type, value) pair such as {"str", "hello"} or {"msg", "payload.count"} that a node's configuration uses wherever Node-RED lets a user pick between a literal, a message property, or flow/global context in the editor (the widget backing Switch's rules, Change's set/to, Template's fields, ...).
Package typedvalue resolves Node-RED-style "typed input" values: a (type, value) pair such as {"str", "hello"} or {"msg", "payload.count"} that a node's configuration uses wherever Node-RED lets a user pick between a literal, a message property, or flow/global context in the editor (the widget backing Switch's rules, Change's set/to, Template's fields, ...).

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL