A secure (HTTPS/WSS), real-time multiplayer implementation of the UNO card game, with a C++23 backend (uWebSockets), SQLite persistence and a Svelte 5 frontend.
Players can register, create or join lobbies (including via a 6-character invite code), configure the match rules and play against other users or against bots.
- Authentication with email/password, session via HttpOnly cookie and JWT token (HS256).
- Public/private lobbies, member management (host, promotion, kicking), automatic reconnection after a disconnection.
- Extensible game engine based on a queue of effects and rules, with support for optional mods: Draw Stacking, Progressive, Force Play, Jump In, No Bluffing, Seven-Zero.
- Bots with heuristics, also used to handle turns in case of inactivity (AFK).
- Card animations (flight from the deck to the hand and to the discard pile,
+Ncounter for accumulated penalties). - Saving and resuming interrupted matches, personal statistics and a global leaderboard.
- A C++ compiler with C++23 support (GCC or Clang)
- Python 3 (with
pip) — used to install Conan and Ninja - CMake
- OpenSSL — to generate the TLS certificates
- Node.js and npm
Installing the base tools:
- Fedora/RHEL:
sudo dnf install gcc-c++ python3 pip cmake openssl nodejs npm - Ubuntu/Debian:
sudo apt install g++ python3 python3-pip cmake openssl nodejs npm
- Compiler: Visual Studio 2022 with the "Desktop development with C++" workload.
- Python: from python.org or the Microsoft Store.
- CMake: from the official site.
- Node.js (includes npm): from nodejs.org.
- OpenSSL: included in Git Bash, or installable with
winget install ShiningLight.OpenSSL.Light(orchoco install openssl).
git clone https://github.com/Eldyn/uni.git
cd uni # or your chosen folder nameThe build is fully standardized and cross-platform — pure Conan + CMake
presets + npm, with no OS-specific setup scripts. The complete step-by-step
instructions live in BUILD.md.
In short:
# Frontend (npm lives strictly in frontend/)
cd frontend && npm install && npm run build && cd ..
# Backend
conan profile detect # one time — NO --force
conan install . -pr:a conan/release --build=missing
cmake --preset conan-release # configure
cmake --build --preset release # build
⚠️ Useconan profile detectwithout--force: the previous setup scripts passed--force, which silently overwrote any existing default profile. Plaindetectpreserves a profile you already have.
The build copies cert.pem, key.pem, .env and the public/ folder next to the
executable. See BUILD.md for prerequisites, TLS/.env generation, and
the full list of runtime environment variables (PORT, DB_PATH, FRONTEND_PATH,
SSL_CERT_PATH, SSL_KEY_PATH).
The server reads its paths from environment variables (DB_PATH, FRONTEND_PATH,
SSL_CERT_PATH, SSL_KEY_PATH, PORT) with sensible local defaults — by default it
looks for the certificates, .env, the public/ folder and the SQLite database
(uni.sqlite) in the current working directory. Since the build copies the
runtime assets next to the executable, you can start it in two equivalent ways:
# Linux / macOS — from the project root
./build/Release/uni_server
# …or from the build folder (assets already copied next to the binary)
cd build/Release && ./uni_server# Windows — from the project root
build\Release\uni_server.exe
# …or from the build folder
cd build\Release; .\uni_server.exeThe SQLite database is created automatically on first launch if it does not exist
(default uni.sqlite in the working directory, override with DB_PATH). By default the server is
reachable at https://localhost:9999 (accept the browser warning about the
self-signed certificate).
The complete documentation is already attached as documentazione-completa.pdf
(analysis, use cases and frontend tests + Doxygen backend manual + TypeDoc frontend API).
To regenerate it you need doxygen, xelatex (TeX Live), mutool (MuPDF) and
Node.js; then run:
./docs/build-full-docs.shSee ATTRIBUTION.md for the full list of third-party assets. In short:
- SNKRX font — from SNKRX by a327ex (MIT License).
- Lobby music — "Lo-Fi 16-bit Funky Fresh Beats To Chill and Jazz Out To [Sega Megadrive/Genesis Oscilloscope]" by birdrun (source).
- Backgrounds — AI-generated with Google Gemini ("Nano Banana").
This project is an independent work. It is not affiliated with, endorsed by, or sponsored by Mattel, Inc. or the UNO® brand. UNO® is a registered trademark of Mattel, Inc. All trademarks are the property of their respective owners.
UNI's original code and assets are released under CC0 1.0 Universal
(public domain) — use them freely, including commercially. Third-party assets
remain under their own licenses; see ATTRIBUTION.md.