LiChess

Summarizing my attempts to understand LiChess.

Arch

https://pbs.twimg.com/media/CYGyi12UwAArCU9?format=png&name=medium

  • The main diagram is not very clear, or helpful.

  • Where's Redis? Or does the diagram predate it?

API

https://lichess.org/api

  • They stream board events with ndjson https://lichess.org/api#operation/apiStreamEvent. It's long polling I suppose?

  • Can't find API to actually make moves. I suppose it's done via websockets?

  • Can't find API to actually do puzzles. Only see API to get daily puzzle. Perhaps it's also done with web sockets.

  • There's an API to send a message, but I see no API to view messages.

Code

Lila

https://github.com/ornicar/lila

WS

UI

Tracking how a move is sent to the server:

Puzzler

Overall, seems very basic stuff. It feels like it's possible to do a lot better.

Cheat detection

https://github.com/clarkerubber/irwin

https://github.com/ornicar/lila/tree/master/modules/irwin/src/main

Last updated