An unofficial online version of the Cards Against Humanity game. Pairs well with friends, booze and video chat.
Put together by Kevin Bongart so he could play his beloved game with friends during tough times. Not affiliated with the official Cards Against Humanity company, but you should absolutely buy their game because it's a lot more fun in person. Remixed under Creative Commons BY-NC-SA 2.0 license.
The cards were imported from json-against-humanity.
This is a Ruby on Rails application that requires Ruby, PostgreSQL and Redis.
- Install Ruby, preferrably with
rbenv - Install dependencies:
$ gem install bundler
$ bundle install
$ yarn install- Create, migrate and populate the database:
$ bundle exec rails db:create db:migrate db:seed- Start the web server and the background job processor:
$ bundle exec rails server
$ bundle exec sidekiqStreaming game updates to clients goes through background jobs, so Sidekiq is required (otherwise, players need to refresh the page manually).
Alternatively, you can use an application process manager to start both the web server and background job processor. Foreman is a good Ruby-based option, but there are many alternatives to suit your needs:
$ gem install foreman
$ foreman start web=1,worker=1bundle exec rspec- Open a browser to http://localhost:3000
Make sure you have Docker Engine installed. To configure the containers, you may modify the files Dockerfile and docker-compose.yml.
- Build the image:
docker compose build [--no-cache]- Create you own environment variables:
cp .env.example .env
vim .env- Precompile assets then create, migrate, and seed the database:
docker compose [--env-file .env] run --rm web bundle exec rails assets:precompile db:create db:migrate db:seed - Optional, run the test suite:
docker compose [--env-file .env] run --rm web bundle exec rspec- Start the web and worker services:
docker compose [--env-file .env] upIf successful, you should see something like this:
web-1 | => Booting Puma
web-1 | => Rails 7.0.4.3 application starting in development
web-1 | => Run `bin/rails server --help` for more startup options
worker-1 | 2026-01-08T14:04:35.732Z pid=1 tid=e0h INFO: Booted Rails 7.0.4.3 application in development environment
worker-1 | 2026-01-08T14:04:35.732Z pid=1 tid=e0h INFO: Running in ruby 3.3.2 (2024-05-30 revision e5a195edf6) [aarch64-linux]
worker-1 | 2026-01-08T14:04:35.732Z pid=1 tid=e0h INFO: See LICENSE and the LGPL-3.0 for licensing details.
worker-1 | 2026-01-08T14:04:35.732Z pid=1 tid=e0h INFO: Upgrade to Sidekiq Pro for more features and support: https://sidekiq.org
worker-1 | 2026-01-08T14:04:35.732Z pid=1 tid=e0h INFO: Sidekiq 7.2.2 connecting to Redis with options {:size=>10, :pool_name=>"internal", :url=>"redis://redis:6379/1"}
worker-1 | 2026-01-08T14:04:35.735Z pid=1 tid=e0h INFO: Sidekiq 7.2.2 connecting to Redis with options {:size=>10, :pool_name=>"default", :url=>"redis://redis:6379/1"}
web-1 | Puma starting in single mode...
web-1 | * Puma version: 6.4.2 (ruby 3.3.2-p78) ("The Eagle of Durango")
web-1 | * Min threads: 5
web-1 | * Max threads: 5
web-1 | * Environment: development
web-1 | * PID: 1
web-1 | * Listening on http://0.0.0.0:3000
web-1 | Use Ctrl-C to stop
db-1 | 2026-01-08 15:08:37.556 CET [26] LOG: checkpoint starting: time
db-1 | 2026-01-08 15:08:37.668 CET [26] LOG: checkpoint complete: wrote 4 buffers (0.0%); 0 WAL file(s) added, 0 removed, 0 recycled; write=0.106 s, sync=0.002 s, total=0.113 s; sync files=3, longest=0.001 s, average=0.001 s; distance=0 kB, estimate=0 kB
redis-1 | 1:M 08 Jan 2026 14:08:38.027 * 100 changes in 300 seconds. Saving...
redis-1 | 1:M 08 Jan 2026 14:08:38.028 * Background saving started by pid 22-
On your browser, go to http://localhost:3000 to start playing with your friends.
-
To stop the containers, execute:
docker compose down [-v]When deploying in production, it is highly advised to serve the application behind nginx with SSL certificates. More instructions here.