Quick Start
Run the server
With no DATABASE_URL set, CityHall creates a local SQLite database and runs
migrations automatically:
cargo run
On first launch against an empty database, CityHall seeds an admin user with a
random password and logs it once:
WARN cityhall: seeded initial admin user | username: admin | password: <random> | change it on first login
Copy that password. It is not stored anywhere in plaintext and cannot be
recovered later (only reset). The server then listens on
http://127.0.0.1:3000.
Building the frontend first (
cd web && npm install && npm run build) lets the server serve the web UI. Without it the API still works; see Development for the live-reload dev workflow.
Sign in
- Open
http://127.0.0.1:3000. - Sign in as
adminwith the seeded password. - You are required to set a new password before continuing.
- You land on the Users page, where you can create, edit, and delete users.
Manage users without the UI
The same binary manages users from the command line:
cargo run -- user list
cargo run -- user create --username bob --email bob@example.com
See the CLI reference for all commands.
Point it at a real database
For anything beyond local use, set DATABASE_URL to Postgres or MySQL:
DATABASE_URL=postgres://user:pass@localhost/cityhall cargo run
See Configuration for all options.