Giter VIP home page Giter VIP logo

secret-hitler's Introduction

Secret Hitler Online

An online implementation of the tabletop game Secret Hitler, built on node.js and socket.io. Play at secrethitler.online.

Supports 5-10 players, text or voice (beta) chat, and the game's core rule set. Game data is persisted to allow features like stat aggregation, or game replays in future.

Docker Version

Run sql_import.sh to create the Postgres DB and import the SQL dump within the repo.

./sql_import.sh

Then start the application via docker-compose.

docker-compose up -d

I highly suggest changing the database credentials in the files above before running this anywhere publically.

Development

The app is written in vanilla HTML5, CSS3, and JS ES5. Files in /server run on the node.js server, files in /public are served statically when users load the page, while files in /common are shared for both.

Node

For testing/development purposes, clone/fork the repository and ensure you have node.js installed to start the server:

cd secret-hitler
npm install
node server.js

By default, the app is served at localhost:8004

WebPack

All js and css assets in /public and /common are bundled with WebPack for efficient page loads. To recompile your changes as you work:

npm install --global webpack
webpack --watch

Database

Unless you specifically need to test the user accounts system or game persistence features, you don't need to run a local db instance. Instead, simply sign in via the guest button (note that in this mode, not all features are available). Otherwise, you'll need to be running a recent version of Postgres locally.

  1. Create a new database and import schema.sql
  2. Set LOCAL_DB_URL in server/tools/config.js to the Postgres database URL
  3. (optional) Set SENDGRID_API_KEY to your SendGrid account's API key if you want to test email delivery

Contributing

Pull requests welcome, or check the issues page to make a bug report or feature suggestion.

Attribution

"Secret Hitler" is a game designed by Max Temkin, Mike Boxleiter, Tommy Maranges, and Mackenzie Schubert. This adaptation is neither affiliated with, nor endorsed by the copyright holders.

Secret Hitler is licensed under Creative Commons BY-NC-SA 4.0 (non-commercial, share-alike, attribution required).

Screenshots

Secret Hitler Online start

secret-hitler's People

Contributors

ky-is avatar

Stargazers

 avatar

Watchers

 avatar

Forkers

bayyas brdly

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.