# yoskutik/mobx-react-mvvm architecture

> Architecture diagram of the GitHub repository yoskutik/mobx-react-mvvm, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-06). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/yoskutik/mobx-react-mvvm
- Repository: https://github.com/yoskutik/mobx-react-mvvm

## Overview

This deprecated React MVVM library provides two largely independent runtime capabilities: React views resolve and maintain ViewModels, while Model supplies observable field tracking and validation. The view workflow is supported by both source and README; Model behavior is described in the README and implemented in src/Model.ts. Services are user-defined rather than a package subsystem. The graph omits unsampled integrations and does not imply that Models are used by ViewModels.

Main entry points: [`src/view.tsx`](https://github.com/yoskutik/mobx-react-mvvm/blob/master/src/view.tsx) (View Wrapper), [`src/Model.ts`](https://github.com/yoskutik/mobx-react-mvvm/blob/master/src/Model.ts) (Model Factory), [`src/ViewModel.ts`](https://github.com/yoskutik/mobx-react-mvvm/blob/master/src/ViewModel.ts) (ViewModel Base)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_views["React Views"]
  node_view["View Wrapper<br/>[view.tsx]"]
  node_child["Child View<br/>[view.tsx]"]
  node_boundary["Error Boundary<br/>[view.tsx]"]
  node_context["ViewModel Context<br/>[view.tsx]"]
end

subgraph group_viewmodels["ViewModel Runtime"]
  node_vm["ViewModel Base<br/>[ViewModel.ts]"]
end

subgraph group_models["Observable Models"]
  node_model["Model Factory<br/>[Model.ts]"]
  node_field["Field Tracking<br/>[Model.ts]"]
  node_validation["Field Validation<br/>[Model.ts]"]
end

node_app(("Application"))

node_app -->|"wraps component"| node_view
node_view -->|"resolves instance"| node_vm
node_view -->|"provides instance"| node_context
node_view -->|"wraps render"| node_boundary
node_view -->|"sets props parent"| node_vm
node_view -->|"runs lifecycle"| node_vm
node_app -->|"wraps child"| node_child
node_child -->|"reads instance"| node_context
node_child -->|"wraps render"| node_boundary
node_app -->|"creates model"| node_model
node_model -->|"registers tracking"| node_field
node_model -->|"registers validators"| node_validation

click node_view "https://github.com/yoskutik/mobx-react-mvvm/blob/master/src/view.tsx"
click node_child "https://github.com/yoskutik/mobx-react-mvvm/blob/master/src/view.tsx"
click node_boundary "https://github.com/yoskutik/mobx-react-mvvm/blob/master/src/view.tsx"
click node_context "https://github.com/yoskutik/mobx-react-mvvm/blob/master/src/view.tsx"
click node_vm "https://github.com/yoskutik/mobx-react-mvvm/blob/master/src/ViewModel.ts"
click node_model "https://github.com/yoskutik/mobx-react-mvvm/blob/master/src/Model.ts"
click node_field "https://github.com/yoskutik/mobx-react-mvvm/blob/master/src/Model.ts"
click node_validation "https://github.com/yoskutik/mobx-react-mvvm/blob/master/src/Model.ts"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_view,node_child,node_boundary,node_context toneBlue
class node_vm toneAmber
class node_model,node_field,node_validation toneMint
class node_app toneIndigo
```

## Components

### React Views

- [View Wrapper](https://github.com/yoskutik/mobx-react-mvvm/blob/master/src/view.tsx): `src/view.tsx`
- [Child View](https://github.com/yoskutik/mobx-react-mvvm/blob/master/src/view.tsx): `src/view.tsx`
- [Error Boundary](https://github.com/yoskutik/mobx-react-mvvm/blob/master/src/view.tsx): `src/view.tsx`
- [ViewModel Context](https://github.com/yoskutik/mobx-react-mvvm/blob/master/src/view.tsx): `src/view.tsx`

### ViewModel Runtime

- [ViewModel Base](https://github.com/yoskutik/mobx-react-mvvm/blob/master/src/ViewModel.ts): `src/ViewModel.ts`

### Observable Models

- [Model Factory](https://github.com/yoskutik/mobx-react-mvvm/blob/master/src/Model.ts): `src/Model.ts`
- [Field Tracking](https://github.com/yoskutik/mobx-react-mvvm/blob/master/src/Model.ts): `src/Model.ts`
- [Field Validation](https://github.com/yoskutik/mobx-react-mvvm/blob/master/src/Model.ts): `src/Model.ts`

### Other components

- **Application**

## Connections

- Application → View Wrapper: wraps component (evidence: `README.md`)
- View Wrapper → ViewModel Base: resolves instance (evidence: `src/view.tsx`)
- View Wrapper → ViewModel Context: provides instance (evidence: `src/view.tsx`)
- View Wrapper → Error Boundary: wraps render (evidence: `src/view.tsx`)
- View Wrapper → ViewModel Base: sets props parent (evidence: `src/view.tsx`)
- View Wrapper → ViewModel Base: runs lifecycle (evidence: `src/view.tsx`)
- Application → Child View: wraps child (evidence: `README.md`)
- Child View → ViewModel Context: reads instance (evidence: `src/view.tsx`)
- Child View → Error Boundary: wraps render (evidence: `src/view.tsx`)
- Application → Model Factory: creates model (evidence: `README.md`)
- Model Factory → Field Tracking: registers tracking (evidence: `src/Model.ts`)
- Model Factory → Field Validation: registers validators (evidence: `src/Model.ts`)
