You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Validated client API (`VisAsset.thumb`, `repr_html`) end-to-end
Today the only consumer surface is `VisAsset.repr_html` (Jupyter rich-repr from #363) — one material at a time, not a hosted gallery. Researchers, build123d users, and CG hobbyists have no browsable index.
Proposed approach
A statically-generated site published to GitHub Pages at `https://morepet.github.io/mat-vis/\` with a `/tst/` parallel-preview instance for staging-substrate validation before promoting to prod.
Data layer
Build-time fetch of `huggingface.co/datasets/gerchowl/mat-vis/resolve//release-manifest.json` + per-source catalogs + thumb URLs. No runtime HF API calls — site is fully static, browser doesn't hit HF except to load images (which CDN-cache).
Catalog data: ship as DuckDB-WASM in-browser DB OR pre-built Pagefind index OR JSON + FlexSearch/MiniSearch. Spike to decide — see scope.
UX
Grid view: thumb + material name + source badge + license SPDX badge + category tag. Filterable by source, category, license, has-thumb, scalar-only, etc.
Per-material detail page: full PBR scalar dump + attribution + texture-tier availability + direct HF download links + "Use in build123d" code snippet
Search: fuzzy by name, by tag, by upstream URL. Type-ahead.
Side-by-side compare (P1): pick 2-4 materials, see their PBR scalars + thumbs in a table
Categories: drill down by category (metal / wood / fabric / etc.)
Permalinks: `/material//` URLs
Parallel /tst preview
Two parallel hosted instances:
`/` — built from current prod release tag (`gerchowl/mat-vis`)
`/tst/` — built from the latest `gerchowl/mat-vis-tst` cut, lets us eyeball a re-bake before promoting
Substrate has ~5200 materials; eager-load grid would be slow. Need virtual scrolling or pagination.
License-badge accuracy: `license_spdx` field is upstream-truth; verify across CC0 / CC-BY / CC-BY-NC / non-CC. Display attribution per upstream's terms.
Per-material thumbs: ~5200 × 50KB ≈ 260MB total. Don't bundle into the GH Pages artifact; lazy-load from HF.
DuckDB-WASM is ~2MB gzipped — heavy. FlexSearch is ~30KB. Pagefind is build-time-indexed (smallest runtime, but less query flexibility).
GH Pages has a 1GB repo size limit + 10GB/month bandwidth soft cap. Since thumbs proxy to HF, this is fine.
The "PAT to host it" — GH_PAGES_PAT repo secret needs publish-to-gh-pages permission. Must be supplied before first deploy.
Acceptance criteria
P0 (working prototype):
`cd docs/site && npm run build` produces a static site under `docs/site/dist/`
`docs/site/dist/index.html` renders the grid with at least ambientcg (the only source with thumbs today)
Search box: type "metal" → only metal-category materials show
Click a material → detail page with PBR scalars + attribution + license
Source/license badge rendering correct
`pages.yml` workflow exists, dry-run produces the artifact, only the publish step lacks the PAT secret
/tst preview mechanism chosen + documented + ready to wire in (PAT pending)
Motivation
We now have all the ingredients for a public material-catalog gallery (~5200 materials across 4 sources):
Today the only consumer surface is `VisAsset.repr_html` (Jupyter rich-repr from #363) — one material at a time, not a hosted gallery. Researchers, build123d users, and CG hobbyists have no browsable index.
Proposed approach
A statically-generated site published to GitHub Pages at `https://morepet.github.io/mat-vis/\` with a `/tst/` parallel-preview instance for staging-substrate validation before promoting to prod.
Data layer
Build-time fetch of `huggingface.co/datasets/gerchowl/mat-vis/resolve//release-manifest.json` + per-source catalogs + thumb URLs. No runtime HF API calls — site is fully static, browser doesn't hit HF except to load images (which CDN-cache).
Catalog data: ship as DuckDB-WASM in-browser DB OR pre-built Pagefind index OR JSON + FlexSearch/MiniSearch. Spike to decide — see scope.
UX
Parallel /tst preview
Two parallel hosted instances:
Mechanism TBD by spike — candidates: GH Pages with subdir publishing, Cloudflare Pages preview deploys, Netlify deploy previews, GitHub Pages deployment environments.
CI
Scope
P0 (working prototype)
P1
P2
Pitfalls
GH_PAGES_PATrepo secret needs publish-to-gh-pages permission. Must be supplied before first deploy.Acceptance criteria
P0 (working prototype):
References