back end solution architecture - hades200082/template-app-infrastructure GitHub Wiki
This is a RESTful API. RESTful principles should be followed when adding new resources & routes to this API.
As a rule, the API should have no connection to or knowledge of the AMQP service. There may be exceptions to this rule but they must be carefully discussed and considered.
This is a .Net worker service that will act as the consumer & worker handling incoming commands or events from the AMQP service.
It will also have handle the Cosmos DB change feed and send commands or publish events into the AMQP service as required.
This layer contains Class Library projects relating to the setup, configuration and usage of 3rd party packages and services. See Infrastructure
Contains interfaces and abstract classes that can be used for dependency injection as well as implemented or inherited in other projects and allows other projects to require only the abstractions and not care about the implementations.
All commands, queries and notification models relating to the application along with their handlers where appropriate. Notification Handlers should be placed in the assembly that needs to handle the notification rather than in here.
Simple DTOs for the application layer.
The solution uses the Riok.Mapperly package to manage automatic mapping from one object to another using .Net Code Generation.
This class library defines the Mapperly mapper definitions for Entity > Application DTO mappings.
This is a .Net Standard 2.0 Class Library project. .Net Standard was specifically chosen for its compatibility with the Net Framework 4.6.1 and up since we don't know what version of .Net the integrating 3rd parties might be using.
The idea of this project is that it may be deployed as a stand-alone nuget package so that 3rd parties that we are integrating with via the AMQP services can simply install the package and use exactly the same models as us.
Only POCO models should be located in this class library project. No logic!
Contains interfaces and abstract classes that can be used for dependency injection or implemented/inherited in other projects and allows other projects to require only the abstractions and not care about the implementations.
Home of the data entities we will use.