Lila is a free online chess server written in Scala that provides real-time gameplay, analysis, tournaments, and community features.
The project solves the problem of creating a fully-featured chess platform without paywalls or advertisements. It uses Scala 3 with a modified Play 2.8 framework for the backend, handling real-time interactions through fully asynchronous code with Scala Futures and Pekko streams. WebSocket connections route through a separate server communicating via Redis. The system stores games in MongoDB, indexes them with Elasticsearch, and integrates distributed computer analysis through a Fishnet cluster running Stockfish. The frontend is built in TypeScript with Snabbdom for rendering and Sass for styling.
Lila suits developers building or contributing to a non-profit chess platform or those studying how to architect real-time multiplayer game servers at scale. The codebase demonstrates functional programming patterns in Scala and type-safe web development. The project publishes all rated games as a free PGN database and exposes a public API for third-party applications. A substantial community has translated the interface into over 140 languages through crowdsourced effort.
Almost all open issues are raised by outside users rather than the core team, reflecting a substantial base of adopters reporting real-world use. Maintainers typically respond to new issues and pull requests within a day. Work in the issue tracker is dominated by bug reports, non-Scala tasks, and broadcast-related features.