Files
Hanzo AI a5ca8e3f5c Add Catalog & Pricing admin editor (commerce catalog SoT, increment 2)
admin.hanzo.ai CMS editor for the platform product/pricing catalog — the 17
infra tiers increment 1 seeded (11 cloud + 3 gpu + 3 datastore) plus every
product surface. A filterable table + create/edit form over commerce's
SuperAdmin CRUD (/v1/catalog/entries); an edit flows to the live pricing pages
(the pricing service reads the same rows via GET /v1/commerce/catalog).

- CatalogModule: table (filter by category, price+spec+published) + SlideOver
  create/edit form (name/price/published/category/description + type-preserving
  metadata key/value editor + admin-only cost/margin) + delete confirm + seed.
- catalog/logic.ts: pure money (dollars<->cents) + metadata (JSON<->typed rows,
  type-exact round-trip) + category helpers, unit-tested (16 tests).
- catalog-admin.ts: /v1/catalog/entries client (bare-JSON REST, defensive
  normalizers) via cloudProxyV1Url — works on the go:embed cloud console and
  standalone alike.
- app/v1/catalog/[...path]: dedicated user-bearer proxy to commerce (mirrors the
  /v1/commerce store proxy); allowCatalogSurface least-privilege allow-list
  (entries CRUD + seed only). commerce requireSuperAdmin (owner==admin) is the
  authoritative gate.
- registry: 'catalog' admin entry (Observe, admin:true).

Verify: tsc 0 errors; vitest 2817 passed (+44: catalog logic + proxy-allow);
next build + build:embed green; commerce api/catalog handler tests pass; live
Playwright proof (17 tiers render, edit cloud-dev $15->$18 -> PUT
/v1/catalog/entries/cloud-dev priceCents 1800 -> table reflects $18.00).
2026-07-22 02:44:49 -07:00
..