README.md

May 28, 2026 · View on GitHub

SDuX Vault

Plain TypeScript. Zero Magic.

Deterministic state management for every framework — one pipeline, zero ambiguity.

Docs · Live Examples · Pipeline Builder · Issues

License TypeScript Frameworks


What is SDuX Vault?

SDuX Vault is a framework-agnostic, deterministic state management system built around a reactive execution pipeline. It replaces the unpredictable sprawl of action/reducer architectures with a single, ordered, traceable pipeline where every transition is explicit and every output is guaranteed.

Each unit of state — called a FeatureCell — encapsulates state, pipeline, and lifecycle into a single boundary with built-in handling for persistence, encryption, reducers, caching, and composable behaviors. No actions. No effects ceremony. No dispatch spaghetti.

const cartCell = new FeatureCell<CartState>({
  name: 'cart',
  initialState: { items: [], total: 0, status: 'idle' }
});

cartCell.replaceState({
  value: { items: updatedItems, total: computeTotal(items), status: 'ready' }
});

The Pipeline

Seven stages. One direction. Zero ambiguity.

Controllers → Interceptors → Resolve → Filters → Reducers → Taps → Extensions
StagePurpose
ControllersPolicy-driven governance. Control when, how, and whether execution proceeds.
InterceptorsGuard and transform incoming actions before they reach the pipeline.
ResolveAsync data resolution. Fetch what you need before state commits.
FiltersConditional execution gates. Skip or continue based on state or action shape.
ReducersPure state transformations. Deterministic computation with zero side effects.
TapsObserve committed state without modifying it. Logging, analytics, sync triggers.
ExtensionsPost-commit behaviors like persistence and encryption. State remains pure.

Why SDuX Vault?

CapabilityRedux / NgRxSDuX Vault
State transitionsAction + reducer pairsreplaceState() / mergeState()
Execution orderUnguaranteed middlewareOrdered pipeline stages
State ownershipGlobal store, sharedFeatureCell — scoped
TestingMock deps, variedact → settle → assert
GovernanceCustom middlewarePolicy Controllers
PersistenceThird-party middlewareBuilt-in post-commit
BoilerplateVery highMinimal — Builder generates it

Core Principles

Deterministic by design — Same input. Same pipeline. Same result. Every time.

FeatureCell ownership — One feature. One cell. One truth. Clear boundaries, clear lifecycle, clear responsibility.

Composable behaviors — Enhance pipeline execution without changing contracts. Add caching, encryption, persistence — all opt-in, all traceable.

Testing becomes stable — No flaky tests. No timing hacks. No marble diagrams. Just deterministic queue semantics and clear settlement boundaries.

it('updates cart', async () => {
  cartCell.mergeState({ value: mockItems });
  await vaultSettled('<cart-cell-key>');
  expect(cartCell.state.total).toBe(42);
});

Framework Support

Pure TypeScript core with first-class bindings for every major framework.

FrameworkIntegration
AngularInjectable services
ReactHooks + context
VueComposition API
SvelteStores
Node.jsServer-side state
Any TypeScriptZero dependencies

Quick Start

Pipeline Builder

The fastest path from curiosity to production-ready SDuX Vault. Define your state shape, configure pipeline stages, and get generated type-safe TypeScript — ready to copy or launch directly in StackBlitz.

👉 Launch the Pipeline Builder

Live Examples

Explore real SDuX Vault pipelines in StackBlitz. No install required.

👉 View all examples


Enterprise Ready

  • Auditability — Every state transition is logged and traceable through the pipeline.
  • Security — Post-commit encryption extensions protect sensitive state without compromising deterministic purity.
  • Observability — Pipeline taps provide built-in telemetry hooks. Connect to any monitoring platform without middleware.
  • Compliance — Separate governance from business logic for clearer control evidence.
  • Migration — Adopt incrementally by feature domain rather than platform rewrite.
  • Scale — Bounded ownership keeps product growth coherent across teams.

👉 Enterprise capabilities


Documentation

ResourceLink
Architecture guidesdux-vault.com
Pipeline referencePipeline stages
Migration playbookMigrate from Redux/NgRx
API referenceFull API docs

License

MIT (with SDuX Clarification Notice)