Skip to content

A template for an API using a streamlined verison of Clean Architecture alongside .NET's Minimal APIs.

License

Notifications You must be signed in to change notification settings

larymao/CleanApi

Repository files navigation

CleanApi

Build codecov License: MIT Nuget

This is a template for an API using a streamlined verison of Clean Architecture alongside .NET's Minimal APIs.

Prerequisites

  • .NET 9 SDK - [required] This solution in built on it, you need to install it before building and running.

  • Docker - [optional] If you want to build the Dockerfile you will need to install it.

  • Docker-Compose - [optional] If you want to launch this solution quickly via the docker-compose.yml you will need to install it.

Installation

This is a .NET template and you can install it using the dotnet new cli. To install the lastest version of the template run the following command.

dotnet new install CleanApi.Solution.Template

To create a new solution using this template run one of the following commands

# new solution with git initialized
dotnet new cleanapi --allow-scripts yes --name {YOUR_SOLUTION_NAMESPACE}

# new solution without git
dotnet new cleanapi --git false --name {YOUR_SOLUTION_NAMESPACE}

And then you could modify contents of docker-compose.yml, src/Web/Dockerfile and src/Web/Configs/*.json to suit your own business. Things you may wanna to modify are as follows:

  • postgres configs in docker-compose.yml
  • postgres connection string in config files
  • dockerfile labels

To learn something more about creating new solution from this template, run the following command:

dotnet new cleanapi --help

Features

There are plenty of handy implementations of features throughout this solution, in no particular order here are some that might interest you.

About

A template for an API using a streamlined verison of Clean Architecture alongside .NET's Minimal APIs.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published