Skip to content

alexBonadei/BrewUpApiTemplate

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

40 Commits
 
 
 
 
 
 
 
 

Repository files navigation

BrewUpApiTemplate

A clean template for MinimalApi DDD Oriented

You can find more details about this template here You can find examples about solution developed with this template here

You can find instructions to configure custom templates in VisualStudio here

What's inside this repository?

This repository holds the basic configuration to start a new microservice using .Net 6.

The microservice is already prepared to serve APIs through a web server and expose its OpenAPI Specification generated from the modules you define. It also provides an out-of-the-box implementation status routes for an easier Kubernetes probes integration.

How do I use it?

The repository provides a Visual Studio solution to import your code directly in your preferred IDE and start developing; you can also use the dotnet command line to run tests, builds, etc.

To create your build simply run

cd src/BrewUpApiTemplate
dotnet restore
dotnet build BrewUpApiTemplate.csproj

To add new module you can create a new class that implements IModule interface. The aim to use Module is to create a solution organized by BoundedContext, so DomainOriented, instead organized by Controller. You can add more projects to your solution, at least one for every Module (BoundedContext) you are going to develop.

How to implement new modules?

See BrewUp module to create new module, it creates a simple module with one /brewup API that you can invoke to obtain a nice Hello World message. Try providing a Name in your request to see how it affects the API response! The aim of BrewUp Module is to help you to introduce Validation, Isolation (you can move endpoint's handle of every module in a custom project). You have to create your module, set IsEnabled to true, and dotnet load it for you automatically. You need to hide/disable a module? Joust put IsEnabled = false.

About

A clean template for MinimalApi

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C# 94.6%
  • Dockerfile 5.4%