Minimal REST API with Axum, PostgreSQL and modular architecture.
- Modular Architecture: Clean layers (Domain → Repository → Service → Controller)
- Type Safety: Compile-time architecture enforcement
- PostgreSQL: SQLx with migrations and query validation
- OpenAPI: Auto-generated documentation
- Testing: Isolated test schemas
📖 Architecture details: ARCHITECTURE.md
make db # Setup database
make dev # Start server with hot reloadServer: http://127.0.0.1:3000 | Docs: /swagger-ui
make dev- Development servermake db- Database setup (idempotent)make test- Run testsmake check- Format, lint, test
SQLx with compile-time checking. Always commit .sqlx/ directory.
sqlx migrate add new_table # Create migration
make db # Apply migrations + update cachePOST /users- Create userGET /users- List usersGET /users/{id}- Get userPUT /users/{id}- Update userDELETE /users/{id}- Delete user
GET /health- Complete health check (application + database)GET /ready- Readiness probe (Kubernetes-compatible)GET /live- Liveness probe (application only)
- Rust
- Docker
- SQLx CLI:
cargo install sqlx-cli --no-default-features --features postgres - cargo-watch:
cargo install cargo-watch(for development server)
MIT