tfrere HF Staff Cursor commited on
Commit
20e2e73
·
1 Parent(s): f01ae59

feat(api): expose category taxonomy to clients

Browse files

Ships the closed category taxonomy alongside the apps payload so
clients (mobile shell, future website filter chips) no longer have
to mirror the slug list by hand, which silently drifted over time
(e.g. `games` missing from the mobile mirror, `dance` outliving
its rename to `motion`).

- `getPublicTaxonomy()` in `categories.js`: stable, minimal
projection (`{slug, label, emoji, order}`) - the LLM-only
`description` field stays internal.
- `/api/js-apps` embeds it under `categorization.taxonomy` so the
mobile catalog fetch stays a single round-trip.
- New `GET /api/categories` for clients that only want the slug
list (early UI scaffolding, tooling). 5-min cache aligned with
the catalog TTL.

Forward-compatible: old clients ignore the new fields; new clients
fall back to a local snapshot when the field is missing.

Co-authored-by: Cursor <cursoragent@cursor.com>

2 files changed +58
Files changed (2)
server/categories.js+23
server/index.js+35