FlowConsole Preview DSL API Reference
Reference for entity types, common fields, and flow methods in the current `.fc.ts` Preview DSL.
The .fc.ts API described here is Preview. Names, shapes, and recommended
patterns can change in the next SDK revisions.
This reference documents the current .fc.ts runtime DSL used in the public
eShop sample. It is the most relevant API surface if you want to create
diagrams in FlowConsole today.
Common entity fields
Most entities support the same base fields:
| Field | Meaning |
|---|---|
id | Optional stable identifier if you do not want FlowConsole to generate one from the name. |
name | Display name shown in the diagram. |
description | Longer human-readable context for the element. |
system | Current Preview shortcut used to place top-level containers under a ComputerSystem. |
belongsTo | Parent boundary or container for nested elements. |
tags | Free-form labels for future filtering or classification. |
badge | Small visual marker shown on the element. |
tone | Visual emphasis such as primary, muted, success, warning, or danger. |
Entity types used in eshop.fc.ts
Actors and boundaries
User: external actor that initiates a flow, such asCustomerorStore Admin.ComputerSystem: top-level system boundary, such aseShop Platform.Container: architectural boundary used to group applications, APIs, data, or messaging inside the system.
Applications and services
ReactApp: a user-facing frontend application.RestApi: an HTTP-based backend service or gateway.BackgroundJob: asynchronous worker that consumes events or performs scheduled processing.
Data and messaging
Postgres: relational database.Redis: cache or fast key-value store.KafkaTopic: event stream or topic.
External dependencies
ExternalService: third-party integration such as Stripe or SendGrid.
Parenting and structure
The current Preview DSL usually uses two parent fields:
system: place a top-levelContainerunder aComputerSystembelongsTo: place concrete apps, APIs, jobs, databases, caches, topics, and external services inside a container or logical boundary
Example:
const eshop: ComputerSystem = { name: "eShop Platform" };
const services: Container = { name: "Backend Services", system: eshop };
const orderingApi: RestApi = {
name: "Ordering Service",
description: "Order processing & state machine",
belongsTo: services,
};Flow methods
The current flow API is fluent and order-sensitive.
sendsRequestTo(target, label, options?)
Creates a flow step from the current entity to target.
customer.sendsRequestTo(webApp, "open store");sendsRequest(target, label, options?)
Alias of sendsRequestTo(...). Use whichever reads better in your model.
then(target)
Moves the flow cursor to another entity before the next step.
customer
.sendsRequestTo(webApp, "checkout")
.then(webApp)
.sendsRequestTo(apiGw, "POST /orders");getDataFrom(target, label, options?)
Describes a read or pull-style step. In practice it is useful for databases, read models, and cached data access.
executesRequest(action, options?)
Describes an internal step that stays on the same entity.
notificationWorker
.sendsRequestTo(orderEvents, "consume OrderPaid", { kind: "async" })
.executesRequest("render email template");inParallel(...branches)
Executes multiple branches under the same parent flow.
orderingApi.inParallel(
() => orderingApi.sendsRequestTo(orderingDb, "INSERT order", { kind: "dependency" }),
() => orderingApi.sendsRequestTo(orderEvents, "publish OrderCreated", { kind: "event" }),
() => orderingApi.sendsRequestTo(basketApi, "clear cart"),
);ConnectionOptions
ConnectionOptions refines the meaning of a flow step.
| Field | Meaning |
|---|---|
detail | Additional text detail for the connection. |
kind | Semantic kind of the connection. |
icon | Optional icon hint for future visualization. |
muted | Optional visual de-emphasis. |
ConnectionOptions.kind
The current Preview recognizes four connection kinds:
| Kind | When to use it |
|---|---|
sync | Direct request-response call. This is the default for sendsRequestTo. |
async | Deferred work, worker handoff, or non-blocking processing. |
event | Event publication or event-driven communication. |
dependency | Data access, dependency edge, or implementation dependency. |
Runtime DSL vs package SDK
This documentation is intentionally centered on .fc.ts runtime files. If you
are using the import-based @flowconsole/sdk, treat it as an adjacent API
surface, not as the canonical contract for this Preview documentation.
For a complete walkthrough based on the public sample, continue with the eShop guide.