RESTful API template built with Rust lang. It uses MongoDB database and Axum HTTP framework.
To use this template as your project starting point, click "Use this template" at the top of this page, or click here.
- Authentication. Based on jsonwebtoken
- Layered configuration system. Based on config-rs
- Logs. Based on tracing
- Error handling
- CI Jobs based on Github actions
- E2E Tests
- Dependabot configuration
βββ Cargo.lock
βββ Cargo.toml
βββ README.md
βββ config
β βββ default.json # Default configuration
β βββ production.json # Production configuration (Overwrites the default)
β βββ test.json # Test configuration (Overwrites the default)
βββ rustfmt.toml
βββ src
β βββ database.rs
β βββ errors.rs
β βββ lib # Helpers not related to the business model
β β βββ authenticate_request.rs
β β βββ date.rs
β β βββ mod.rs
β β βββ models.rs # Base Database Model trait
β β βββ to_object_id.rs
β β βββ token.rs
β βββ logger.rs
β βββ main.rs
β βββ models
β β βββ cat.rs
β β βββ mod.rs
β β βββ user.rs
β βββ routes
β β βββ cat.rs
β β βββ mod.rs
β β βββ status.rs
β β βββ user.rs
β βββ settings.rs
β βββ tests # E2E Tests
βββ test.sh
Contributors are welcome, please fork and send pull requests! If you find a bug or have any ideas on how to improve this project please submit an issue.