Loading… / Cargando…

Still loading… check your connection Try again

MVVM prototype

How this framework is wired

Clients are Model · ViewModel · View. This page is a View: it only reads state and calls actions. The API lives in the same Next app (app/api/*) and is not MVVM.

1. Layer map

  1. 1
    View
    apps/web/src/app/demo/page.tsx
    This file — JSX only
  2. 2
    ViewModel
    packages/view-models + useArchitectureDemo
    { state, actions }
  3. 3
    Model
    packages/shared ApiClient
    Zod + fetch
  4. 4
    API
    apps/web/src/app/api/v1/* → server/features/*
    Handler → service → repo (no Prisma in route.ts)

Full write-up: docs/MVVM.md

2. Live Model → API → DB

ViewModel useArchitectureDemo calls Model api.demo.architecture().

Loading…

3. Interactive ViewModel lab

Shared useIdentity from @aixiom/view-models. Same hook powers apps/mobile. This form never calls fetch.

canContinue: falsestatus: idle

4. Other surfaces