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 invite # mint an invite token, prints a /register?token=... URL
just serve # run the web service on :3000
Then open the printed registration URL to create the first account.
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 list | set-staff <name> [--revoke] | activate <name> | deactivate <name> | delete <name> --yesmanage invite create [--email E] [--days N] | list | show <token>- Justfile shortcuts:
just manage …,just invite [days],just staff <name>