Docs
API Reference
API Reference
FlowConsole DSL lets you describe your system’s schema (actors, systems, containers, components, and their interactions) as regular TypeScript. The types below are available from @flowconsole/core and are the building blocks the renderer understands.
Quick start
import {
User,
ComputerSystem,
Container,
ReactApp,
RestApi,
Redis,
Postgres,
KafkaTopic,
MessageQueue,
ExternalService,
BackgroundJob
} from "@flowconsole/core";Core node properties
All nodes has the same base properties:
name(string, required) — display name on the diagram.description(string) — short description for tooltips.belongsTo/system(Container | ComputerSystem) — parent grouping.tags(string[]) — categorization tags.badge(string) — small label shown with the node.tone('primary' | 'muted' | 'success' | 'warning' | 'danger') — accent color.id(string) — stable identifier (auto-generated if omitted).
Specialized nodes
User— [C1 level] end users or system actors;ComputerSystem— [C1 level]top-level product/domain;Container— [C2 level]subsystem/module boundary;ReactApp— [C3 level] client apps (SPA/mobile shell);framework?: string,url?: string;RestApi— [C3 level] HTTP API services;method?: string,endpoint?: string;Redis— [C3 level] Redis instance/cluster for cache or sessions;cluster?: string;Postgres— [C3 level] PostgreSQL database;schema?: string;KafkaTopic— [C3 level] Kafka topic for events/telemetry;partitionCount?: number;MessageQueue— [C3 level] async queue (e.g., SQS/RabbitMQ);throughput?: string;ExternalService— [C3 level] third-party/SaaS dependency;vendor?: string;BackgroundJob— [C3 level] scheduled job/pipeline/worker;schedule?: string.
Fluent API
Every node can initiate or receive flows. Flows are chainable.
sendsRequestTo(target, label, options?)— request/command to another component;getDataFrom(target, label, options?)— data retrieval from component;executesRequest(action, options?)— marks an action without a target;inParallel(...branches)— run several branch functions concurrently;then(nextNode)— returnsnextNodeto add new subflow.
options (ConnectionOptions):
kind?: 'sync' | 'async' | 'event' | 'dependency'— interaction type (default: 'sync');detail?: string— additional info for tooltips;icon?: string— custom icon URL for the flow arrow;muted?: boolean— visually de-emphasize the flow.
Example
const user: User = { name: "Customer", persona: "Retail banking" };
const core: ComputerSystem = { name: "Core Banking" };
const api: RestApi = { name: "Accounts API", method: "GET", belongsTo: core };
const db: Postgres = { name: "Ledger DB", schema: "public", system: core };
const auditStream: KafkaTopic = { name: "Audit Events", partitionCount: 12, system: core };
user
.sendsRequestTo(api, "login")
.getDataFrom(db, "verify credentials", { kind: "sync" })
.sendsRequestTo(auditStream, "emit audit", { kind: "event" });