Rustapi
š RESTful Rust API Template / Boilerplate
Install / Use
/learn @ndelvalle/RustapiREADME
rustapi
RESTful API template built with Rust lang. It uses MongoDB database and Axum HTTP framework.
Requirements
How to use this template
To use this template as your project starting point, click "Use this template" at the top of this page, or click here.
Feature highlights
- Authentication. Based on jsonwebtoken
- Layered configuration. Based on config-rs
- Logs. Based on tracing
- Error handling
- Pagination
- E2E Tests
- OpenAPI Specification
- CI based on Github actions
- Dependabot configuration
Project structure
āāā 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
Test
To run tests make sure MongoDB is up and running.
make test
Contributing
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.
Related Skills
gh-issues
346.8kFetch GitHub issues, spawn sub-agents to implement fixes and open PRs, then monitor and address PR review comments. Usage: /gh-issues [owner/repo] [--label bug] [--limit 5] [--milestone v1.0] [--assignee @me] [--fork user/repo] [--watch] [--interval 5] [--reviews-only] [--cron] [--dry-run] [--model glm-5] [--notify-channel -1002381931352]
himalaya
346.8kCLI to manage emails via IMAP/SMTP. Use `himalaya` to list, read, write, reply, forward, search, and organize emails from the terminal. Supports multiple accounts and message composition with MML (MIME Meta Language).
node-connect
346.8kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
oracle
346.8kBest practices for using the oracle CLI (prompt + file bundling, engines, sessions, and file attachment patterns).
