SkillAgentSearch skills...

Rustapi

šŸš€ RESTful Rust API Template / Boilerplate

Install / Use

/learn @ndelvalle/Rustapi
About this skill

Quality Score

0/100

Supported Platforms

Universal

README

rustapi

Tests

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

View on GitHub
GitHub Stars540
CategoryDevelopment
Updated1mo ago
Forks65

Languages

Rust

Security Score

85/100

Audited on Feb 23, 2026

No findings