Available at: chess.maunolo.dev
- Free board at
/: anyone moves any piece, captured pieces go to the trash and can be put back. Options turns on rule validation. - Games: Menu → New game picks a color and a clock (none, or 1+0 up to 30+0), then shares a
/g/<id>link. Whoever opens it first takes the other seat, everyone after that watches. The server enforces turns and the clock, and ends the game on checkmate, stalemate, time, resignation, agreed draw, threefold repetition, the fifty-move rule or insufficient material. Rematches swap colors. - Moving: drag a piece, or tap it and then tap its square. With validation on, the legal moves of the selected piece are marked.
- Language: English, or Brazilian Portuguese when the browser asks for Portuguese (
Accept-Language). The strings live insrc/i18n.rs; server notifications are sent as keys and translated on the page.
services:
chess_web:
build:
context: .
ports:
- 3100:3100
environment:
PORT: 3100
JWT_SECRET: your_secret
RUST_LOG: debug- Rust stable 1.88 or newer (required by Leptos 0.8), the Docker image builds with 1.99
cargo install --locked cargo-leptos- version 0.3 or newer, it downloads thewasm-bindgen-climatchingCargo.lock(don't installwasm-bindgen-cliglobally, it would take precedence)rustup target add wasm32-unknown-unknown- add the ability to compile Rust to WebAssemblynpm install- Node.js 20 or newer, for the CSS build (Tailwind + PostCSS)
npm run devThis builds the CSS, then runs the PostCSS watcher and cargo leptos watch (the actix server and the wasm package, with live reload, CSS included). Open browser on http://localhost:3100/
The server exits at startup without JWT_SECRET; npm run dev defaults it to dev_secret and RUST_LOG to info, override them in the environment. APP_TITLE sets the page title at compile time and defaults to Chess.
For a release build, npm run build, then run ./target/release/chess_web with JWT_SECRET set (npm start does both).
cargo test --features ssr