Overview: Lichess (lila) is a fully open-source, ad-free online chess server that provides real-time multiplayer gameplay alongside advanced features like computer analysis, tournaments, simuls, and a public database of over 4.7 billion games. Built with Scala 3 and the Play Framework, it emphasizes performance, type safety, and community-driven development. Unlike commercial platforms, Lichess is non-profit and entirely funded by donations, ensuring no paywalls or ads interfere with the user experience. It is designed for chess enthusiasts of all levels—from casual players to grandmasters—and serves as a platform for open research, community collaboration, and educational tools like the tactic trainer and shared analysis boards.
The architecture is highly scalable and asynchronous, leveraging Akka Streams for WebSocket handling and Fishnet to distribute Stockfish analysis across a network of donated servers. The frontend is built with TypeScript and Snabbdom, ensuring fast, responsive interactions across 140+ languages. Lichess is not just a game server; it’s a public good for the chess community, offering open APIs, free PGN data exports, and full transparency in its codebase.
What You Get
- Real-time multiplayer chess - Play against other users with low-latency WebSocket connections, supported by a dedicated lila-ws server and Redis for message routing.
- Distributed AI analysis with Fishnet - Free access to Stockfish-powered engine analysis, distributed across a global network of donated servers for high-performance evaluation.
- Public PGN database with 4.7B+ games - All rated games are published openly at https://database.lichess.org, enabling research, training, and third-party tool development.
- Tournaments and simuls - Host or join rated and unrated tournaments, including simultaneous exhibitions (simuls) against multiple opponents.
- Shared analysis boards - Collaborative study rooms where users can analyze games together with live move comments and engine variation exploration.
- Tactic trainer - A customizable puzzle training system that adapts to user skill level and tracks progress over time.
- Multi-language UI (140+ languages) - Community-powered translations via Crowdin ensure accessibility for global users without compromising quality.
- Open HTTP API - Public RESTful endpoints for accessing games, players, streams, and puzzles—usable in external applications and bots.
- Mobile-optimized web client - Fully responsive interface that works seamlessly on smartphones and tablets without requiring a native app.
Common Use Cases
- Building a chess training platform - Developers use Lichess’s public PGN database and API to create custom puzzle generators, opening repertoires, or AI coaching tools.
- Creating a non-profit chess education tool - Schools and nonprofits deploy Lichess to teach strategy, critical thinking, and sportsmanship without ads or paywalls.
- Problem: High-cost chess analysis tools → Solution: Lichess provides free, accurate Stockfish analysis via Fishnet - Users can analyze any game in real-time with engine suggestions without needing a premium subscription.
- Team: DevOps teams managing high-traffic real-time systems - Lichess serves as a reference architecture for Scala-based, Akka-powered applications handling millions of WebSocket connections and asynchronous data streams.
Under The Hood
The lichess-org/lila project is a large-scale, feature-rich chess platform built with a monolithic architecture that emphasizes modularity and separation of concerns. It combines Scala on the backend and TypeScript/JavaScript on the frontend to deliver a robust, real-time gaming experience with extensive community and analysis tools.
Architecture
This system adopts a monolithic structure with modular organization to manage diverse chess-related functionalities.
- Clear separation of concerns across controllers, views, and domain modules
- Emphasis on encapsulation to isolate distinct aspects of platform functionality
- Strong focus on maintaining architectural boundaries despite its large scale
Tech Stack
Lila leverages a mature tech stack designed for performance and scalability in web applications.
- Built primarily with Scala for backend services and TypeScript/JavaScript for frontend
- Integrates a wide range of modern libraries including chessops, snabbdom, and lila
- Uses SBT for Scala builds, pnpm for package management, and various linters to enforce code quality
- Supports comprehensive testing with node:test and extensive test file coverage
Code Quality
Code quality in lila reflects a structured and functional programming approach with strong testing practices.
- Comprehensive test coverage across multiple modules and integration points
- Consistent use of error handling patterns such as try/catch and rescue mechanisms
- Adherence to functional programming principles with clear naming and organization
- Some technical debt present, indicating opportunities for improved modularity and code consolidation
What Makes It Unique
Lichess.org’s lila stands out as a highly specialized platform with deep integration of chess-specific features.
- Combines real-time multiplayer gaming, advanced analysis tools, and community features in a unified system
- Modular architecture enables seamless integration of numerous specialized chess services
- Extensive API documentation and type safety through TypeScript support