Skip to content

feat(recipes): add recipe gallery fed by the OSS catalog - #50

Open
SPIKESPIGEL404 wants to merge 1 commit into
mainfrom
feat/recipes-gallery
Open

feat(recipes): add recipe gallery fed by the OSS catalog#50
SPIKESPIGEL404 wants to merge 1 commit into
mainfrom
feat/recipes-gallery

Conversation

@SPIKESPIGEL404

Copy link
Copy Markdown
Contributor

Adds /recipes and /recipes/[slug], rendered from the OSS repo's committed dist/recipes/index.json.

Depends on bitrouter/bitrouter#756 — that PR adds the catalog. Until it merges this builds fine and the gallery renders its empty state (the fetch 404s and is logged, not thrown).

How it syncs

The catalog is fetched at request time with a 600s revalidate, the same way lib/providers-server.ts reads the provider registry: no prebuild script, no repository_dispatch, no docs deploy. Merge a recipe upstream and it appears here within one revalidation window. BITROUTER_REPO=../bitrouter pnpm dev previews one from a local checkout before it is merged.

Layout

The gallery reuses the model catalog's shell — filter rail, toolbar, table and card views, footer count line. Every filter, count and figure is derived from the catalog itself; no option lists are authored here, so a new objective or harness appears the moment a recipe uses it.

The models page's 14-day usage chart is deliberately not copied: it is fed by hardcoded CHART_* arrays in models-data.ts, and nothing on this page is mock data. In its place is a summary computed from the recipes on screen — published count, best measured saving, harnesses covered, evaluations used.

The detail page shows baseline vs recipe vs delta per metric, with provenance (evaluation, harness, config, runs, date, who measured it) directly under the numbers, prerequisites derived from the registry (moonshotai — API key, openai-codex — sign-in), the copyable bitrouter.yaml, and the recipe's long-form body.

Deltas are coloured by direction of benefit, not sign — a −32.8% cost move is green and a −1.1 point accuracy move is amber.

Also

  • Recipes in the header nav and the footer's Product column, next to Models.
  • Sitemap entries for the gallery and each recipe.
  • Recipes i18n namespace (en + zh).
  • 7 new unit tests on the delta/format logic, plus one pinning the footer column order. next build passes.

Note for the reviewer

The working tree of this repo currently holds an unrelated in-flight docs restructure (new content/docs/overview/, models-and-routing/, the /compare page removal). None of it is in this branch — this commit is 16 files, 1732 insertions, zero deletions. Three files it touches (app/sitemap.ts, components/landing/footer-nav.ts, footer-nav.test.ts) also carry edits from that work; only the recipe hunks were staged, so expect a small conflict there when the restructure lands.

🤖 Generated with Claude Code

Adds /recipes and /recipes/[slug], rendered from the OSS repo's committed
`dist/recipes/index.json`. The catalog is fetched at request time with a 10
minute revalidate, the same way the provider registry is read: no prebuild
step and no cross-repo dispatch, so a recipe merged upstream reaches the site
without a docs deploy. `BITROUTER_REPO=../bitrouter pnpm dev` previews one
before it is merged.

The gallery reuses the model catalog's shell — filter rail, toolbar, table and
card views — with every filter, count and figure derived from the catalog
itself rather than authored here. The models page's usage chart is
deliberately not copied: it is fed by hardcoded arrays, and nothing on this
page is allowed to be mock data. In its place is a summary computed from the
recipes on screen.

The detail page shows baseline vs recipe vs delta per metric, with the
provenance line (evaluation, harness, config, runs, date, who measured it)
directly under the numbers, the prerequisites derived from the registry, the
copyable `bitrouter.yaml`, and the recipe's own long-form body.

Deltas are coloured by direction of benefit rather than sign, so a −32.8% cost
move and a −1.1 point accuracy move never read the same.

Also adds Recipes to the header nav and the footer's Product column, sitemap
entries for the gallery and every recipe, and a `Recipes` i18n namespace.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
SPIKESPIGEL404 added a commit that referenced this pull request Jul 26, 2026
sitemap.ts no longer imports @/lib/recipes-server (recipes pages stay on
main's older gallery until #50 lands) and drops the zh entries, the
footer loses the Recipes link and points CLI/MCP/Compare at their new
docs homes, matching the deleted i18n plumbing. Fixes the CI
Module-not-found error.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant