workflow

A library for making composable state machines, and UIs driven by those state machines.

Github stars Tracking Chart

workflow

GitHub license
CocoaPods compatible
Maven Central

A unidirectional data flow library for Kotlin and Swift, emphasizing:

  • Strong support for state-machine driven UI and navigation.
  • Composition and scaling.
  • Effortless separation of business and UI concerns.

This project is currently experimental and the API subject to breaking changes without notice.
Follow Square's engineering blog, The Corner, to see when
this project becomes stable.

While the API is not yet stable, this code is in heavy production use in Android and iOS
apps with millions of users.

Using Workflows in your project

Swift

Swift Package Manager

SwiftPM compatible

If you are developing your own package, be sure that Workflow is included in dependencies
in Package.swift:

dependencies: [
    .package(url: "git@github.com:square/workflow.git", from: "0.21.1")
]

In Xcode 11+, add Workflow directly as a dependency to your project with
File > Swift Packages > Add Package Dependency.... Provide the git URL when prompted: git@github.com:square/workflow.git.

Cocoapods

CocoaPods compatible

If you use CocoaPods to manage your dependencies, simply add Workflow and WorkflowUI to your
Podfile:

pod 'Workflow'
pod 'WorkflowUI'

Kotlin

Maven Central

Quick Start

To get started with a fresh, barebones, Workflow-based Android app, we've created a template
repository – just click "Use this template" to create a new repository with a simple but runnable
app: github.com/square/workflow-android-template

Maven Artifacts

Artifacts are hosted on Maven Central. If you're using Gradle, ensure mavenCentral() appears in
your repositories block, and then add dependencies on the following artifacts:

Lower-level Artifacts

Most code shouldn't need to depend on these directly. They should generally only be used to build
higher-level integrations with UI frameworks.

Resources

Support & Contact

Workflow maintainers hang out in the #squarelibraries
channel on the Kotlin Slack
and the #square-libraries-wtf channel on
the Android Study Group Slack.

Releasing and Deploying

See RELEASING.md.

License

Main metrics

Overview
Name With Ownersquare/workflow
Primary LanguageShell
Program languageRuby (Language Count: 2)
Platform
License:Apache License 2.0
所有者活动
Created At2018-11-16 02:16:30
Pushed At2025-03-03 23:10:25
Last Commit At
Release Count56
Last Release Namev0.28.1 (Posted on )
First Release Namev0.1.0 (Posted on )
用户参与
Stargazers Count1.1k
Watchers Count40
Fork Count69
Commits Count1.8k
Has Issues Enabled
Issues Count334
Issue Open Count9
Pull Requests Count728
Pull Requests Open Count0
Pull Requests Close Count128
项目设置
Has Wiki Enabled
Is Archived
Is Fork
Is Locked
Is Mirror
Is Private