Cropwright — Frontend Module Map

Cropwright — Frontend Module Map An architecture diagram generated by Archify. src/routes/ · /p/<slug>/ dashboard, review, settings... · Architecture component src/routes/ /p/<slug>/ dashboard, review, settings... Controllers · review / cluster / ingestRun controllers · Architecture component Controllers review / cluster / ingestRun controllers Runes stores · projectsStore, classesStore, keymapStore · Architecture component Runes stores projectsStore, classesStore, keymapStore Slot registry · registeredSlots.ts, readSlot · Architecture component Slot registry registeredSlots.ts, readSlot Served region profile · GET {prefix}/health · Architecture component Served region profile GET {prefix}/health Tier-2 profile · annotation-profiles.json · Architecture component Tier-2 profile annotation-profiles.json src/lib/api.ts · apiFetch + wire mapping · Architecture component src/lib/api.ts apiFetch + wire mapping Vendored contract tests · src/lib/contract/*.test.ts · Architecture component Vendored contract tests src/lib/contract/*.test.ts OpenProcessor API · Architecture component OpenProcessor API assign/discard/undo fetch/post synthesizes one slot merge-by-replace per key checked against Legend Frontend Backend Database Cloud External

Thin frontend, one wire-mapping seam

  • • Cropwright only displays/sorts — the backend owns decisions and serves them as data
  • • api.ts is the sole place RawCrop/RawCluster get mapped into the app's types; nothing else parses the wire shape

Controllers own action logic, pages own state

  • • A page keeps queue/cursor/handledIds; a controller (factory function, closures over passed-in accessors) does assign/discard/skip/undo against that shared state
  • • Same convention for /clusters/[id]'s clusterController and /clusters' slotGalleryController

Region features gate on one served value

  • • region_profile: null on GET {prefix}/health means zero region routes are called — no region tab, no gallery, no keymap letters
  • • A tier-2 slot that touches a region route is kept only when its key matches the served profile's name