The Gambit Pairing website is a Next.js 16 static export deployed as an
asset-only Cloudflare Worker. The current public routes are /, /download,
and the three generated post-download routes: /download/windows,
/download/macos, and /download/linux.
- Node.js 20.9 or newer
- npm
- Network access to the GitHub API for homepage data during a production build
Install dependencies with:
npm installSet GITHUB_TOKEN locally when GitHub API rate limits would otherwise affect a
build. Keep the token in an ignored .env.local file or the shell environment;
never commit it.
npm run dev
npm run verifyverify runs formatting, linting, Next route type generation, unit tests, and a
static production build. Browser route and visual tests run separately with:
npm run test:e2e
npm run test:e2e:updateThe visual snapshots live under tests/e2e/__screenshots__. Update them only
when a deliberate rendering change has been reviewed.
npm run build writes the static site to out/. The checked-in
wrangler.jsonc points Wrangler at that directory:
npm run deploy:dry-run
npm run deployAuthenticate Wrangler with npx wrangler login before the first deployment.
The deployment is intentionally configured as an asset-only Worker; no Pages
project or runtime API is required.
The download page asks the GitHub API for the newest release in each visitor's browser, so new releases appear without a rebuild. The release from the last build is shown first and kept if that request fails. Other pages, including the homepage and changelog, still use the release from the last build.
app/— Next route entrypoints, global styles, and local fontscomponents/home/— homepage sectionscomponents/download/— download-page sectionscomponents/navigation/andcomponents/ui/— reusable presentation codelib/site/— shared site configuration and platform/FAQ datalib/github/— build-time GitHub client, normalizers, and the browser refresh used by the download pagetests/— pure unit tests and browser route/visual tests