← back to the tree

VMx

Spec-driven, lifecycle-aware MVVM framework — one spec, five conformance-checked language flavors.

one spec5 languages408 conformance scenarios

dotnet add package VMx

VMx set over a weathered MVVM ghost — one framework across C#, Python, TypeScript, Swift, and Rust.
The VMx wordmark over its MVVM lineage. Brand card, 2026 — VMx repository.

Build the same app shape in more than one language and you re-invent viewmodel lifecycle and state management in each stack, slightly differently every time. VMx is one answer to that, built the unusual way round: a single language-neutral specification is the source of truth, and each language — C#, Python, TypeScript, Swift, and Rust — is an idiomatic re-implementation of it, not a port of a shared codebase. It assumes nothing about the UI, so the same viewmodel contract drives WPF, Avalonia, Textual, SwiftUI, a browser DOM, or a Ratatui terminal. What keeps the five honest is a conformance catalog of 408 scenarios — 403 library behaviors plus five shared UI scenarios — that every flavor is checked against, so “the same behavior” is proven rather than promised.

Highlights

  • Five-state construction lifecycleDestructed through terminal Disposed, with reversible construct and destruct, a reconstruct(), and a synchronous depth-first dispose() cascade callable from any state
  • Reactive message hub — property-change and construction-status events built on each language’s native reactive primitive instead of a lowest-common-denominator shim
  • Four hierarchy primitives — leaf ComponentVM, selectable CompositeVM, peer GroupVM, and fixed-arity AggregateVM, plus forwarding decorators for instrumentation
  • 22 opt-in capability interfaces — small ISelectable, IExpandable, IPageable-style mixins that layer behavior onto a viewmodel additively rather than by inheritance
  • Higher-level primitivesRelayCommand with reactive canExecute, DerivedProperty for computed values, FormVM for snapshot and revert, and paged compositions for finite and cursor-based lists
  • Proven against the spec, not each other — each flavor runs the shared catalog in its own native test framework, so a passing build means it matches the specification, not another implementation
  • Flagship Notes Workspace examples — the same app built once per flavor (Avalonia, Textual, React, SwiftUI, and a Rust Ratatui build), the UI-backed four exercising 19 distinct VMx features against a shared parity matrix for a direct cross-language comparison

Stack & Architecture

The specification — 24 markdown chapters, 128 architecture decision records, and shared JSON fixtures — is the source of truth that five idiomatic implementations satisfy, each verified by a conformance suite written in its own test framework, with a coverage checker enforcing 100% of the catalog in CI. Every flavor versions independently in SemVer and declares which spec version it implements, so a spec major bump forces one in each active flavor. The Python and Swift flavors ship as installable packages on PyPI and SwiftPM, and all five build from the one monorepo.


Status

Actively developed and Apache-2.0 licensed, with a full documentation site built from the in-repo docs, including one-page integration recipes for 11 UI frameworks — WPF, MAUI, Avalonia, Textual, NiceGUI, Tkinter, React, Vue, Svelte, SolidJS, and SwiftUI.