MVVM Architecture
Scope
apps/<app>/src/mvvm/ holds two kinds of code:
- App screens composing
@features/*: the screen, its routing, store and analytics wiring, and
the adapters that connect a feature package to app internals.
- App-only features: code that depends on app internals and that no other app or flow reuses.
src/mvvm is not the default home of new code. Decide placement with
structure-flow first: business-aware UI and journeys go to
features/, data access to domain/, generic code to shared/. The app folder keeps only what
composes them.
Example: desktop src/mvvm/features/Contacts/ renders @features/flow-contacts and passes it
app-side adapters (useContactsCurrencySelectionAdapter, useContactsAddressValidationAdapter).
The contacts journey itself lives in the flow package.
The ViewModel pattern is not apps-only: it is also mandatory in every
features/flow package. The folder structure below is apps-only; the anatomy of a flow package