About Chess Codex
A free, open encyclopedia of every named chess opening — built as a side project, no ads, no signup.
Who made this
I'm a high school student in Norway. I built Chess Codex in my spare time because I wanted a single reference that combined what I liked from Lichess's opening explorer (live statistics) and an encyclopedia-style site (one page per named opening with interactive board, theory, and analysis) — without ads, paywalls, or accounts in the way.
It's a hobby project. I'm still learning. If something feels rough — it probably is. Feedback is welcome via the Suggest an improvement form on any opening page.
Where the data comes from
- Opening list (3,690 lines) — from the Lichess chess-openings dataset, public domain. ECO codes, PGN move sequences, canonical names.
- Game statistics — fetched on demand from the Lichess Opening Explorer API and cached server-side. Win rates, popular replies, everything you see in the "Statistics from Lichess" panel.
- Play vs the engine — uses Stockfish.wasm running entirely in your browser, including the evaluation shown while you play. Nothing is sent to a server for this; the engine is loaded once and runs locally.
- Editorial descriptions — when an opening has a prose description, it was either written by me directly or accepted from a community submission via the suggest form. Pages without a curated description fall back to a generated "Overview" built from the underlying metadata.
How it's built
Vanilla PHP 8.4, SQLite, plain JavaScript (ES modules). No framework, no build step, no bundler — minified by a tiny in-repo PHP script. Self-hosted on a Raspberry Pi 5 at home, served through Cloudflare. Source-first, optimised for being readable rather than clever.
Open-source libraries that do the heavy lifting: chess.js (move validation), chessground (the board UI), Stockfish.wasm (the engine for /play), Parsedown (Markdown rendering).
Privacy
No ad trackers and no cookies for analytics. The only third-party script is Cloudflare Web Analytics, which counts page views without cookies or fingerprinting. The site stores a single cookie only if you log in as admin (that's not you). Visit counts in the admin dashboard are aggregate-only — no IP addresses, no sessions, no fingerprint. Bots and the admin's own visits are excluded from those counts.
If you suggest a description, the site stores what you send — the text, plus your name and email address if you give them (the email is never published) — together with your IP address, which is used only to fight spam. Like any web server, it also keeps access logs (IP address, page, time and browser) for about two weeks.
The only outbound requests the site makes are to lichess.org for
opening statistics, and only server-side — your browser never talks to Lichess
directly.
Contact
The fastest way to flag something is the Suggest an improvement form on any opening page. Bug reports, missing openings, wrong moves — everything goes there.
For anything else, write to [email protected].