Skip to content

Flow-Like Architecture

Flow-Like is a monorepo with Next.js/React clients and a modular Rust workspace. The clients share one UI package and a set of backend-state interfaces; adapters connect those interfaces to local browser/Tauri state or remote services.

The current Flow-Like repository architecture

DirectoryResponsibility
apps/desktopNext.js client hosted by Tauri for local and desktop-capable operation
apps/webNext.js web client
apps/embeddedEmbeddable app experiences
apps/extensionBrowser extension
apps/backend/localLocal API and runtime binaries
apps/backend/docker-composeSingle-stack services, proxy, runtime, compiler, signaling, and monitoring
apps/backend/kubernetesAPI, executor, compiler, sink trigger, Helm chart, and deployment utilities
apps/backend/awsAWS API, executor, compiler, event bridge, and supporting functions
apps/backend/signalingShared signaling service
apps/docs / apps/websiteDocumentation and public website
apps/schema-gen / apps/utilsSchema and repository utilities

The root Cargo workspace contains the Rust applications and packages. The root Bun workspace contains apps/*, packages/*, and libs/*/*.

packages/ui contains the reusable React layer:

  • the XYFlow-based visual workflow editor;
  • A2UI renderer, Page/Widget builder, and app interfaces;
  • settings and library components;
  • backend-state contracts and their browser-backed implementations;
  • query, assistant, execution-service, and global state integrations.

The state interfaces are the important boundary. A component can request Pages, routes, Events, boards, storage, or executions without hard-coding whether the data comes from IndexedDB, a Tauri command, or an API-backed adapter.

Package groupResponsibility
packages/coreBoards, nodes, pins, variables, app state, execution context, and Flow-Like domain logic
packages/catalog and packages/catalog/*Node registration and implementations split by domain
packages/types / packages/schemaShared contracts and schemas
packages/astFlowScript text-domain model, parsing, rendering, linting, and signatures
packages/storageLocal, memory, cloud, and generic object-store abstraction
packages/secretsSecret-management integrations
packages/sinksEvent sinks and triggers
packages/apiRemote API, authentication/authorization boundaries, execution dispatch, and service state
packages/executorEnvironment-neutral remote execution runtime with callback and streaming modes
packages/compiler / packages/wasmWASM compilation and custom-node runtime
packages/model-providerModel-provider and local inference integrations
packages/bitsAuxiliary Bit workspace crate; the current Bit domain model lives in packages/core
packages/catalog-macros / packages/catalog-build-helperCatalog registration and build support
packages/dexie-tauri-adapterDesktop adapter for browser/Dexie-backed data

The catalog currently includes domain crates for automation, core, data, geo, LLM, media, ML, ONNX, processing, standard nodes, and web operations.

The same frontend package can operate in different environments:

EnvironmentTypical path
Desktop/localReact component → backend-state interface → IndexedDB/Dexie or Tauri command → local Rust state/runtime
Remote/webReact component → backend-state interface → API client → flow-like-api → storage, dispatch, or remote executor
EmbeddedShared use interface with app, route, and Event context supplied by its host

This split is why a feature should normally be added to the interface first, then implemented by each adapter that supports it.

The current workflow execution path

  1. An author edits a Board made of nodes, pins, variables, and connections.
  2. Flow-Like persists the Board and its app metadata. Versioned runs can select a specific Board version.
  3. An app Event identifies the Board and entry node. Each Event runs in exactly one execution mode: Local or Remote.
  4. The selected environment loads the Board, node catalog, payload, variables, user/OAuth context, and scoped credentials.
  5. ExecutionContext evaluates data pins and follows execution pins through the connected graph.
  6. The run emits logs, progress, state, A2UI messages, and results; artifacts and run data are persisted through the configured stores.

The packages/executor crate provides the remote runtime independently of a specific deployment target. It supports streaming responses and callback delivery, while deployment applications provide the surrounding HTTP, queue, container, or function environment.

Every pin has:

  • a direction (Input or Output);
  • a data type, including Execution, scalar values, structures, and generic values;
  • a value shape such as a normal value, array, or set;
  • optional schema and default-value information.

Execution pins control graph traversal. Non-execution pins carry values and are evaluated through the execution context. Struct values can carry schema information, and FlowPilot/FlowScript validation uses the same typed model to reject invalid connections before runtime.

The visual graph uses @xyflow/react; Flow-Like adds its typed node, pin, catalog, validation, layout, and execution behavior on top.

Flow-Like does not assume one physical storage provider. Its storage and credential layers expose logical stores for different workloads:

StoreTypical contents
MetadataApp and Board records, configuration, and small frequently read objects
ContentUploads, generated files, media, model artifacts, and larger objects
LogsRun logs and execution records

The concrete FlowLikeStore supports local, in-memory, AWS/S3-compatible, Azure, Google Cloud Storage, and generic object-store implementations. Remote runtime credentials can scope metadata, content, and log access separately, including mixed-provider deployments.

Deployment-specific configuration may add a CDN store or database services around these core planes. Follow the relevant self-hosting guide instead of copying provider variables from another deployment target.

Events are the bridge between external invocation and a Board:

  • an Event selects a Board, node, version, and Local/Remote mode;
  • UI-capable Event types provide Chat, form, or other built-in interfaces;
  • a Page-target Event uses default_page_id;
  • a route maps only path → eventId;
  • a running Event can stream A2UI messages to the active surface.

See A2UI in Flow-Like and Routes for those frontend contracts.

The repository currently contains four backend shapes:

ShapeRepository locationIntended role
Localapps/backend/localLocal API/runtime development and desktop-adjacent execution
Docker Composeapps/backend/docker-composeSelf-hosted service stack
Kubernetesapps/backend/kubernetesCluster API, compiler, executor, and sink services
AWSapps/backend/awsAWS-native API, execution, compilation, and event services

Deployment capabilities are not inferred from package feature names alone. Check each application’s manifest and configuration because a provider or runtime may be enabled differently by each target.

ChangeStart here
Shared UI or app experiencepackages/ui
Desktop-only capabilityapps/desktop and its Tauri crate
Web-client host behaviorapps/web
Domain model or local executionpackages/core
Node implementationthe matching packages/catalog/* crate
Remote request/authorization pathpackages/api
Remote execution transportpackages/executor and the deployment app
Storage provider behaviorpackages/storage plus deployment credentials/config
Custom-node compilation/runtimepackages/compiler and packages/wasm