axum-rust-template
Rust Axum API with Diesel ORM and DDD architecture.
When & Why to Use This Skill
This Claude skill provides a production-ready boilerplate for building high-performance web APIs using the Rust programming language. It integrates the Axum web framework with Diesel ORM and PostgreSQL, following Domain-Driven Design (DDD) principles to ensure a scalable, maintainable, and clean codebase architecture.
Use Cases
- Scenario 1: Rapidly bootstrapping a new microservice or backend project with a professional-grade Rust tech stack and pre-configured folder structure.
- Scenario 2: Implementing complex business logic within a structured environment that enforces separation of concerns through Domain-Driven Design (DDD).
- Scenario 3: Developing type-safe and reliable database layers using Diesel ORM with PostgreSQL for enterprise-level data consistency.
- Scenario 4: Learning or teaching best practices for Rust web development, including modular architecture and efficient dependency management.
| name | axum-rust-template |
|---|---|
| description | Rust Axum API with Diesel ORM and DDD architecture. |
Axum Rust API
A Rust Axum API with Diesel ORM and DDD architecture.
Tech Stack
- Framework: Axum
- Language: Rust
- ORM: Diesel
- Architecture: DDD
- Database: PostgreSQL
Prerequisites
- Rust toolchain installed
- PostgreSQL
Setup
1. Clone the Template
git clone --depth 1 https://github.com/Eng0AI/axum-rust-template.git .
If the directory is not empty:
git clone --depth 1 https://github.com/Eng0AI/axum-rust-template.git _temp_template
mv _temp_template/* _temp_template/.* . 2>/dev/null || true
rm -rf _temp_template
2. Remove Git History (Optional)
rm -rf .git
git init
3. Build Project
cargo build
4. Setup Database
Configure database and run Diesel migrations.
Development
cargo run