Architecture

Architecture Diagram

Spaces

There are three places where code can run.

Userspace — user-written code. In development it runs locally; when deployed, it runs inside an AWS Lambda.

Client — code packaged in the Floww SDK. Responsible for invoking userspace with the correct context.

Server — backend code that interacts with the database, deploys AWS Lambdas, and invokes them with the correct context.

Components

ComponentRole
WorkOSAuthentication provider across CLI, admin page, dashboard, etc.
CentrifugoManages WebSocket connections and broadcasting for live flow triggers
CLIPart of the SDK — provides init, dev, deploy, and other commands
SDKContains provider action implementations and typings for triggers
ECRAWS container registry storing Docker runtimes used by Lambdas

Flows

Dev (client)

Prerequisites

  • Check that the workflow exists

Execution

  1. Fetch available providers in the namespace
  2. Initialize userspace with provider configs
  3. Execute userspace — returns triggers and provider usage
  4. Verify all used providers are configured (prompt user if any are missing)
  5. Set up event routing to userspace via WebSocket and local events
📝
Reruns
  • Code changes re-run from step 3
  • Configuring a provider re-runs from step 1

Deploy (client)

Prerequisites

  • Check that the workflow exists (prompt user to create one if missing)

Checks

  1. Fetch available providers in the namespace
  2. Execute userspace — returns triggers and provider usage
  3. Verify all used providers are configured (prompt user if any are missing)

Deploy

  1. Build the runtime image
  2. Upload runtime image (if not already present)
  3. Create runtime (if not already present)
  4. Create deployment
📝
Reruns
  • Configuring a provider re-runs from step 2

Incoming webhook (server)

  1. Receive inbound HTTP request at the webhook URL
  2. Look up the matching trigger registration by path
  3. Invoke the associated Lambda with the request payload
  4. Return the Lambda’s response to the caller