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": "04507704-50a9-4de9-9b23-475d6b76bf0e",
"slug": "sticker",
"label": "Sticker",
"description": "Weatherproof vinyl sticker, die-cut to your design.",
"category": "Stationery",
"options": [],
"sizes": [
{
"id": "6744bd80-e64b-4351-a0b8-9316dd138db5",
"slug": "3in-die-cut",
"label": "3\" Die-Cut",
"physical": {
"width": 3,
"height": 3,
"unit": "in"
},
"canvas": {
"width": 300,
"height": 300
},
"printZone": {
"x": 30,
"y": 30,
"width": 240,
"height": 240
},
"silhouettePath": "M12,0 L288,0 A12,12 0 0 1 300,12 L300,288 A12,12 0 0 1 288,300 L12,300 A12,12 0 0 1 0,288 L0,12 A12,12 0 0 1 12,0 Z",
"mockupFallbackColor": "#fce7f3",
"basePriceCents": 400
}
],
"createdAt": "2026-05-25T12:31:21.560Z",
"updatedAt": "2026-05-25T12:31:21.560Z"
}