This is a web app for playing the card game Citadels.
- Support all characters and roles
- Learn htmx, practice web dev
- All 30 unique districts
- All 27 game characters.
- Game config for picking roles and districts.
For most commands: use mprocs.
The logger offers five levels: - error - warn - info - debug - trace
This is excessive, and I will try to stick to 3: - error - debug - info
To install a new dep:
- Comment out the 2nd line from .cargo/config.toml. So it looks like:
# replace-with = "vendored-sources"
cargo add foo
cargo vendor
- Uncomment .cargo/config.toml.
You might think this is a lot of friction for adding deps. This is a good thing. Vendoring deps makes it so that the docker image can build more readily, and makes our codebase more resistant to supply chain attacks. The friction makes me think twice before adding a new dep.
Tech Stack:
- Frontend:
- htmx
- hyperscript (as needed)
- interactjs for drag 'n drop
- Backend
- Rust, stable compiler. No nightly features
- axum
- Askama for templating. (Jinja clone for Rust)
Evaluating: - sqlite for two use cases: - game backups via action logs - saving preferred game configuration
How to release:
- Update changelog
- Run:
deploy.nu
- git commit changes
- Git tag the release
Script to generate a new signing key:
random binary 64 | encode hex
In prod use fly secret
.
In dev, use the .env file.
Non secret env vars can go in fly.toml