mvvm-development
Installation
SKILL.md
MVVM development guidance
Use this skill whenever MVVM is the primary pattern in play—new view models, model validation, or wiring UI components to observable commands.
Core packages
packages/mvvm-coreimplements the foundational concepts (BaseModel, RestfulApiModel, BaseViewModel, commands, observable collections, QueryStateModel, DI container). Refer to references/mvvm-core-overview.md for the current shape of each export and the RxJS/Zod patterns the library enforces.packages/modelsandpackages/view-modelsbuild onmvvm-coreand publish workspace-friendly entry points (@repo/models,@repo/view-models). Whenever you create new data shapes or view logic, keep them under these packages so multiple apps can import from the same build outputs.
Model helpers (packages/mvvm-core/src/models)
BaseModelcentralizesdata$,isLoading$, anderror$observables plussetData,setLoading,setError, and avalidatehelper wired to a Zod schema. Every shared model should inherit from it to get consistent state tracking and disposal semantics.RestfulApiModelwrapsFetcher,baseUrl,endpoint,schema, andinitialData. Itsfetch,create,update, anddeletemethods reuse theexecuteApiRequest/optimistic flows fromBaseModel, so you do not re-implement loading/error handling or validation.QueryStateModel,ObservableCollection, and the other helpers inpackages/mvvm-core/src/modelslayer on top when you need caching, pagination, or custom change events for lists of entities.