Wiring every service by hand at boot.
Modules & DI
- Modules own their providers
- Request-scoped container
- Explicit imports and exports
NestForge brings Nest-style structure to Axum: modules, dependency injection, guards, and interceptors built in. These docs cover building on it, and building it.
cargo install nestforge-cli// What NestForge Solves
Wiring every service by hand at boot.
Auth checks scattered across every handler.
API docs that rot behind the code.
A new database, a new mess of glue.
REST today, gRPC tomorrow, rewrite everything.
Untested glue holding it all together.
// The Mental Model
The #[module] attribute tells the injector everything it needs. Nothing is wired by hand, nothing is hidden.
imports
Pull in providers exported by other modules.
controllers
Route handlers instantiated with the module.
providers
Services built by the injector, shared in scope.
exports
The subset other modules may use.
// Documentation
// FAQ
Can't find what you're looking for? Open an issue. The framework is developed in the open.
Ask on GitHubStructure scales. Nest proved that opinionated architecture, with modules, dependency injection, and guards, removes a whole class of decisions. NestForge brings that structure to Axum without the runtime cost of a JavaScript framework.
Macros are the surface. Underneath there is a real dependency injector, a request-scoped container, and a guard and interceptor pipeline that Axum alone does not give you.
Yes. Every handler is an Axum handler. You can mount raw routes beside NestForge modules and migrate one feature at a time.
A complete feature module: DTOs, service, controller, tests, and OpenAPI registration, wired into your workspace and ready to run.
Data layer modules wrap SQL, Mongo, and Redis behind the same provider interface, so swapping a store does not ripple through your services.