Node Go is a web application for playing the board game Go in real time
Find a file
2020-04-16 20:28:40 -07:00
.circleci add react and react-dom to play-node-go package.json 2020-03-30 11:33:31 -07:00
packages patch Game logic neighboring stone bug 2020-04-16 20:28:40 -07:00
lerna.json init lerna 2020-02-05 15:29:36 -08:00
package-lock.json add audit-level flag to ci to bypass low-level dev-dependency issues 2020-03-29 20:56:16 -07:00
package.json clean unused package.json scripts 2020-04-10 19:10:34 -07:00
README.md update readme with setup 2020-04-15 23:16:00 -07:00

Node Go

A browser application to play Go in real time.

Development Demo

The project in it's current state
Client only prototype

Setup

Local Repo

$ git clone https://github.com/sorrelbri/node-go.git

Install Deps

$ npm run bootstrap

Runs lerna bootstrap command installing dependencies for project, development and package dependencies

Initialize Database

Download PostgreSQL

To verify PostgreSQL installation:

$ psql -V

Node Go API was built with version 11.4. See documentation for Postgres download.

Create Databases

$ psql
# psql(11.4)
CREATE DATABASE node-go;
CREATE DATABASE node-go-test; # testing database

Configure Environment

$ touch packages/server/.env
# .env
NODE_ENV=development
PORT=# set development port for API
REACT_ADDRESS=http://localhost:3000 # default
PG_CONNECTION_STRING=postgresql://localhost:5432/node-go
PG_CONNECTION_STRING_TEST=postgresql://localhost:5432/node-go-test
JWT_SECRET=# generate a secret key for JWT signing algorithm
TEST_SECRET=# same as above, for test environment
SALT_ROUNDS=# set number of salt rounds for bcrypt hashing function
DOMAIN=localhost
USER_ONE_PASSWORD=# credentials for testing with 
USER_ONE_EMAIL=# same as above

Smoke test

$ lerna run test

Run Database Migrations

$ cd packages/server; npm run migrate; npm run seed

Running in development

$ cd packages/server
$ npm start # or if you have nodemon
$ nodemon
$ cd packages/play-node-go
$ npm start

Known Bugs

  • server side move validation not complete, full game logic not implemented
  • no authorization for game moves
  • websocket connections may remain open, pooling prevents runaway leaks, but tests may hang

Roadmap 4/20

  1. Game logic module
  2. Game in progress caching
  3. Auth for games
  4. Game request creation

Features

  • Realtime communications
  • Multiple game settings
  • Customizable board size

Built with

Management & Deployment

  • Lerna
  • CircleCI