Files
zeekayandClaude Opus 4.8 43c689503a feat(gallery): canonical templates.json catalog API (SoT -> build-time gen)
Emit public/templates.json from app/templates-data.ts (the single source of
truth) via a prebuild step, so gallery.hanzo.ai/templates.json is the
machine-readable template catalog consumed by hanzo.app. Each record keeps
the raw SoT fields and adds absolute screenshotUrl/templateUrl/repo so
consumers never encode the gallery's internal path scheme.

- scripts/gen-templates-json.mjs: imports templates-data.ts (node 24 type-strip)
- package.json: prebuild hook runs the generator before next build
- Dockerfile: node:22 -> node:24 for stable TS type-stripping
- public/templates.json: 72 templates, 71 with real screenshots

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-02 22:09:17 -07:00

39 lines
1.1 KiB
JSON

{
"name": "gallery",
"version": "0.1.0",
"private": true,
"scripts": {
"dev": "next dev --turbopack",
"gen-templates-json": "node scripts/gen-templates-json.mjs",
"prebuild": "node scripts/gen-templates-json.mjs",
"build": "next build",
"start": "next start",
"lint": "eslint",
"export-templates": "node scripts/export-templates-json.js",
"build-templates": "npm run export-templates && node scripts/build-all-templates.js",
"build-template": "node scripts/build-single-template.js",
"capture-screenshots": "node scripts/capture-all-screenshots.js"
},
"dependencies": {
"@hanzo/logo": "^1.0.2",
"archiver": "^7.0.1",
"next": "15.5.6",
"react": "19.1.0",
"react-dom": "19.1.0",
"zod": "^3.25.76"
},
"devDependencies": {
"@eslint/eslintrc": "^3",
"@tailwindcss/postcss": "^4",
"@types/archiver": "^6.0.3",
"@types/node": "^20",
"@types/react": "^19",
"@types/react-dom": "^19",
"eslint": "^9",
"eslint-config-next": "15.5.6",
"playwright": "^1.56.1",
"tailwindcss": "^4",
"typescript": "^5"
}
}