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.toml
βββ README.md
βββ config
β βββ default.json # Default configuration
β βββ production.json # Production configuration (Overwrites the default)
βββ rustfmt.toml
βββ src
βββ context.rs # Shared state and functionality across the APP
βββ 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
β βββ user.rs
βββ settings.rs
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.