This repository describes my idea of a microservice in C#. It is using different concept, which I used while working with C# in the last year. I tried to find different sources describing the ideas I had and put the best description together.
The main architectural idea is to use the Clean Architecture.
In my implementation I used following concepts:
- All data gets convert to domain object in the most outer layer.
All other layer are working with the domain object. With this you have a clear understanding, which object is to use when.
And no implementation details are leaking out of the API.
- Infrastructure layer
- Rest layer
- Result Object instead of exceptions
- MediatR to create clear and simple single responsibility actions
- AutoMapper to map between domain objects and data objects
- B2C Authentication to authenticate users
- Input Valudation, validate user input on handler pipeline (to be implemented)
- Logging with Serilog to a centralized logging system
For me it was important, to create an Application, which has a working integration testing. With it, we can practice TDD and have a good test coverage. Additional to integration testing, some unit tests are also implemented. To further bulster the confidence in the code.
- Integration Testing
- Testing Authentication and Authorization
- Mapper Testing
- Predicate Testing
- Load Teseting/System Testing //todo write and add k6 script
- add docker file with test-runner and explain how to use it