Skip to content
Flow Example
AutoXXS (320px)XS (375px)SM (640px)MD (768px)LG (1024px)XL (1280px)XXL (1536px)
SketchMaterialiOSTamagui
DataInjectionKeyPatternsServiceTransactionProcessResearchProductQualityPerformanceSpecDomainFunctionTechnologyArchitectureConfigMiddlewareDataDatabaseDrizzleMigrationModelop-sqliteSchemaSQLState ManagementDraftKeystoneMergePatchPatchesPersistenceReactiveRedoStoreUndoTestingDeviceFactoryIsolationTypeScriptZodTopicsCommunicationBidsNVCDesignDesign ImplicationsEducationPedagogyFoundationsPsychologyAttachmentFloodingRelatingAuthentic RelatingUIEditorReact Native

Flow Example

Flow doc with steps, branches, and paths
flowscaffoldcomplete flow-complete-example
type: flow
id: signin
title: Sign In
status: draft
tags: [auth]
context:
- feature/authentication
- domain/auth
{% tldr scope="agent" %}
Sequences the credential submission and session creation steps for the authentication feature.
{% /tldr %}
{% flow id="signin" feature="feature/authentication" scope="agent" %}
{% precondition %}User account exists and status is active.{% /precondition %}
{% postcondition %}Session token issued; user redirected to dashboard.{% /postcondition %}
{% postcondition outcome="invalid-credentials" %}Login attempt logged; error message shown.{% /postcondition %}
{% step actor="user" %}
User navigates to the login screen.
{% /step %}
{% step action="submit-credentials" actor="user" %}
User submits email and password via the login form.
{% /step %}
{% branch condition="credentials-valid" %}
{% path outcome="success" label="Session created" emit="user-authenticated" %}
validate-credentials succeeds → CreateSession → user-authenticated event emitted → redirect.
{% /path %}
{% path outcome="invalid-credentials" label="Login failed" throws="invalid-credentials" %}
validate-credentials fails → increment attempt counter → show error message.
{% /path %}
{% /branch %}
{% /flow %}