Workflow Orchestration
Reimagined
Dead simple. Fully typed. Effortlessly orchestrated.
Core Philosophy
Built on first principles to solve the complexity of state management and workflow orchestration.
Workflows as Graphs
Build logic with explicit steps and edges. Each transition is deterministic and type-checked, making complex flows understandable and testable.
Type-Safety End-to-End
Strong TypeScript APIs ensure inputs, states, and transitions are safe. Zod integration adds runtime validation without compromising ergonomics.
Immutability
State updates are immutable by default. This ensures predictable state changes and enables powerful features like time-travel debugging.
Co-location
Achieve clear separation of concerns by decoupling UI from business logic. The architecture forces you to co-locate logic with its relevant components, ensuring that business rules remain pure, testable, and independent of the view layer.
Framework Agnostic
The core is UI-agnostic and works in any framework or runtime. Optional adapters integrate with different UIs without coupling.
AI-Friendly
Built for the AI era. The co-located structure allows AI to precisely target and modify specific logic blocks with high confidence. This isolation makes AI-generated changes transparent, safe, and easy for humans to verify.
Build in Seconds
Compose workflows visually or with code. motif-ts keeps them in sync.
Add steps to start building...
Everything you need to drive workflows
Powerful primitives for building complex application workflows with confidence.
Workflow Orchestrator
Compose steps with typed transitions, back navigation, lifecycle control, and middleware hooks.
@motif-ts/coreDevTools & Persistence
Time-travel with Redux DevTools, export/import full snapshots or just the workflow config, and safely restore any state.
@motif-ts/middlewareFramework Adapters
Use adapters to integrate with UI of choice. React adapter is included. More adapters are coming soon.
@motif-ts/react@motif-ts/vue(coming soon)@motif-ts/svelte(coming soon)Expression Engine
Serialize expressions for portable workflows. Supports modern JavaScript syntax like optional chaining, template literals, and object spread.
@motif-ts/expressionDetailed Usage Guide
Step-by-step instructions to get you up and running.
pnpm add @motif-ts/core @motif-ts/react