GenerateVerticalSliceArchitecture 2.1.3

dotnet tool install --global GenerateVerticalSliceArchitecture --version 2.1.3
                    
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 GenerateVerticalSliceArchitecture --version 2.1.3
                    
This package contains a .NET tool you can call from the shell/command line.
#tool dotnet:?package=GenerateVerticalSliceArchitecture&version=2.1.3
                    
nuke :add-package GenerateVerticalSliceArchitecture --version 2.1.3
                    

.NET Publish to NuGet

🧠 Ferramenta CLI Generate Vertical Slice Architecture

Generate Vertical Slice Architecture é uma biblioteca leve e moderna que cria estrutura a Feature da arquitetura Vertical Slice.


🚀 Por que Generate Vertical Slice Architecture?

  • ✅ Utilizamos a biblioteca MinDiator como dependência
  • 🧱 Pensado para CQRS – separa Endpoints, Commands e Queries
  • 🧩 Ideal para Vertical Slice Architecture – organização de features por funcionalidade
  • 🧰 Fácil de executar

📦 Instalação Global

dotnet tool install --global GenerateVerticalSliceArchitecture --version 1.0.0

📦 Instalação Local

dotnet tool install --local GenerateVerticalSliceArchitecture --version 1.0.0

1. Navegue até a pasta que tem o csproject:

exemplo:
cd c:\..\..\WebApi

2. Execure o comando

Como usar:

gvsa MeuVerticalSliceArchitecture

2. Exemplo simples

public record struct  MeuVerticalSliceArchitectureCommand(string props) : IRequest<Guid>;


public class MeuVerticalSliceArchitectureCommandHandler : IRequestHandler<MeuVerticalSliceArchitectureCommand, Guid>
{
    public async Task<Guid> Handle(MeuVerticalSliceArchitectureCommand request, CancellationToken cancellationToken = default)
    {
        throw;
    }
}

📁 Exemplo de organização com Vertical Slice

Features/
└── Usuarios/
    ├── Commands/
    │   ├── CreateUsuarioCommandHandler.cs
    │   ├── UpdateUsuarioCommandHandler.cs
    │   └── DeleteUsuarioCommandHandler.cs
    ├── Endpoints/
    │   ├── UsuarioEndpoint.cs
    └── Queries/
        ├── GetUsuarioByIdQuery.cs
        ├── GetUsuarioListQuery.cs

✅ Roadmap

  • Criação do VSA generica no ASP.NET Core
  • Criação do VSA com FluentResult no ASP.NET Core
  • Criação do VSA com FluentResult com EF
    • Criar context
    • Criar repository
    • Injetar repository no handler
  • Criação do VSA com FluentResult com Dapper
    • Criar context
    • Criar repository
    • Injetar repository no handler

🤝 Contribuições

Pull requests são super bem-vindos. Se quiser contribuir com uma ideia, melhoria ou bugfix, fique à vontade para abrir uma issue ou PR.


📄 Licença

MIT © danielfmpc

Product Compatible and additional computed target framework versions.
.NET net9.0 is compatible.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 was computed.  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
2.1.3 177 5/30/2025
2.1.2 206 5/29/2025
2.1.1 204 5/29/2025
2.1.0 200 5/27/2025
2.0.8 201 5/26/2025
2.0.7 209 5/26/2025
2.0.6 207 5/26/2025
2.0.5 204 5/26/2025
2.0.3 200 5/26/2025
2.0.2 208 5/26/2025
2.0.1 202 5/26/2025
2.0.0 197 5/26/2025
1.0.0 135 5/24/2025