mirror of
https://github.com/hanzoai/templates.git
synced 2026-10-30 18:20:05 +00:00
Replaces the old lorem-ipsum e-commerce demo with a best-in-class human gallery over the REAL 1,030-app catalog (meta.json), sharing templates.hanzo.ai's machine-readable contract (meta.json + blueprints/ UNTOUCHED — only the human UI changed). - Educational: hero + live app count + a 'How it works' Pick→Deploy→Manage strip + a 'Why Hanzo' (managed / scalable / pay-as-you-go / your own org) section. - Discoverable: fast debounced client-side search (name/desc/id/tags) + 16 data-driven category chips + Load-more, with #q=&tag= URL sync for shareable views + keyboard (/ , Esc). - Quick-launcher: each card's Deploy CTA deep-links the REAL PaaS deploy flow platform.hanzo.ai/templates?deploy=<id> (verified against platform source + a live 200). - Removed the public 'earn 20% compute revenue' claims; fixed a latent CSP bug (inline onerror → DOM-attached). 100% self-contained/CSP-safe (inline SVG icons, data-URI favicon, NO external CDN/font/style), theme-aware (light/dark), responsive (390 mobile → 1680 desktop, no horizontal scroll). Purged the old demo cruft (18 CSS + 11 JS + 30 img + fonts + stubs). Verified headless under the exact prod CSP: cards render (0 violations/0 JS errors), search/ filter/load-more/96-of-96-logos/theme-toggle all work, 390px no-h-scroll. Catalog contract untouched (UI only READS meta.json/blueprints).
1.7 KiB
1.7 KiB
Hanzo OSS Templates
The one-click open-source catalog for Hanzo Cloud. One static build, served at two hosts:
- templates.hanzo.ai — the machine-readable catalog the Hanzo PaaS loads:
meta.json(the app list) +blueprints/<id>/{template.toml,docker-compose.yml,<logo>}per app. - oss.hanzo.ai — the human explorer/launcher (
index.html): search + filter the catalog and one-click deploy.
100% static, served by hanzoai/static under a strict CSP (script-src 'self' — no
inline scripts). No build step, no server.
One-click deploy
Each card's Deploy CTA deep-links the PaaS:
https://platform.hanzo.ai/templates?deploy=<id>
platform.hanzo.ai/templates reads ?deploy=<id>, matches it against this same
meta.json, and opens the deploy dialog (PaaS pages/dashboard/templates.tsx).
Layout
index.html the explorer — hero, search, category filter, card grid
css/oss.css theme-aware (light/dark), responsive styles
js/oss.js reads meta.json; renders, searches + filters the catalog
js/theme.js light/dark bootstrap + toggle (pre-paint, no FOUC)
meta.json the catalog: array of {id,name,description,version,logo,links,tags}
blueprints/<id>/ per-app deploy spec + logo (the PaaS loader reads these)
Data contract — do not break
The PaaS loader (platform → pkg/platform/src/templates/github.ts) fetches meta.json
and blueprints/<id>/{template.toml,docker-compose.yml} from this origin. Keep the
meta.json shape and the blueprints/<id>/ paths stable — the human UI only reads
them to render the gallery.