Skip to content

Axumate: NestJS-inspired scaffolding for Rust web apps. Quickly generate Modules, Controllers, Services, DTOs, Entities, and Middlewares with an organized module structure.

License

Notifications You must be signed in to change notification settings

mohammad79sss/axumate

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Axumate

NestJS-inspired scaffolding for Axum web applications. Quickly generate Modules, Controllers, Services, DTOs, Entities, and Middlewares with a clean, opinionated project structure.

Crates.io License


Who is this for?

Axumate is designed for developers who want to:

  1. Build scalable and well-structured Axum projects.
  2. Enforce opinionated conventions without reinventing the wheel.
  3. Get started with Axum faster, especially as a Rust beginner.
  4. Transition from NestJS to Rust while keeping a familiar development experience.

📦 Getting Started with the CLI

1️⃣ Install the CLI

cargo install axumate

2️⃣ Create a new project

axumate new my_project

This generates a minimal Axum project and installs the required dependencies.

3️⃣ Generate a module

cd my_project
axumate generate module hero

This 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

4️⃣ Run the project

cargo run

Then visit: http://127.0.0.1:3000/hero


Generate Other Components

In addition to modules, you can generate controllers, services, DTOs, entities, and middlewares individually.

For example, to generate a middleware:

axumate generate middleware logger

Other supported generators:

  • axumate generate controller <name>
  • axumate generate service <name>
  • axumate generate dto <name>
  • axumate generate entity <name>

Project Structure Philosophy

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.


Contribute

  • Help me in improving project. contribute by opening issues — feedback is welcome!

License: MIT

About

Axumate: NestJS-inspired scaffolding for Rust web apps. Quickly generate Modules, Controllers, Services, DTOs, Entities, and Middlewares with an organized module structure.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages