Need help with kfchess?
Click the “chat” button below for chat support from the developer who created it, or find similar developers for support.

About the developer

133 Stars 7 Forks GNU Affero General Public License v3.0 98 Commits 6 Opened issues


Kung Fu Chess, a real-time chess game.

Services available


Need anything else?

Contributors list

# 453,855
94 commits
# 757,823
2 commits

Kung Fu Chess

Kung Fu Chess is a real-time chess game where players don't take turns. A player may make a move at any time, but pieces have a travel speed and a cooldown period. The game is hosted at


There are three components to running the Kung Fu Chess system locally: a PostgreSQL database, a Flask application server, and a webpack development server. In production, the first two also exist, but the webpack production bundle is served statically.

Setting up PostgreSQL

Install PostgreSQL on your system and create a database called

. The schema is in
and can be initialized like this:
psql -U postgres -d kfchess < db/schema.sql

Setting up Flask

It's best to run Python in some sort of virtual environment. There are a number of ways to do this, but here is one example of how to set it up. This will install all the necessary dependencies for the application server.

virtualenv .env
source .env/bin/activate
pip install -r requirements.txt

To get the server to run, provide a
file in the root of the repository that contains environment-specific configuration. This file should look something like this:
FLASK_SECRET_KEY = 'somerandomstringhere'



Without the Google Cloud and AWS keys, a few features won't work, namely the login mechanism and uploading profile pictures.

Now use FLASK_DEBUG=1 flask run
to start it. It listens on port 5000. This server does hot reloading on the python files, so any changes made to the code will restart the server.

Setting up webpack

All of the JavaScript code is in the

directory. From there, run
npm install .
to install all the necessary dependencies for the frontend. Then
npm run dev
will start the webpack development server that hosts the frontend locally.

Now navigate to

and you should see the Kung Fu Chess site!

We use cookies. If you continue to browse the site, you agree to the use of cookies. For more information on our use of cookies please see our Privacy Policy.