An unofficial JavaScript client for KGS Go Server.
Available at https://shinkgs.com/
- First-class web and mobile experience
- Retain community vibe of KGS
- Start small, release early
- Work towards native versions (Electron, React Native, Cordova)
- Bus factor > 1
- Game lists
- Game spectating and chat
- Room chat
- User chat (direct messaging)
- View and edit user details
- Submit challenge proposal (no negotiating)
- Create challenge
- Negotiate challenge
- Automatch
- Basic game playing
- Full-featured game playing (fine-tuned UI, rengo, simul)
- Review tools
- Admin/moderation tools
- Everything else
Contributions welcome. Please check the Project Board and Issues to help coordinate efforts. Feel free to create an issue if there isn't one already for what you have in mind.
There's a difficulty: starter label for issues that are good tasks to cut your teeth on.
This project uses JavaScript, React, and ES6+ with Flow types. VS Code (with eslint and flow extensions added) is a great editor for this setup.
State is managed with a Redux-like pattern: there is a single, primary source of truth for app state, plus a bit of component-local state. Messages describing actions are dispatched, which handlers then process to produce the next app state. Unlike typical Redux, no implicit context is used. Everything is passed down through props.
To install and start a local dev server, run:
yarn
yarn start
Note: the dev server will use HTTPS, which is required to interact with the KGS API.
Requests are proxied to the KGS API by default. To use a custom API endpoint:
REACT_APP_API_URL=https://example.com/api/access yarn start
(Note: if you use a cross-origin endpoint, the app won't work reliably in Safari, even with CORS headers. Safari does not allow cookies from an unvisited third-party domain.)
If you don't have eslint or flow in your editor, you can check for errors with:
yarn lint
The easiest way is to use the ▲now service:
yarn global add now
yarn deploy-now
This builds the app then pushes it out to the cloud with a unique URL.
This project depends on the new JSON-based KGS API.
The official API is available at https://www.gokgs.com/json/. Obsolete older versions are (at least for now) available for download.
There's a Dockerfile
in the kgs-api
directory that makes running the older API on your local machine easy. To use it, install Docker, then:
cd kgs-api
docker build -t kgs-api .
docker run -p 8080:8080 kgs-api
This will start a server at http://localhost:8080
To deploy to now.sh using their Dockerfile
support:
now kgs-api