Overview
Consumer Example Mirroring
How the site keeps real stats and Math1111 examples without requiring Vercel to read outside the core repo.
Route: /docs/consumer-example-mirroring
The deployed site reads mirrored consumer snippets committed inside review-game-core/site/content/consumer-snippets.generated.ts, never live sibling-repo files.
Why this exists
The Vercel project is attached to review-game-core only, so the deployed build must be self-contained inside this repo. Reading sibling repos at build time would fail in preview and production.
What is mirrored
Each mirrored record includes:
- consumer repo name
- original source path
- source revision
- excerpt title
- excerpt summary
- excerpt body
The site uses those committed records for:
- feature-page consumer examples
- showcase references to stats and Math1111 source
How freshness is maintained
Refresh the mirrored records from the workspace root with:
npm run site:sync-consumer-examples
That script reads the sibling repos locally, extracts the curated excerpt set, and rewrites the committed mirror file.
This keeps the deployed site stable while still making the source provenance explicit.
Deployment note
The mirroring script is a maintainer convenience. Vercel builds skip it; it runs only in the maintainer's workspace.
The deployed site reads only:
- repo-local MDX docs
- repo-local core source snippets
- the committed mirrored snippet file