Chessapp is an online chess application which allows you to play real time rated games at various time controls against human and AI opponents. Beyond standard chess it supports variants Four Player, Atomic, Antichess and Flick.
The application is implemented as a single Scala / Sbt project.
The server is based on Play Framework 2.5.
The client is based on Scala.js which allows Scala code to be compiled to Javascript. It makes use of the Scala.js facade for the D3.js library scala-js-d3.
The server and the client are part of the same project and both the server and the client are built when you issue the usual "compile" command in Sbt. The integration is based on the template play-with-scalajs-example.
The project has three building blocks: the server, the client and shared code. Since both the server and the client are written in Scala, this allows to have shared code between them. This is particularly useful in a chess application because you don't have to duplicate the complicated move generation logic for the client.
The project uses the Silhoutte module for authentication. In particular it is based on the play-silhouette-seed example.
To avoid robots registration uses Google reCAPTCHA. As an implementation ideas from the play-recapthca module were used ( the module itself is not imported due to it having non trivial dependencies that Sbt refuses to cache ).
For persistence MongoDB is used with the ReactiveMongo driver.
For serialization of messages between the server and the client through sockets uPickle is used which is a lightweigth serialization library without complicated dependency chain. It basically serializes simple data types and case classes, but this is more than enough for the purposes of the application.
For concurrency handling and timing project makes use of Akka Actors and akka-quartz-scheduler.
The project uses the Apache Commons Lang module for date formatting. For formatting the source code itself Scalariform is used to give a unified and organized appearance of the code.