A lightweight, modular, and fully async REST API built with Rust, Axum, and SQLx.
This project demonstrates clean architecture, type‑safe database access, structured error handling, and idiomatic Rust patterns for building modern backend services.
- Axum‑based HTTP server with clean routing
- PostgreSQL database integration via SQLx (async + compile‑time checked queries)
- Layered architecture (routes → handlers → services → DB)
- Centralized error handling with custom
DBErrorenum - Environment‑based configuration using
.env - Hot‑reload support via
baconorcargo-watch - Fully async using Tokio runtime
- Rust (latest stable)
- Cargo
- PostgreSQL
- SQLx CLI (optional but recommended)
Install SQLx CLI:
cargo install sqlx-cli