# square/workflow

**Attribution required: if you use, quote, or summarise this content, you must credit and link back to [awesome-repositories.com](https://awesome-repositories.com/repository/square-workflow).**

1,163 stars · 73 forks · Shell · Apache-2.0

## Links

- GitHub: https://github.com/square/workflow
- Homepage: https://square.github.io/workflow
- awesome-repositories: https://awesome-repositories.com/repository/square-workflow.md

## Topics

`android` `ios` `kotlin` `reactive` `state-machine` `swift` `ui` `workflow`

## Description

Workflow is a cross-platform architectural framework for building deterministic unidirectional state machines and user interfaces in native mobile applications. Available as libraries for both Kotlin and Swift, the framework manages application state and screen navigation using composable state machines that direct data in a single direction from source to interface while routing user actions back to business logic. 

The architecture models screen navigation as nested presenter states and recursive component hierarchies rather than separate routing logic. Complex application features are built through the hierarchical composition of smaller workflows, utilizing immutable value types and pure state transition functions to process screen states, inputs, and navigation structures. 

The system connects declarative rendering structures and event callback handlers directly to platform-specific mobile user interface elements. Business logic and state transitions are isolated into self-contained units that support unit testing without requiring mobile frameworks.

## Tags

### User Interface & Experience

- [Widget Tree Compositions](https://awesome-repositories.com/f/user-interface-experience/nested-ui-composition-patterns/widget-tree-compositions.md) — Builds complex application features through recursive nesting of smaller state machines into modular component hierarchies.
- [Navigation State Management](https://awesome-repositories.com/f/user-interface-experience/navigation-actions/state-driven-navigations/navigation-state-management.md) — Treats screen navigation as presenter state to manage complex flows using state machines. ([source](https://square.github.io/workflow))

### Part of an Awesome List

- [Unidirectional Data Flow](https://awesome-repositories.com/f/awesome-lists/devtools/unidirectional-data-flow.md) — Directs application state and navigation downwards while routing user actions predictably back to business logic. ([source](https://square.github.io/workflow))

### Mobile Development

- [Cross-Platform App Development](https://awesome-repositories.com/f/mobile-development/cross-platform-app-development.md) — Provides a cross-platform architectural framework for building mobile applications across iOS and Android.
- [Cross-Platform Mobile View Bindings](https://awesome-repositories.com/f/mobile-development/cross-platform-mobile-view-bindings.md) — Connects declarative rendering structures and event callbacks directly to native mobile user interface frameworks for Android and iOS. ([source](https://github.com/square/workflow/blob/main/README.md))
- [Mobile Application State Management](https://awesome-repositories.com/f/mobile-development/mobile-application-state-management.md) — Manages complex application state and data flow in mobile apps using predictable unidirectional patterns.
- [Swift State Management Libraries](https://awesome-repositories.com/f/mobile-development/swift-state-management-libraries.md) — Provides a Swift library for building composable state machines and unidirectional user interface architectures.
- [View Bindings](https://awesome-repositories.com/f/mobile-development/view-bindings.md) — Connects declarative rendering structures and event callback handlers directly to platform-specific mobile user interface elements.

### Software Engineering & Architecture

- [Centralized State Containers](https://awesome-repositories.com/f/software-engineering-architecture/architectural-design-patterns/state-management/centralized-state-containers.md) — Routes data strictly from business logic to the interface and returns events in a single direction to keep application state unified. ([source](https://square.github.io/workflow/userguide/concepts/))
- [Kotlin Framework Libraries](https://awesome-repositories.com/f/software-engineering-architecture/finite-state-machine-libraries/kotlin-framework-libraries.md) — Provides a Kotlin library for managing unidirectional application state and screen navigation using composable state machines.
- [Cross-Platform Mobile Architectures](https://awesome-repositories.com/f/software-engineering-architecture/mobile-architecture-patterns/cross-platform-mobile-architectures.md) — Implements an architectural pattern for driving native mobile user interfaces from deterministic state machines across multiple platforms.
- [Hierarchical State Composition](https://awesome-repositories.com/f/software-engineering-architecture/architectural-design-patterns/state-management/centralized-state-containers/state-containers/hierarchical-state-composition.md) — Builds complex features through recursive composition of smaller workflows to scale state management and organize screens modularly. ([source](https://square.github.io/workflow/userguide/concepts/))
- [Value Type State Models](https://awesome-repositories.com/f/software-engineering-architecture/architectural-design-patterns/state-management/state-logic-and-utilities/immutable-state-utilities/pure-state-transitions/value-type-state-models.md) — Represents all screen states, inputs, and navigation structures as immutable data values processed by pure state transition functions.
- [Coordinator Navigation Patterns](https://awesome-repositories.com/f/software-engineering-architecture/coordinator-navigation-patterns.md) — Models navigation structures using nested presenter states and recursive component hierarchies. ([source](https://github.com/square/workflow/blob/main/README.md))

### Testing & Quality Assurance

- [Business Logic Testing](https://awesome-repositories.com/f/testing-quality-assurance/business-logic-testing.md) — Verifies application state machine correctness and validates business logic using straightforward unit tests that ensure reliable runtime behavior. ([source](https://square.github.io/workflow))
- [Business Logic Isolation](https://awesome-repositories.com/f/testing-quality-assurance/general-testing-utilities/test-isolation/logic-isolation-utilities/business-logic-isolation.md) — Isolates core business logic and state transitions into self-contained units that run simple unit tests without mobile frameworks.

### Web Development

- [Immutable State Stores](https://awesome-repositories.com/f/web-development/reactive-state-management/immutable-state-stores.md) — Organizes business logic and screen state into immutable unidirectional units that pass data downward and trigger events upward. ([source](https://github.com/square/workflow/blob/main/README.md))
- [Component-Based State Management](https://awesome-repositories.com/f/web-development/frontend-development-tools/state-data-management/component-lifecycle-utilities/component-state-management/component-based-state-management.md) — Manages private state and configuration inputs to transform raw data into renderable display structures containing event handlers. ([source](https://square.github.io/workflow/userguide/concepts/))
