Skip to content

👾 Realtime Codenames game that you can play on your phone, TV, or laptop

Notifications You must be signed in to change notification settings

VogtAI/codenames

 
 

Repository files navigation

codenames

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

# create 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

About

👾 Realtime Codenames game that you can play on your phone, TV, or laptop

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Vue 55.5%
  • Python 21.3%
  • JavaScript 18.3%
  • HTML 4.8%
  • Shell 0.1%