The schema seam: one entity, seven screens, one JSON

The schema seam: one entity, seven screens, one JSON A data-flow diagram generated by Archify. 01 / Source 02 / Schema 03 / Routes 04 / Resources 05 / Shells entity struct · tagged fields · 01 / Source · task/contracts entity struct tagged fields task/contracts crud.Fields[T] · → crud.Schema · 02 / Schema · kit/crud crud.Fields[T] → crud.Schema kit/crud rest.Spec.Mount · five CRUD routes · 03 / Routes · kit/rest rest.Spec.Mount five CRUD routes kit/rest OpenAPI document · /openapi.json · 03 / Routes · server.docs OpenAPI document /openapi.json server.docs screens.Mount · List · Detail · Form · 04 / Resources · ui/screens screens.Mount List · Detail · Form ui/screens Resource register · api.Resources() · 04 / Resources · kit/httpx Resource register api.Resources() kit/httpx screens.Describe · /api/v1/admin/resources · 04 / Resources · GET screens.Describe /api/v1/admin/resources GET api.ts · on entry.path · 04 / Resources · src/effects api.ts on entry.path src/effects Web shell (admin) · no code per entity · 05 / Shells · modules/admin Web shell (admin) no code per entity modules/admin parseCatalog · → derive.ts · 05 / Shells · src/core parseCatalog → derive.ts src/core Native shell (Expo) · generated screens · 05 / Shells · renderer pack Native shell (Expo) generated screens renderer pack struct tags Schema operations Resource each Resource Resources seven pages Catalog JSON derived screens user actions five routes problem+json on refusal Legend primary data async batch data store data flow

One struct, every surface

  • • crud.Fields[T]() reads the json, gorm, enum, validate, default, doc and ui tags into crud.Schema
  • • Adding a field adds it to every screen in the same commit as the API.

Five routes, seven pages

  • • rest.Spec.Mount calls api.RegisterResource, then registers list, create, read, update, delete as <module>-<entity>-<verb>
  • • screens.Mount serves list, new, create, read, edit, update, delete under /admin/<module>/<entities> behind page.Serve

The native shell reads the same JSON

  • • ui/screens/testdata/catalog.json is the golden file both repositories read byte for byte.
  • • api.ts calls list, get, create, update, remove on entry.path, the same five routes, and decodes problem+json on refusal