Skip to content

Lishogi Development Setup

WandererXII edited this page Jun 4, 2024 · 1 revision

Lishogi is developed on linux and for linux, so while you can make this work on other platforms, it might take some more tinkering on your part. First git clone lishogi and cd into lishogi directory.

Prerequisites

You should have the following tools installed.

  • git
  • java (JDK >= 17)
  • sbt (>= 1.9)
  • node (>= 14.3)
  • yarn (>= 1.0)
  • mongodb (>= 4.0)
  • redis

There might be other tools needed for specific tasks, but you probably won't need these:

  • python - linting translations
  • ruby - generating piece sets css

Static JS/CSS

To generate static files for the frontend simply run ./ui/build dev. This will build everything in the ui folder - JS and CSS.

If later you want to build only a specific module for example round, run: yarn workspace round run dev, append --watch if you want it to watch for changes.

For watching for changes and automatically rebuilding CSS, run cd ui && yarn run gulp css.

Backend

Start the sbt console with ./lila. After the initial load, type compile, this will take several minutes. After it's done make sure mongodb and redis is running, then type run. Go to http://localhost:9663/, you will have to wait another minute before you get the first response. if everything went well you should now have lishogi dev version running locally.

Websockets

See that red popup saying reconnecting, you will probably also need websockets. Clone https://github.com/WandererXII/lila-ws, cd to lila-ws type sbt, when the console loads type compile. After the compilation is done, type reStart. And that's it.

Clone this wiki locally