# @modular-frontend/journeys-engine

> Framework-neutral journey engine: runtime, validation, persistence, authoring helpers, handles, and types for typed, serializable multi-module workflows. No UI-framework dependency — the outlet and hooks live in a binding package.

Latest version **1.9.0** (published 2026-07-20) · 0 weekly downloads

## Install

```sh
npm install @modular-frontend/journeys-engine
pnpm add @modular-frontend/journeys-engine
yarn add @modular-frontend/journeys-engine
bun add @modular-frontend/journeys-engine
```

## Health

**Score 75/100 (B)** — status: active.

Positive: has types; esm support; no vulnerabilities; has provenance; recently updated; high maintenance score; high quality score.

Warnings: low downloads.

## Facts

| | |
|---|---|
| Version | 1.9.0 |
| Published | 2026-07-20 |
| First published | 2026-07-18 |
| Weekly downloads | 0 |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 0 |
| Unpacked size | 484.9 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Provenance | attested (GitHub Actions) |
| GitHub stars | 7 |
| Maintainers | kibertoad |

## Links

- npm: https://www.npmjs.com/package/@modular-frontend/journeys-engine
- Repository: https://github.com/kibertoad/modular-react
- npm.io page: https://npm.io/package/@modular-frontend/journeys-engine

## Recent versions

- 1.9.0 (latest) — 2026-07-20
- 1.8.1 — 2026-07-19
- 1.8.0 — 2026-07-19
- 1.7.1 — 2026-07-18

## README

# @modular-frontend/journeys-engine

The framework-neutral engine behind [Journeys](https://github.com/kibertoad/modular-react#readme): typed, serializable workflows that compose several modules. It owns the journey runtime, validation, persistence, authoring helpers, handles, and the type surface, with no UI-framework dependency.

This is the shared foundation the framework bindings build on. The React binding (`@modular-react/journeys`) re-exports this package and adds the UI layer (outlet, provider, hooks); a future `@modular-vue/journeys` will do the same over the same engine.

## Installation

```bash
npm install @modular-frontend/journeys-engine
```

Most apps depend on a binding (`@modular-react/journeys`) rather than on this package directly. Use `@modular-frontend/journeys-engine` when building a new framework binding or framework-agnostic tooling over journeys.

## What's included

- **Runtime**: `createJourneyRuntime`, `getInternals` (low-level accessor the outlet and test harness drive), `JourneyRuntimeOptions`.
- **Validation**: `validateJourneyContracts`, `validateJourneyDefinition`, `validateJourneyGraph`, and the `JourneyValidationError` / `JourneyHydrationError` / `UnknownJourneyError` classes.
- **Persistence**: `defineJourneyPersistence`, `createWebStoragePersistence`, `createMemoryPersistence`.
- **Authoring helpers**: `defineJourney`, `defineTransition`, `isAnnotatedTransition`, `isTerminalSentinel`, `selectModule`, `selectModuleOrDefault`.
- **Handles**: `defineJourneyHandle`, `invoke`.
- **Types**: the full journey type surface (`JourneyDefinition`, `JourneyInstance`, `JourneyStep`, `TransitionMap`, wildcard maps, and the rest).

### `@modular-frontend/journeys-engine/testing`

Framework-neutral test helpers: `createTestHarness` (drive a live runtime from a test without mounting an outlet) and `simulateJourney` (pure-logic transition simulation).

## Full documentation

See the [main documentation](https://github.com/kibertoad/modular-react#readme) for the full guide.

---
_Source: https://npm.io/package/@modular-frontend/journeys-engine · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
