ardalis / modulith

Modulith is a dotnet new template for Modular Monoliths. It streamlines the creation of new .Net solutions and the addition of modules to existing ones.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Brainstorm `item` templates useful once the solutions and projects have been created

david-acm opened this issue · comments

I'd like to be able to quickly add a new entity with associated CRUD endpoints

So, the template would add:

  • A new class, Country
  • A new DTO CountryDTO
  • (optional) If using Use Cases/Handlers, add commands/handlers for Create/Get/List/Update/Delete handlers
  • Add endpoints for Create/Get/List/Update/Delete
    • with appropriate Request and Response types

See: https://github.com/ardalis/CleanArchitecture/tree/main/src/Clean.Architecture.Web/Contributors

Command might look like this:
dotnet new modulith --add ddd-entity-with-endpoints --with-name Country --to Project
(either specify project if at solution level or be in the project folder and it will drop in there)

Would be good to have options for:

  • Clean Architecture structure (Core, UseCases, Web projects or folders)
  • Vertical Slice Architecture approach
  • Maybe a just dump it all in the current folder approach?

Would be good for my CA template to have an add entity option like this as well.