nestforge-data 1.1.0

Multi-backend data abstractions for NestForge
Documentation
  • Coverage
  • 0%
    0 out of 18 items documented0 out of 11 items with examples
  • Size
  • Source code size: 9.03 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 1.98 MB This is the summed size of all files generated by rustdoc for all configured targets
  • Ø build duration
  • this release: 19s Average build duration of successful builds.
  • all releases: 18s Average build duration of successful builds in releases after 2024-10-23.
  • Links
  • Homepage
  • vernonthedev/nestforge
    3 0 0
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • vernonthedev

███╗   ██╗███████╗███████╗████████╗███████╗ ██████╗ ██████╗  ██████╗ ███████╗
████╗  ██║██╔════╝██╔════╝╚══██╔══╝██╔════╝██╔═══██╗██╔══██╗██╔════╝ ██╔════╝
██╔██╗ ██║█████╗  ███████╗   ██║   █████╗  ██║   ██║██████╔╝██║  ███╗█████╗
██║╚██╗██║██╔══╝  ╚════██║   ██║   ██╔══╝  ██║   ██║██╔══██╗██║   ██║██╔══╝
██║ ╚████║███████╗███████║   ██║   ██║     ╚██████╔╝██║  ██║╚██████╔╝███████╗
╚═╝  ╚═══╝╚══════╝╚══════╝   ╚═╝   ╚═╝      ╚═════╝ ╚═╝  ╚═╝ ╚═════╝ ╚══════╝

NestForge

NestForge is a high-performance backend framework designed for developers who crave the modularity and Dependency Injection (DI) of NestJS but want the memory safety and blazing speed of the Rust ecosystem.

[!IMPORTANT] Stable Release NestForge 1.0.0 is now published on crates.io.

What You Get

  • Module system with imports and exports
  • Dependency Injection with simple provider registration
  • Controller macros (#[controller], #[routes], #[get], #[post], #[put], #[delete])
  • Request extractors (Inject<T>, Param<T>, Body<T>, ValidatedBody<T>)
  • Built-in HTTP error type (HttpException)
  • Guard and interceptor pipeline (global + route-level)
  • Route versioning (#[nestforge::version("1")])
  • Global prefix support (.with_global_prefix("api"))
  • Config module with env loading and schema validation
  • Data layer crates (nestforge-db, nestforge-orm, nestforge-data)
  • CLI for scaffolding, generators, DB migrations, docs skeleton, formatting

Workspace Layout

  • crates/nestforge: public crate users import
  • crates/nestforge-core: DI, module graph, route builder, validation, resource service
  • crates/nestforge-http: app bootstrap factory
  • crates/nestforge-macros: framework macros
  • crates/nestforge-cli: nestforge CLI binary
  • crates/nestforge-config: env/config loading and validation
  • crates/nestforge-db: DB wrapper and migrations support
  • crates/nestforge-orm: relational ORM abstraction layer
  • crates/nestforge-data: non-relational data abstractions
  • examples/hello-nestforge: full example app

Quick Start (Repo)

git clone https://github.com/vernonthedev/nestforge.git
cd nestforge
cargo check --workspace
cargo run -p hello-nestforge

Server runs on:

http://127.0.0.1:3000

Quick Start (CLI)

Install locally from this workspace:

cargo install --path crates/nestforge-cli

Create an app:

nestforge new demo-api
cd demo-api
cargo run

Generate code:

nestforge g module users
nestforge g resource users --module users
nestforge g guard auth
nestforge g interceptor logging

DB commands:

nestforge db init
nestforge db generate create_users_table
nestforge db migrate
nestforge db status

Utilities:

nestforge docs
nestforge fmt

Minimal App Bootstrap

use nestforge::NestForgeFactory;

NestForgeFactory::<AppModule>::create()?
    .with_global_prefix("api")
    .use_guard::<AllowAllGuard>()
    .use_interceptor::<LoggingInterceptor>()
    .listen(3000)
    .await?;

Example App Features

examples/hello-nestforge demonstrates:

  • Root controllers (AppController, HealthController) at app root
  • Feature modules (users, settings, versioning) in Nest-style folders
  • CRUD controllers + services with ResourceService<T>
  • Validation via ValidatedBody<T>
  • Guard/interceptor usage at route level
  • Config loading with ConfigModule::for_root
  • Versioned routes (v1, v2)

Documentation

Contributing

See CONTRIBUTING.md.

License

Apache-2.0 (LICENSE).