Self-hosted Chess.com alternative: Game Review for your Chess.com & Lichess games, play vs Stockfish or a friend, lessons + opening trainer, AI coach on your own Ollama/vLLM, EN·BG·ES·DE·RU, one Docker container
Your private Chess.com. Self-hosted, AI-coached, family-friendly.
Stockfish + your own LLM (Ollama, LM Studio or vLLM), in one Docker container.
Game Review — every move classified, top engine lines, and What's the threat? answering in plain words. Demo accounts, Morphy's Opera Game.
Patzer is a tiny, self-hosted take on the Chess.com / Lichess workflow you actually use:
Discuss a private ChatGPT connection via Secure MCP Tunnel
https://github.com/SikamikanikoBG/patzer/issues/123
Labels: enhancement, rfc
Maintainer sync
https://github.com/SikamikanikoBG/patzer/issues/105
Labels: maintainer
Add Chinese (zh) — UI + coach
https://github.com/SikamikanikoBG/patzer/issues/100
Labels: enhancement, help wanted, i18n
Game Review list: filters by period, site, result, colour, time control
https://github.com/SikamikanikoBG/patzer/issues/80
Labels: enhancement, help wanted
Admin → System: selectable analysis engines (SHA-256 pinned) + depth setting
https://github.com/SikamikanikoBG/patzer/issues/79
Labels: enhancement, help wanted
Add Persian (fa) with a right-to-left layout
https://github.com/SikamikanikoBG/patzer/issues/78
Labels: enhancement, help wanted, i18n
Importing games limited to 20, no manual import
https://github.com/SikamikanikoBG/patzer/issues/64
Labels: bug, help wanted
Features request for Review View
https://github.com/SikamikanikoBG/patzer/issues/63
Labels: enhancement
Thanks for considering a contribution. Patzer is a small, opinionated project — please read this before opening a big PR.
Requirements: Node ≥ 20.11.
git clone https://github.com/SikamikanikoBG/patzer.git
cd patzer
npm install
npm run setup # downloads Stockfish 17 into ./bin/ (Windows, Linux, macOS)
npm run dev
The dev script runs the server (port 8800) and the Vite frontend (port 5173) concurrently. Open http://localhost:5173.
server/ Node + Hono API, SQLite, Stockfish driver, Ollama client
src/auth/ Sessions, password hashing, middleware
src/chess/ Stockfish UCI driver, move classifier, chess.com import
src/coach/ Ollama client, anti-hallucination prompt assembly
src/routes/ HTTP routes
src/ws/ WebSocket handlers (Play, Lobby)
web/ React + Vite + Tailwind
src/components/ Reusable UI (board, eval bar/graph, captured pieces, …)
src/pages/ Route-level pages
src/locales/ i18next dictionaries
src/lib/ Sounds, TTS, markdown, helpers
Two key invariants:
server/src/coach/coaching.ts pre-computes the facts (why a move is good or bad from tactics.ts, the opponent's answer and the alternatives from Stockfish, the player's history from memory.ts) and hands them to the model as plain language, and contradiction() checks every answer against the engine's verdict. If you find yourself asking the LLM to "figure out X", figure it out server-side first.PORT, DB_PATH, STOCKFISH_PATH, SESSION_SECRET).npm run typecheck
npm test
npm run build
All three must be green. CI runs them on Node 20 and 22, plus the regression suites below
(test:e2e, test:resume, test:oidc, test:ui, test:resume-ui) against a real server, a Docker image
build that has to boot, and — when lesson content changes — verify:lessons. A PR is only
merged with all of it green.
Every change comes with tests. A new feature gets unit tests for its logic. A bug fix gets
a regression test that fails without the fix — say so in the PR, ideally with the failing
output. Anything that talks to an outside service (an LLM, Lichess, chess.com) is tested
against a local fake that serves only the routes the real one has, so a wrong URL or path
fails in CI instead of on someone's server — see server/test/llm-providers.test.ts. That
suite exists because 7.15.0 broke every vLLM setup with a one-word path change that no test
looked at.
npm test runs vitest. Server tests live in server/test/*.test.ts (kept out of
server/dist); web tests can sit next to their component as *.test.ts(x). npm run test:watch for a
watch loop. If you touch server/src/chess/classifier.ts or glicko.ts, extend the matching suite — the
rating and classification math is exactly the code where a silent regression hurts everyone for weeks.
npm run test:e2e boots a real server on a throwaway SQLite file and drives two WebSocket clients through a
full PvP game (moves, clocks, draw offers, takebacks, rematch). Run it whenever you touch server/src/ws/play.ts.
npm run test:oidc boots a real server next to a real OpenID Connect provider
(oidc-provider, a dev dependency) and walks a simulated browser
through single sign-on: a fresh SSO-only install, the admin group, provisioning, linking, a cancelled login and
the logout round trip through the provider.
Run it whenever you touch server/src/auth/oidc.ts or the auth routes.
npm run test:ui does the same thing through the actual interface, with two real browsers clicking the board.
It needs playwright, which is deliberately not a project dependency (it would pull browser binaries into
every install): npm i -D playwright && npx playwright install chromium first. Run it whenever you touch
web/src/components/ChessBoard.tsx or web/src/pages/Play.tsx — a board that renders perfectly but silently
ignores clicks has shipped twice now, and only this test sees it.
The Learn section keeps what a lesson teaches apart from what it says:
web/src/learn/content/<level>.json — positions, solutions, stars; no words. The step types are
documented in web/src/learn/types.ts.web/src/locales/learn/<lang>.json — the words, keyed <lessonId>.<stepId>. A …_kid key is the
same text in kid-mode words; a …_done key is shown once a task is solved. A translation can never
change a solution.A wrong move in a lesson teaches someone something false, so every lesson is checked twice:
npm test runs web/src/learn/content.test.ts: every position loads, every move is legal,
every "checkmate" is one, every star task is solvable in exactly par moves, every text exists.
What an explanation claims about its board ("only the king defends f7") go