Skip to main content

@hex-di ecosystem

Flow

Type-Safe State Machines for TypeScript

Get Started
npm install @hex-di/flow

:: features

Why Flow?

Compile-Time Transitions

Invalid state transitions are TypeScript errors. The type system enforces your state machine design.

Statecharts

Hierarchical states, parallel regions, history states, and guards. Full statechart semantics.

Effects & Actions

Side effects are declared, not hidden. Entry actions, exit actions, and transition effects.

DI Integration

State machines that resolve services from your DI graph. Inject dependencies into guards and effects.

Serializable

Snapshot and restore machine state. Perfect for persistence, debugging, and time-travel.

Visual Debugging

Inspect machine state, history, and transitions with the HexDI devtools.

:: ecosystem

Part of the HexDI Stack

Flow integrates seamlessly with the HexDI dependency injection ecosystem. Use it standalone or compose it with other libraries.

Explore HexDI