Docs
FlowConsole Preview DSL API Reference

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:

FieldMeaning
idOptional stable identifier if you do not want FlowConsole to generate one from the name.
nameDisplay name shown in the diagram.
descriptionLonger human-readable context for the element.
systemCurrent Preview shortcut used to place top-level containers under a ComputerSystem.
belongsToParent boundary or container for nested elements.
tagsFree-form labels for future filtering or classification.
badgeSmall visual marker shown on the element.
toneVisual 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 as Customer or Store Admin.
  • ComputerSystem: top-level system boundary, such as eShop 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-level Container under a ComputerSystem
  • belongsTo: 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.

FieldMeaning
detailAdditional text detail for the connection.
kindSemantic kind of the connection.
iconOptional icon hint for future visualization.
mutedOptional visual de-emphasis.

ConnectionOptions.kind

The current Preview recognizes four connection kinds:

KindWhen to use it
syncDirect request-response call. This is the default for sendsRequestTo.
asyncDeferred work, worker handoff, or non-blocking processing.
eventEvent publication or event-driven communication.
dependencyData 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.