👾 Realtime Codenames game that you can play on your phone, TV, or laptop
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
deploy
public Rebrand to Codewords Jul 23, 2018
screenshots Delete Untitled Diagram.xml Nov 20, 2017
server
src Initialize jest unit testing suite Jul 26, 2018
tests
.gitignore
.travis.yml
Procfile Updated project to vue-cli 3.0 scaffold and fixed up code to support … Apr 3, 2018
README.md Update README.md Apr 23, 2018
cypress.json Added record option to cypress test command for CI Apr 8, 2018
jest.config.js Initialize jest unit testing suite Jul 26, 2018
package-lock.json Update package.json Feb 3, 2019
package.json Initialize jest unit testing suite Jul 26, 2018
requirements.txt
vue.config.js Updated project to vue-cli 3.0 scaffold and fixed up code to support … Apr 3, 2018
yarn.lock Initialize jest unit testing suite Jul 26, 2018

README.md

codenames

Build Status

Realtime webapp implementation of the classic social word game, Codenames, designed to be played on a TV and mobile devices. Based on a project by sprek.

Blog Series

To read more about how this project came to fruition and how to build an app using the same technologies, follow the links below!

For content related to development, security, devops, AI, etc... check out SecDevOps.AI!

Large Player View Player - mobile Spymaster - mobile

Rules

Rules for codenames can be found here.

Development

The app uses flask as its back-end and webpack as a front-end dev server.

Prerequesites

  • npm
  • python
  • pip
  • (optional) Gunicorn
  • (optional) nginx
  • (optional) Foreman (development only)

Install Dependencies

# optional: use a virtualenv
virtualenv venv
source venv/bin/activate

# install python and js dependencies
npm run setup

# install dependencies separately
pip install -r requirements.txt
npm install
# or
yarn install

Development Servers

I recommend using Foreman. Foreman allows us to run both servers simultaneously in one terminal window.

# install foreman
npm i -g foreman
# start foreman
nf start
# both flask and webpack-dev-server should be running

# run servers separately...
# start the flask server on port 5000
npm run flask

# start webpack dev server with hot reload at localhost:8080
npm run serve
# navigate to localhost:8080 in browser

Production

Build

# install dependencies
npm install
pip install -r requirements.txt

# or install both at once
npm run setup

# build for production with minification
npm run build

# build for production and view the bundle analyzer report
npm run build --report

Running with nginx + Gunicorn

After installing Gunicorn and nginx...

  • Add your username and/or project folder path to the configs in the deploy directory.
  • Copy deploy/gunicorn.service to /etc/systemd/system
  • Copy deploy/codenames.nginx.conf to /etc/nginx/sites-available
  • Create a symbolic link from the new config to sites-enabled