A web adaptation of the social deduction board game Secret Hitler. https://secrethitler.io
Latest commit 364bce4 Nov 14, 2018
Permalink
Failed to load latest commit information.
__test__ updated unit tests - all pass Nov 13, 2018
bin removed failing unit tests Feb 12, 2018
data making rapid dev easier Mar 26, 2018
docs Update roadmap.txt Nov 9, 2018
iso game sounds & gamesetting implemented May 22, 2018
logs making rapid dev easier Mar 26, 2018
models minor stuff/changelog Nov 15, 2018
public casual game filter, redone default cardback, social media metatag non… Nov 12, 2018
routes minor stuff/changelog Nov 15, 2018
scripts Merge branch 'master' of https://github.com/cozuya/secret-hitler Oct 30, 2018
src minor stuff/changelog Nov 15, 2018
utils Added newly sighted burner email Jul 24, 2018
views casual game filter, redone default cardback, social media metatag non… Nov 12, 2018
webpack defaultprops to lobby/playerlist, new non minified prod webpack config May 22, 2018
.babelrc Three dev build bug fixes Sep 27, 2018
.env styling redone, claim button made bigger etc Nov 9, 2018
.eslintrc cleaned up dev dependencies, some work on rategame but doesnt work be… May 13, 2018
.gitattributes script stuff May 2, 2018
.gitignore Custom game stuff (#1045) Oct 19, 2018
.prettierignore Nth tensor socket security updates (#828) Apr 27, 2018
.prettierrc removed failing unit tests Feb 12, 2018
CONTRIBUTING.md Update CONTRIBUTING.md Jun 6, 2018
LICENSE removed failing unit tests Feb 12, 2018
README.md updated email sends so that they don't appear in gmail spam Oct 28, 2018
app.js v0.14.10 - backend/mod updates and performance gains, elo slider upda… Jul 20, 2018
nodemon.json removed failing unit tests Feb 12, 2018
package.json minor stuff/changelog Nov 15, 2018
version.js minor stuff/changelog Nov 15, 2018

README.md

secret-hitler

styled with prettier

Secret Hitler is a dramatic game of political intrigue and betrayal set in 1930's Germany. Players are secretly divided into two teams - liberals and fascists. Known only to each other, the fascists coordinate to sow distrust and install their cold-blooded leader. The liberals must find and stop the Secret Hitler before it’s too late.

Effectively this is a take on the classic social deduction/hidden role board game genre such as Werewolf and Mafia, but closer to the Resistance. Games are 5-10 players, the minority (fascists) know who everyone is and the majority (liberals) don't know anything. Over the course of the game the liberals need to try to identify the fascists to win and the fascists need to remain hidden, with an extra "superfascist" role with an additional win condition for both sides.

This codebase is a "lobby style" implementation of this game - anyone can make a game which is displayed on a list on the "home" page. The game starts when enough players are seated. In addition, anyone can watch a game in progress, etc.

Current production/stable is found at Secret Hitler IO.

Screenshot

Considering contributing to this project? Please read our brief guidelines found at CONTRIBUTING. Contributors get a cool teal playername color!

Front end: React, Redux, Sass, Semantic UI, jQuery, SocketIO.

Back end: Node, Express, Pug, Passport, Mongodb with Mongoose, SocketIO.

Installation

Install node.js version: LTS, have it in your path.

Install git, have it in your path.

Install mongodb, have it in your path.

Install yarn for your OS.

then

git clone https://github.com/cozuya/secret-hitler.git
cd secret-hitler
yarn

Running in dev mode

Start development:

yarn dev

Navigate to: http://localhost:8080

You'll most likely need a browser extension such as Chrome's openMultiLogin to have multiple sessions on the same browser. No, incognito will not work. When developing in Chrome, you'll want to check "disable cache" on the network tab - my webpack setup isn't great and it doesn't cache bust itself. Also it will be very helpful to make all of the "quickdefault" accounts with the default password, snipsnap, so that you can log in to an account in one click. There is a yarn script you may run once server or dev yarn scripts are already running called create-accounts which will attempt to populate all of the helper accounts into the database.

yarn create-accounts

Running in production mode

I'll leave you to figure that out. SH.IO is currently a $20/month ubuntu linux box using nginx, lets encrypt, PM2, and hosted on Digitalocean.

Statistics

Production has a limited set of data on the /stats page, check network traffic for the XHR for that if interested. If you'd like to do more detailed data analysis, please contact the maintainer for a dump of the (anonymized) profile and replay data.

License and Attribution

Secret Hitler is designed by Max Temkin (Cards Against Humanity, Humans vs. Zombies) Mike Boxleiter (Solipskier, TouchTone), Tommy Maranges (Philosophy Bro) and illustrated by Mackenzie Schubert (Letter Tycoon, Penny Press).

This game is licensed as per the Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International license.

Alterations to the original game

Minor image alterations and editing (assets available upon request).

Veto power is slightly adjusted so that chancellors need to select a policy prior to saying yes or no to vetoing that policy.

Adapted the rules explanation to account for online vs physical play.

There is an option when players make a game to "rebalance" the 6, 7 and 9 player games - 6p starts with a fascist policy already enacted, 7p starts with one less fascist policy in the deck, 9p starts with two less facist policies in the deck. Players (and results from analyzing statistics) have noted that these game modes are not balanced well in the original ruleset.

There is a custom game mode where game creators can make games with different rulesets such as being able to pick policy powers, pick number of fascists (always less than liberals), number of policies, etc.