# Tinder/StateMachine

A Kotlin and Swift DSL for finite state machine

Repository: https://github.com/Tinder/StateMachine
Canonical: https://ross.abutalabs.com/products/statemachine
Language: Swift
License: NOASSERTION
License Family: other
Last push: 2024-07-22T04:05:41+00:00

## Health v2 (maintenance only)
Score: 23/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 0, release rhythm 8, longevity 100
- inputs: {"age_days": 3015, "days_push": 772, "days_rel": null, "gap_med": null, "n_releases_24m": 0}
- flags: no_license
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 2078, forks 136 (observed 2026-08-28T04:06:11.367979+00:00)

## What it is
A Kotlin and Swift DSL library for defining finite state machines with typed states, events, and side effects. It lets developers declaratively specify state transitions and handle transition events, and is used internally by Tinder's Scarlet library.

## Use cases
- model app UI states with a finite state machine
- define state transitions in Kotlin with a DSL
- implement state machines in Swift for iOS apps
- manage side effects on state transitions
- replace ad-hoc boolean state flags with a formal state machine

## When to choose
- you need a lightweight, typed finite state machine in Kotlin or Swift
- you want declarative transition definitions with side-effect handling
- you're already using Tinder's Scarlet and need its state machine dependency

## When to avoid
- you need hierarchical or concurrent statecharts (this supports only flat FSMs)
- you're working outside Kotlin or Swift
- you need a maintained multi-platform state machine with active development

## Facets
- artifact type: library
- maturity: maintenance
- function: state-management, developer-tools
- domain: developer-tools, mobile-development
- platform: jvm
- tags: finite-state-machine, dsl, kotlin-multiplatform, state-transitions, algorithms, swift, ios, android

## Member repositories
- Tinder/StateMachine (main) score 23

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:06:11.367979+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-30T02:56:06.050707+00:00, confidence not recorded.
  - readme: https://github.com/Tinder/StateMachine (fetched 2026-08-28T04:06:11.367979+00:00, sha cc0f14e25169)
- Data as of 2026-08-30T08:39:29.467469+00:00.
