# cashapp/molecule

Build a StateFlow stream using Jetpack Compose

Repository: https://github.com/cashapp/molecule
Canonical: https://ross.abutalabs.com/products/cashapp-molecule
Homepage: https://cashapp.github.io/molecule/docs/2.x/
Language: Kotlin
License: Apache-2.0
License Family: permissive
Last push: 2026-08-22T23:55:52+00:00

## Health v2 (maintenance only)
Score: 73/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 99, release rhythm 25, longevity 100
- inputs: {"age_days": 1911, "days_push": 11, "days_rel": 343, "gap_med": 165, "n_releases_24m": 2}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 2222, forks 113 (observed 2026-08-28T04:06:27.676510+00:00)

## What it is
Molecule is a Kotlin library from Cash App that lets you build StateFlow or Flow streams using Jetpack Compose's runtime, without its UI toolkit. It enables writing presenter logic as composable functions that emit reactive state streams.

## Use cases
- build a StateFlow from composable state logic
- separate business logic from UI in Android apps
- write presenters using Jetpack Compose runtime
- test presenter logic without UI layer
- share reactive state logic across Kotlin multiplatform targets

## When to choose
- you use Kotlin coroutines Flow and want declarative state logic
- you want to test business logic separately from Compose UI
- you're building MVI-style presenters in Kotlin Multiplatform

## When to avoid
- you don't use Kotlin or coroutines
- you want full Compose UI rendering rather than headless state streams

## Facets
- artifact type: library
- maturity: active
- function: state-management, concurrency
- domain: mobile-development, developer-tools, cross-platform
- platform: jvm, cross-platform
- tags: jetpack-compose, kotlinx-coroutines, stateflow, mvi, presenter-pattern, reactive, android

## Member repositories
- cashapp/molecule (main) score 73

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:06:27.676510+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:45:45.681689+00:00, confidence not recorded.
  - readme: https://github.com/cashapp/molecule (fetched 2026-08-28T04:06:27.676510+00:00, sha 68425f16d707)
  - homepage: https://cashapp.github.io/molecule/docs/2.x/ (fetched 2026-08-29T10:25:38.344454+00:00, sha 904b7753441d)
- Data as of 2026-08-30T08:39:29.467469+00:00.
