Lichess is a fully open-source, non-profit chess server that provides free, ad-free online chess with real-time gameplay, AI-powered analysis, and community-driven features like tournaments, puzzles, and forums. It serves millions of players worldwide with a focus on accessibility, performance, and transparency. Built for chess enthusiasts, coaches, and developers, it eliminates paywalls and tracking while offering enterprise-grade infrastructure.
Technically, Lichess is built with Scala 3 and the Play 2.8 framework, using Akka Streams and Scala Futures for asynchronous handling. The web client uses TypeScript and Snabbdom with Sass for styling. Chess logic is encapsulated in the scalachess submodule. Games are stored in MongoDB and indexed via Elasticsearch, while AI analysis is powered by Stockfish through the distributed Fishnet network. WebSocket communication is handled by a separate lila-ws server using Redis. The platform supports over 140 languages via Crowdin and offers a public PGN database and REST API for external use.
What You Get
- Real-time multiplayer chess - Play live games with bullet, blitz, rapid, and classical time controls against humans or the computer, with instant move validation and low-latency WebSocket connections.
- Distributed AI analysis with Fishnet - Use Stockfish-powered computer analysis on any game, leveraging a global network of donated servers to provide free, high-depth engine evaluations.
- Public PGN database of 4.7+ billion games - Access and download all rated games in standard PGN format via database.lichess.org for research, training, or AI training.
- Tournaments and simul events - Create or join rated and unrated tournaments, including team-based simuls, bullet arenas, and monthly hyperbullet events with leaderboards.
- Interactive tactic trainer - Solve thousands of user-submitted puzzles with adaptive difficulty, progress tracking, and detailed solution explanations.
- Shared analysis boards (Study) - Collaborate in real-time with others to annotate games, create training sets, and embed analysis into forums or social media.
- Multi-language UI (140+ languages) - Fully localized interface powered by Crowdin, enabling global accessibility for non-English speakers.
- Mobile-optimized web app - Full-featured chess experience on iOS and Android browsers with touch controls, offline play, and push notifications.
- Open API for developers - Access game data, user stats, and live streams via a documented REST API for building bots, analytics tools, or educational apps.
- Blind mode accessibility - Screen-reader optimized interface with keyboard navigation and audio cues for visually impaired players.
Common Use Cases
- Running a chess coaching platform - A chess instructor uses Lichess’s study boards and PGN database to create custom training sets and assign puzzles to students without paywalls.
- Analyzing grandmaster games for content creation - A YouTuber imports Lichess game data via the API to generate annotated videos of FIDE Candidates matches with Stockfish insights.
- Building a chess AI training dataset - A researcher downloads 100 million Lichess games in PGN format to train a custom neural network for move prediction or evaluation.
- Hosting a local chess club tournament - A club organizes a monthly hyperbullet event using Lichess’s built-in tournament system with automatic pairings and live standings.
Under The Hood
Architecture
- Scala-based Play Framework application with clean separation of concerns via dependency injection using Macwire, where Env classes encapsulate and wire domain modules like game, analysis, and chat
- Stateless HTTP controllers receive fully constructed domain environments, enforcing dependency inversion and single responsibility
- Modular domain structure with distinct packages per feature, minimizing cross-package dependencies and promoting encapsulation
- Frontend UI components are decoupled from backend via JSON APIs and server-side templates, with pre-rendered HTML for performance and SEO
- Type-safe domain modeling using opaque types and functional error handling to eliminate nulls and enforce correctness at compile time
- Implicit resolution (givens) is used extensively to pass context like environment and translator, reducing boilerplate while preserving explicit boundaries
Tech Stack
- TypeScript frontend with Snabbdom for virtual DOM rendering and custom Lichess UI modules managed in a monorepo via pnpm workspaces
- Strict linting with Oxlint and Stylelint, ensuring code quality and consistency across shared type definitions
- Nix-based development environment with pinned dependencies for reproducible builds and isolation
- Domain-specific chess libraries like chessops and chessground integrated as peer dependencies, forming a reusable component ecosystem
- Headless backend tooling with jsdom and MongoDB for server-side rendering and persistence, paired with modern JavaScript tooling
Code Quality
- Extensive test coverage across frontend utilities with precise assertions for chess logic, URL parsing, and command handling
- Clean separation of concerns with dependency injection enabling modular, testable components and clear environmental boundaries
- Strong type safety enforced across both backend and frontend to ensure correctness in game state, APIs, and input parsing
- Consistent, domain-aligned naming conventions that enhance readability and maintainability
- Robust error handling with defensive parsing in frontend and functional error types in backend, ensuring predictable failure paths
- Well-structured frontend modules with focused test suites for each utility, reflecting deliberate design for testability and modularity
What Makes It Unique
- Deep integration of real-time engine analysis (Fishnet) directly into gameplay, enabling seamless, dependency-free engine suggestions
- Modular, wire-based dependency system that treats chess domains (tournaments, studies, forums) as first-class, composable services
- Unified API layer serving both human-facing views and machine-readable exports with shared business logic, eliminating duplication
- Context-aware moderation system that dynamically routes reports based on user behavior and content type
- Embedded chess puzzles and mini-games within 404 pages, transforming UX failures into educational opportunities
- Granular OAuth permissions allowing third-party tools to access user data without full account compromise