recourse
A small axum web application scaffold with:
- axum web stack with
minijinjatemplates (embedded at build time, hot-reloaded fromtemplates/in dev) - sea-orm + Postgres with a
migrationcrate (auto-migrates on boot) - Auth: Argon2 password hashing, cookie sessions, invite-only registration, and bearer API tokens for scripts/mobile
- Tailwind + DaisyUI front-end with a theme switcher (
just assetsto build) - Prometheus metrics at
/metrics, health check at/healthz - A
Dockerfile(assets → cargo → debian-slim) andcompose.yml(Postgres + web)
Quick start
just deps # npm install (frontend deps)
just assets # build CSS + JS + webfonts
just db-up # start Postgres via podman compose
just migrate # apply migrations
just admin alice alice@example.com # first (staff) account; prints its password
just serve # run the web service on :3000
Sign in with the printed password. Further members join through invites
(just invite, or the Invites page), or are created the same way.
Staff
Staff (category/reaction admin, moderation) is only ever granted on purpose:
manage user create … --staff, or manage user set-staff <name> for an
existing account. Registering — even as the very first account — never makes
anyone staff.
Configuration (environment)
| Var | Default | Meaning |
|---|---|---|
APP_NAME |
recourse |
Display name in templates |
DATABASE_URL |
postgres://recourse_user:recourse_password@localhost:5432/recourse |
Postgres connection |
BIND_ADDRESS |
0.0.0.0:3000 |
Listen address |
SESSION_DURATION_HOURS |
24 |
Cookie session lifetime |
REGISTRATION_TOKEN_DURATION_DAYS |
7 |
Default invite validity |
AUTO_MIGRATE |
true |
Run migrations on boot |
REGISTRATION_ENABLED |
false |
Allow /register without an invite link (token still required) |
PUBLIC_URL |
(unset) | Public origin for the API-token curl example behind a proxy |
Binaries
recourse— the web servicemanage— admin CLI:manage user create <name> --email E [--staff] [--password-stdin]— no invite needed; without--password-stdina strong password is generated and printed oncemanage user list | set-staff <name> [--revoke] | set-trust <name> <0-4> | activate <name> | deactivate <name> | delete <name> --yesmanage invite create [--email E] [--days N] | list | show <token>- Justfile shortcuts:
just manage …,just admin <name> <email>,just invite [days],just staff <name>,just trust <name> <level>