NestJS-inspired scaffolding for Axum web applications. Quickly generate Modules, Controllers, Services, DTOs, Entities, and Middlewares with a clean, opinionated project structure.
Axumate is designed for developers who want to:
- Build scalable and well-structured Axum projects.
- Enforce opinionated conventions without reinventing the wheel.
- Get started with Axum faster, especially as a Rust beginner.
- Transition from NestJS to Rust while keeping a familiar development experience.
cargo install axumateaxumate new my_projectThis generates a minimal Axum project and installs the required dependencies.
cd my_project
axumate generate module heroThis scaffolds the following structure:
src/
├── hero/
│ ├── dto/
│ │ └── hero_dto.rs
│ ├── entity/
│ │ └── hero_entity.rs
│ ├── hero_controller.rs
│ ├── hero_service.rs
│ └── mod.rs
├── lib.rs
└── main.rs
cargo runThen visit: http://127.0.0.1:3000/hero
In addition to modules, you can generate controllers, services, DTOs, entities, and middlewares individually.
For example, to generate a middleware:
axumate generate middleware loggerOther supported generators:
axumate generate controller <name>axumate generate service <name>axumate generate dto <name>axumate generate entity <name>
Axumate enforces a modular, NestJS-inspired layout, where each feature lives in its own directory. This helps keep large projects organized and maintainable:
- Modules: Group related controllers, services, DTOs, and entities.
- Controllers: Define routes and handle HTTP requests.
- Services: Encapsulate business logic.
- DTOs: Represent input/output data contracts.
- Entities: Define database models or core domain types.
- Middlewares: Handle cross-cutting concerns (e.g., logging, authentication).
This structure grows naturally as your project scales, without losing clarity.
- Help me in improving project. contribute by opening issues — feedback is welcome!
License: MIT