Cards (Ludicrous Ones) Against Humanity (CLASH) is an open‑source spin on Cards Against Humanity. Built in Rust and Svelte for offering a lightning‑fast online playground.
git clone https://github.com/nwrenger/clash.git
cd clash
# Firstly generate some certificates
./data/cert/gen.sh
# Run Debug Build with frontend build
cargo run -- localhost:8080 -f http://localhost:5173 --cache data/cache --cert data/cert/cert.pem --key data/cert/key.pem
The backend is also self-hosted at: https://api.clash.nwrenger.dev/
Command-line arguments:
Argument | Description | Default |
---|---|---|
<HOST> |
Required. Socket address for the server (IP:port) | None |
-f |
Allowed CORS origin for the frontend | https://clash.nwrenger.dev |
-c |
Filesystem path where decks are stored | cache |
--cert |
Path to the SSL certificate (fullchain.pem ) |
/etc/letsencrypt/live/api.clash.nwrenger.dev/fullchain.pem |
--key |
Path to the SSL private key (privkey.pem ) |
/etc/letsencrypt/live/api.clash.nwrenger.dev/privkey.pem |
--help |
Print help | None |
cd view
bun install
bun run dev
The frontend is also hosted on GitHub Pages: https://clash.nwrenger.dev/
CLASH has been tested to handle up to 2–4 lobbies with 5,000 players each, or 10–30 lobbies with 1,000 players each, on typical modern server hardware (Oracle's Ampere A1 in free tier).
⚠️ Note: For very large lobbies (2,000+ players), browser performance becomes the primary bottleneck. Joining or updating lobbies with thousands of players can lag or freeze the UI, especially on lower-end devices.
Actual capacity will vary depending on server CPU/RAM, network bandwidth, and client performance.
We recommend keeping lobby sizes below 5,000 for the best experience.
[POST] /lobby
— Creates a new lobby and returns its UUID.[ANY] /ws/:lobby_id
— WebSocket endpoint to join and interact with a lobby.CLASH is in active beta. We welcome:
Please open issues or PRs on GitHub.
This project is licensed under the MIT License. See LICENSE for details.