# Brass A webservice to plan and organize personnel deployment for [Brandsicherheitswachen](https://de.wikipedia.org/wiki/Brandsicherheitswache) (german; fire watch). # Key Technologies - [actix-web](https://actix.rs/) - [sqlx](https://github.com/launchbadge/sqlx) - [askama](https://github.com/askama-rs/askama) - [lettre](https://lettre.rs/) - [htmx](https://htmx.org/) - [hyperscript](https://hyperscript.org/) - [bulma](https://bulma.io/) - great inspiration for project structure and tooling: [gerust.rs](https://gerust.rs) # Getting started with developing 1. Clone the repository. 2. Install and configure Postgresql. Create a new database for brass: `createdb brass`. 3. Configure database connection string in `.env` config file. 4. Install required development tools `cargo install ` - sqlx-cli - mailtutan - cargo-watch - cargo-nextest 6. Migrate the development and test database: `cargo db migrate -e development` & `cargo db migrate -e test` 7. Create superuser: `cargo r -- createadmin` 8. Run and recompile application on file change: `cargo w` 9. Run tests via nextest and review possible snapshot changes: `cargo t` # Build & Deploy 1. Clone the repository. 2. Build release `cargo b --release`. 3. Copy the artifact `target/release/brass-web` to the desired location. Make it executable `chmod +x brass-web`. 4. Create Postgresql database on the target host, configure your mail server. 5. Configuration for Brass is done via Environment Variables, see `.env` for a list. 6. Migrate the database `[LIST_OF_ENV_VARIABLES] brass-web migrate`. 7. Create a superuser `[LIST_OF_ENV_VARIABLES] brass-web createadmin`. 8. 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](https://www.gnu.org/licenses/agpl-3.0.en.html#license-text).