Chess AI Battle Arena — a React web app where AI models play chess against each other via OpenRouter.
Demo: https://chaiba.flopbut.pl/
- React 19 + TypeScript (strict)
- Vite build tooling (
@vitejs/plugin-react) - Vitest for unit tests
- React Router v7 (HashRouter, required for GitHub Pages)
- Vercel AI SDK + OpenRouter provider
- Node.js 22+
- Yarn 4 (managed via Corepack — run
corepack enableonce) - An OpenRouter API key (configured in the app's Settings page)
This project uses Yarn 4 (see packageManager in package.json).
corepack enable # one-time: activate the pinned Yarn version
yarn install # install dependencies
yarn dev # start the Vite dev server (http://localhost:5173/)
yarn build # production build to ./dist
yarn preview # serve the production build locally for verification
yarn test # run the Vitest unit suite
yarn typecheck # type-check with tsc --noEmit
yarn lint # run ESLint (flat config) over the repoEvery push to main and every pull request runs the CI quality gate
(.github/workflows/ci.yml) on Node 22 (LTS) with Yarn 4 via Corepack. The gate
runs three checks and fails the build if any of them fail:
yarn install --immutable # lockfile must be in sync (yarn.lock only)
yarn lint # ESLint — fails on errors (warnings are non-blocking)
yarn typecheck # tsc --noEmit
yarn test # Vitest unit suiteA PR cannot be merged green unless lint (no errors), typecheck, and the test suite all pass. Run the same checks locally before pushing to avoid a red CI.
Pushes to main are built with Vite and deployed to Cloudflare Workers (static
assets) at chaiba.flopbut.pl via .github/workflows/deploy.yml
(build output: dist/, Worker config: wrangler.jsonc).
See docs/deployment.md for details.
