LiChess

Summarizing my attempts to understand LiChess.

Arch

https://pbs.twimg.com/media/CYGyi12UwAArCU9?format=png&name=mediumarrow-up-right

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

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

API

https://lichess.org/apiarrow-up-right

  • They stream board events with ndjson https://lichess.org/api#operation/apiStreamEventarrow-up-right. 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/lilaarrow-up-right

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/irwinarrow-up-right

https://github.com/ornicar/lila/tree/master/modules/irwin/src/mainarrow-up-right

Last updated