Clean architecture template of a .NET 5 monolithic REST API using IdentityServer, Mediatr, EF Core and FluentValidation.
This implementation heavily relies on the awesome work of Jason Taylor, credits to him for a large part of this project !
- ASP.NET Core 5
- Swagger
- Entity Framework 5
- MediatR
- AutoMapper
- IdentityServer
- FluentValidation
- Docker (🏗 WiP)
- xUnit and xBehave (🏗 WiP)
This project is exposing a simple web API with JWT authentication and roles to manage users and very basic products.
Due to the simplicity of the examples provided out of the box, you can easily remove the logic that you don't need to build your own on the top of the existing mechanisms.
To start using this repository as a foundation for your API:
- Install the latest .NET 5 SDK
- Navigate to
Infrastructure/
and execute the scripttools/Install-ef.ps1
- Create your initial migration, from
Infrastructure/
by running the scripttools/Create-Migration.ps1
which will create your migration and apply it - Once you're set up, heads of to
WebApi/
and rundotnet run
to run the back-end. You will also see the logs displayed in the console
📑 Note: when running the program in the dev environment, the database used will be in-memory by default. You are free to change it by modifying the value of
"UseInMemoryDatabase"
inWebApi/appsettings.json
For an overview of the architecture, or a deep dive in it, please refer to the dedicated ARCHITECTURE.md
This projet is under the MIT License.
- This project heavily relies on the awesome work of Jason Taylor, credits to him for a large part of this project