v0.6: template-manager owns the product catalog

The host no longer carries a runtime product catalog. products.js
shrinks to a legacy single-product stub; the canonical catalog lives in
template-manager's productsStore, seeded ONCE on first boot from the
new seedProducts.js (after that the store under templates/ is
authoritative and the seed is ignored — intentional, so restarts never
rewrite an admin-managed catalog). phoneModels.js and
templateCategories.js are the supporting constant sets, and
docs/template-schema.md documents the v4 schema.

templates/ is the admin-managed store itself (_products_index.json +
products/<id>/product.json, JSON only) — committed so the configured
catalog (sizes, pricing, options built up in the admin UI) survives a
fresh checkout rather than regressing to the seed.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
khalid@traclabs.com
2026-09-01 23:28:48 -05:00
parent b5b8808251
commit aba2dbedfb
17 changed files with 1549 additions and 76 deletions

View File

@@ -0,0 +1,35 @@
{
"id": "1d69616b-96a8-4280-9beb-c8926222c589",
"slug": "tote",
"label": "Tote Bag",
"description": "Sturdy canvas tote with reinforced straps.",
"category": "Accessories",
"options": [],
"sizes": [
{
"id": "61e5519d-1230-4397-a795-7303a30e0881",
"slug": "14x14",
"label": "14\" × 14\"",
"physical": {
"width": 14,
"height": 14,
"unit": "in"
},
"canvas": {
"width": 1400,
"height": 1400
},
"printZone": {
"x": 140,
"y": 140,
"width": 1120,
"height": 1120
},
"silhouettePath": "M56,0 L1344,0 A56,56 0 0 1 1400,56 L1400,1344 A56,56 0 0 1 1344,1400 L56,1400 A56,56 0 0 1 0,1344 L0,56 A56,56 0 0 1 56,0 Z",
"mockupFallbackColor": "#fef3c7",
"basePriceCents": 1800
}
],
"createdAt": "2026-05-25T12:31:21.557Z",
"updatedAt": "2026-05-25T12:31:21.557Z"
}