2.3 KiB
2.3 KiB
Brass
A webservice to plan and organize personnel deployment for Brandsicherheitswachen (german; fire watch).
Key Technologies
- actix-web
- sqlx
- askama
- lettre
- htmx
- hyperscript
- bulma
- great inspiration for project structure and tooling: gerust.rs
Getting started with developing
- Clone the repository.
- Install and configure Postgresql. Create a new database for brass:
createdb brass
. - Configure database connection string in
.env
config file. - Install required development tools
cargo install <tool>
- sqlx-cli
- mailtutan
- cargo-watch
- cargo-nextest
- Migrate the development and test database:
cargo db migrate -e development
&cargo db migrate -e test
- Create superuser:
cargo r -- createadmin
- Run and recompile application on file change:
cargo w
- Run tests via nextest and review possible snapshot changes:
cargo t
Build & Deploy
- Clone the repository.
- Build release
cargo b --release
. - Copy the artifact
target/release/brass-web
to the desired location. Make it executablechmod +x brass-web
. - Create Postgresql database on the target host, configure your mail server.
- Configuration for Brass is done via Environment Variables, see
.env
for a list. - Migrate the database
[LIST_OF_ENV_VARIABLES] brass-web migrate
. - Create a superuser
[LIST_OF_ENV_VARIABLES] brass-web createadmin
. - Create some sort of service file (systemd .service, openbsd rc.conf, ...) to run Brass in the background. Examples can be found in
docs/
directory.
Contributing & Issues
Code lies on my private gitea instance, thus there's no easy way for creating issues or making contributions. If you've got an issue or want to contribute, write me an email and we'll figure it out.
Project Structure
- TODO
Further Reading
More in depth documentation about design decisions, helpful commands and database schema can be found in docs/
directory.
Copyright & License
Copyright 2025 Max Hohlfeld Brass is licensed under GNU AGPLv3.