feat: trove — semantic search for 3D prints by aesthetic#54
Merged
Conversation
Add `trove`: a static, client-side app that ranks a prebuilt Printables
metadata index against any free-text decor style ("industrial eclectic",
"japandi", "art deco") using in-browser MiniLM embeddings (transformers.js
via CDN, cached in IndexedDB), with a keyword fallback when the model can't
load. The aesthetic is never hardcoded.
- projects/trove: index.html + app.mjs (UI) + search.mjs (engine + pure,
unit-tested ranking math) + hand-built sample dataset + node tests
- tools/trove-ingest: zero-dependency Node script that pulls Printables
metadata into the normalized index (optional --embed precompute path)
- .github/workflows/trove-refresh.yml: weekly + manual rebuild of the index,
committed to main to re-trigger deploy
- wiring: tofu/variables.tf projects set, homepage link, CLAUDE.md
(structure, projects table, tech-stack exception, deployment)
Browser flow never calls Printables (CORS-free); ingest fetches metadata only
and links out, never rehosting model files. Ranking math unit-tested; DOM +
keyword fallback verified via headless browser.
https://claude.ai/code/session_011Yfgw8tiyFJsxCzFtnkavu
Contributor
OpenTofu PlanPlan output |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What this adds
trove (
trove.apps.andymolenda.com) — a static, client-side app where you type any decor style or aesthetic ("industrial eclectic Amsterdam canal house", "warm japandi", "art deco glam") and it semantically ranks a prebuilt Printables index: thumbnail, designer, license, popularity, and a deep link to the original listing. The aesthetic is never hardcoded.How it works
data/index.json, lazily pulls a small embedding model from a CDN, embeds the corpus once (cached in IndexedDB) + your query, and ranks. If the model can't load it falls back to keyword matching.Included
projects/trove/—index.html+app.mjs(UI) +search.mjs(engine + pure ranking math) + hand-built sample dataset so it works immediately +tests/run.mjstools/trove-ingest/ingest.mjs— zero-dep metadata ingest (optional--embedprecompute path).github/workflows/trove-refresh.yml— weekly + manual rebuild of the index, committed tomainto re-trigger deploytofu/variables.tfprojects set, homepage link,CLAUDE.md(structure, projects table, tech-stack exception, deployment)Verification
node projects/trove/tests/run.mjs)Things to watch
api.printables.com, so I couldn't introspect Printables' unofficial/undocumented API. The query + field mapping are isolated in one spot iningest.mjswith defensive parsing. The firsttrove-refreshrun (CI has open network) will either populate real data or fail loudly on a schema mismatch that's a one-file fix. Until then the app serves the labeled sample dataset.main. Ifmainis branch-protected against direct pushes, switch it to a PR flow (noted in a comment in the workflow).Populating real data (after merge)
workflow_dispatchonly appears once the workflow is on the default branch, so after this merges: Actions → "Refresh trove index" → Run workflow. That runs the ingest on a CI runner, commits the real index tomain, and re-triggers trove's deploy.Squash-merge friendly.
https://claude.ai/code/session_011Yfgw8tiyFJsxCzFtnkavu
Generated by Claude Code