Module Browser (/modules)
Module Browser (/modules)
Every Redelay Go application mounts a live, interactive module catalogue at
/modules (enabled by blank-importing modules/modspec). It is the single
place to discover what a running service exposes — events, packets, HTTP
routes, FlowDSL nodes, entities, and their schemas — without reading source
code.
Enabling
import _ "github.com/redelay/go-framework/modules/modspec"
Routes registered:
| Path | Content |
|---|---|
GET /modules.json | Canonical JSON manifest — consumed by the UI and by redelay://modules.json MCP resource |
GET /modules | The HTML / JS client-side app |
Environment variables: MODSPEC_SPEC_PATH, MODSPEC_UI_PATH. Static assets
are loaded from WEBSITE_URL (defaults to https://redelay.com).
Anatomy of a module card
Each module rendered on the page has:
- Header — name, icon, version, description, dependency chips.
- Diagram — auto-generated SVG that summarises the module's exposable surface (events, entities, routes, settings, FlowDSL nodes). Elements are clickable — clicking a node, port type, or entity opens the detail panel.
- Tabs — Events, Packets, Entities, Routes, FlowDSL Nodes, Settings, Consumers (whichever sections the module actually populates).
SVG diagram elements
| Element | Meaning |
|---|---|
| Accent-coloured card header | Module name + icon |
N fields badge on entities | Number of fields declared on the entity |
| Kind badge on FlowDSL nodes | source, action, transform, router, subworkflow |
N badge on settings groups | Number of settings in the group |
| Port rows on FlowDSL nodes | Input/output port name + type; clickable to open schema |
Clickable zones inside the SVG:
- Clicking a node card opens the full node detail panel (settings, ports, schemas).
- Clicking an input/output port type opens the type panel with resolved
$refschema andx-fieldsfallback. - Clicking an entity row opens its fields table.
Node detail panel
Opened by clicking any FlowDSL node in any view. Shows:
- Header: id, human name, kind badge, tags, module.
- Summary + description.
- Handler reference — Go symbol that implements the node.
- Settings — grouped by
x-ui.groupand sorted byx-ui.order. Each setting renders name, type, required/secret markers, default, placeholder, enum values, and description. - Input / output ports — each with description, type name, and a
resolved schema view. Ports reference external OpenAPI/AsyncAPI documents
via
$refvalues likeasyncapi:default#/components/schemas/EventMessage; the UI fetches those specs at load time and resolves the fields live.x-fieldsfallbacks are used when the external spec is unreachable.
Companion modules
Modules whose sibling *-flowdsl subpackage adds FlowDSL nodes (for
example auth + auth-flowdsl, events + events-flowdsl) are folded
back into their parent on the page. The parent card's FlowDSL Nodes tab
shows the merged set, and its diagram renders companion nodes alongside
native ones. The companion module itself is hidden from the top-level list
to avoid duplication.
Live data
The /modules.json manifest and SVG diagrams are rebuilt from
registry.IRModules() on each request. Adding a module, event, or FlowDSL
node and restarting the server is enough — there is no build step.
For AI assistants
An MCP client connected to the same service gets programmatic access to
the same data through the built-in introspection tools (list_modules,
describe_flowdsl_node, search_redelay, etc.) and the
redelay://modules.json resource. See the
MCP server reference.