Code Monkey home page Code Monkey logo

shinkgs's Introduction

Shin KGS

An unofficial JavaScript client for KGS Go Server.

Available at https://shin.gokgs.com/

Screenshot - iOS Safari

Goals

  • 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

Progress

  • 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

More detail: Version 1 Milestone

Contributing

Contributions welcome. Please check the Version 1 Milestone and Issues to help coordinate efforts. Feel free to create an issue if there isn't one already for what you have in mind.

Issues with the "difficulty: starter" label are good tasks to get started on. Reach out if you need any guidance!

Code Overview

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.

Development Setup

You'll need Node.js and Yarn.

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. You will have to trust the self-signed certificate.

Requests are sent to the official KGS API by default. To use a custom API endpoint:

REACT_APP_API_URL=https://example.com/api/access yarn start

(Note: Safari does not allow cookies from unvisited third-party domains, so in development mode requests will be proxied through a local server.)

If you don't have eslint or flow in your editor, you can check for errors with:

yarn lint

Deploying the Web App

The easiest way to deploy the app 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.

Running an API Server

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

References

Similar Projects

shinkgs's People

Contributors

ghopper21 avatar jkk avatar mikach avatar neagle avatar sehoffmann avatar yishn avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.