This is a binary project inspired from axum-login with many additional features to work as a starting project that have most features needed for a starting full-backend project.
- Username / Password Auth .
- Google OAuth2 .
- API authentication .
- Authorization ( roles and permissions ) .
- Download the app .
- Run the project using
cargo-watch. please install cargo-watch .
cargo watch -x run- SQLX migrate ( this crate uses postgres ) , the migrations also auto-generated with compile or you could use this command . please create a
.envfile that containsDATABASE_URLandCLIENT_IDandCLIENT_SECRETwhere you could get these credentials from google OAuth console .
echo DATABASE_URL=postgres://db_user:[email protected]:5432/db_name > .envsqlx migrate run --database-url postgres://db_user:[email protected]:5432/db_name
- Run Docker containers
docker composer up. The crate contains a docker-compose file for postgres DB and redis ( used for sessions ) containers . - Run tailwind
npxto watch forinput.cssand generateoutput.cssfile. do not forget to install Node and node packages .npm install
npx tailwindcss -i ./assets/input.css -o ./assets/output.css --watch- Redis sessions ( axum-sessions crate ) .
- Username / Password Authentication .
- API Auth ( generating Api token key ) .
- Open OAuth ( Google OAuth ) .
- Web Auth and API including extractors and middlewares .
- Validation ( validator crate with custom validators ) .
- Authorization ( roles and permissions ) .
- Flash messages ( axum-messages crate ) .
- Askama HTML templates for basic needed pages with ( datetime custom filter ) .
- Tailwind installed with some initial styling .
- Internationalization ( rust-i18n crate) .