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.
To read more about how this project came to fruition and how to build an app using the same technologies, follow the links below!
- Part 1 - Introduction and Planning
- Part 2 - Enabling Websockets in Flask using Flask-SocketIO
- Part 3 - Scaffolding a Vue App with vue-cli and Managing State with Vuex
- Part 4 - Integrating Websockets into a Real-Time Vue App with Socket.io and Vuex
For content related to development, security, devops, AI, etc... check out SecDevOps.AI!
Rules for codenames can be found here.
The app uses flask as its back-end and webpack as a front-end dev server.
- (optional) Gunicorn
- (optional) nginx
- (optional) Foreman (development only)
# 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
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
# 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
- Create a symbolic link from the new config to