NetHexaGen 1.0.1

dotnet tool install --global NetHexaGen --version 1.0.1
                    
This package contains a .NET tool you can call from the shell/command line.
dotnet new tool-manifest
                    
if you are setting up this repo
dotnet tool install --local NetHexaGen --version 1.0.1
                    
This package contains a .NET tool you can call from the shell/command line.
#tool dotnet:?package=NetHexaGen&version=1.0.1
                    
nuke :add-package NetHexaGen --version 1.0.1
                    

💠 NetHexaGen

The Ultimate Enterprise-Grade Scaffolding Engine for .NET 10.

NetHexaGen is a code generation engine designed for architects and developers who want to create robust, scalable, and maintainable solutions based on Clean Architecture and Domain-Driven Design (DDD) principles.

.NET 10 Clean Architecture License: MIT


🚀 Why NetHexaGen?

Setting up an enterprise solution from scratch takes days. NetHexaGen does it in seconds, integrating the industry's most demanding standards by default:

  • Clean Architecture: 5 perfectly decoupled layers (Domain, Application, Infrastructure, Api, Tests).
  • Interactive CLI: Visual menu to choose between Controllers vs Minimal APIs and DB providers (SQL Server, PostgreSQL, SQLite).
  • Security First: Out-of-the-box configuration for JWT Bearer and CORS policies.
  • Architecture Guard: Automated architectural tests with NetArchTest.
  • Modern UI: API documentation with Scalar (the evolution of Swagger).

🛠️ Installation

Currently, you can run it directly from the source code or compile it as a global tool:

# Clone and build
dotnet build NetHexaGen.csproj

📖 Quick Commands

1. Create a New Solution

Starts an interactive wizard to configure your project:

nethexagen new MyVortexProject

It will ask you for the API style and the database provider of your choice.

2. Add a Resource (CRUD)

Generates the entire technology stack for a new entity:

nethexagen add User

Generates: Entity, Commands, Handlers, and Controller/Endpoint automatically.

🗄️ Database Migrations

Generated projects are ready for Entity Framework Core. To apply migrations:

dotnet ef database update --project YourProject.Infrastructure --startup-project YourProject.Api

🏛️ SOLID Principles Implementation

NetHexaGen is built from the ground up to enforce SOLID principles:

  • S - Single Responsibility: Each layer and class has a single, well-defined purpose.
  • O - Open/Closed: New features can be added via MediatR handlers without modifying existing core logic.
  • L - Liskov Substitution: Use of generic abstractions ensures consistent behavior across implementations.
  • I - Interface Segregation: Small, focused interfaces (e.g., ICommand, IRepository) prevent bloated dependencies.
  • D - Dependency Inversion: High-level modules (Domain/Application) are completely independent of low-level implementation details (Infrastructure/Api).

🏗️ The Anatomy of a NetHexaGen Project

  1. Domain: The core of the business. DDD primitives, Result Pattern, and pure Entities.
  2. Application: Use cases with MediatR, Validations with FluentValidation, and Mappings with Mapster.
  3. Infrastructure: Persistence with EF Core, Repository Pattern, and Unit of Work.
  4. Api: Scalar documentation, Versioning, Health Checks, and JWT Security.
  5. ArchitectureTests: The guardian that ensures layer dependency rules are never violated.

💎 Included Features

Feature Technology
Architecture Clean Architecture, CQRS, DDD
Logging Serilog (File & Console)
Validation FluentValidation (Automatic Pipeline)
Mapping Mapster
Documentation Scalar (OpenAPI 3.0)
Health Checks Health Checks (DB & App)
Containers Docker (Multi-stage)
Consistency .editorconfig

🤝 Contributing

Have an idea for a new template or an architectural improvement? Pull Requests are welcome!

Developed by rbaezc. Licensed to Vortex Solutions.

Product Compatible and additional computed target framework versions.
.NET net10.0 is compatible.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

This package has no dependencies.

Version Downloads Last Updated
1.0.1 98 4/27/2026
1.0.0 60 4/27/2026