Skip to content


Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?

Latest commit


Git stats


Failed to load latest commit information.
Latest commit message
Commit time

Minefield Mahjong

Build Status

This is a two-player version of Riichi Mahjong.

See (where the project is currently deployed) for more details.


The project is available under MIT license. See COPYING for more details.


For frontend, node.js and yarn is required.

For backend, Rust and Cargo.

Install libraries:

$ make

Make targets are:

  • make static - recompile static assets
  • make watch - recompile static assets on each change
  • make serve - serve the website in development mode
  • make bot - run bot

Run (in developer mode)

$ make watch
$ make serve

then browse to localhost:8080.


  • make test - run server tests
  • make test_js - run JavaScript tests
  • make watch_test_js - run JavaScript tests on each change

Old server (Python)

  • make env - build virtualenv
  • make test_py - run tests
  • make serve_py- serve the website in development mode


Minefield is currently a static web page plus a WebSocket server. To deploy Minefield, you need to:

  • copy files (see make sync),
  • run minefield-server (and possibly minefield-bot)
  • serve the static files under a given location, for instance /minefield/,
  • serve the WebSocket under the ws path, for instance /minefield/ws.

Here's an example configuration for nginx:

location /minefield {

location /minefield/ {
    proxy_http_version 1.1;
    proxy_set_header Upgrade $http_upgrade;
    proxy_set_header Connection "upgrade";

    # Prevent dropping idle connections
    proxy_read_timeout 7d;