Axum Repository framework boilerplate
cargo-watch repository: Github
cargo watch -x 'run --bin axum-boilerplate-bin'
cargo-audit repository: Github
Installation:
cargo install cargo-audit --features=fix
Usage:
cargo audit
cargo audit fix
cargo test -- --test-threads=1
Use Drill
drill --benchmark drill.yml --stats --quiet
sqlx repository: Github
sqlx-cli repository: Github
To create a migration:
sqlx migrate add -r <name>
sqlx migrate add -r create_users_table
Run migrations:
sqlx migrate run
Revert migrations:
sqlx migrate revert
Used for Github Actions or Docker
/!\ Be careful, sqlx
and sqlx-cli
must be in the same version!
cargo sqlx prepare -- --bin <app name in Cargo.toml>
cargo sqlx prepare -- --lib
Then set env variable SQLX_OFFLINE
to true
.
For example:
SQLX_OFFLINE=true cargo build
Run:
cargo doc --open --no-deps
Run with private items:
cargo doc --open --no-deps --document-private-items
OpenAPI documentation using Rapidoc
YAML file: assets/doc/doc_api_v1.yml
URL: <baseURL>/doc/api-v1.html
Run the server:
make docker
To create the admin user:
make docker-cli-register
- Improve global documentation
- Improve README.md to explain the boilerplate
- Add scopes (currently roles) to routes
- Add password scorer passwords (parameter in .env?)
- Add more .env parameters in
SharedState
? - Replace config file .env by config.toml or add config.toml?
- Add WebSocket examples
- Simple WebSocket example
- Chat WebSocket example
- Rate limiter middleware
- Add documentation
- Optimize code
- Add white list from
.env
- Add Docker support
- rust-web-server-template
- axum-demo
- Create a first user to use API
- Add Prometheus metrics (Example) or (Example)