App architecture is designed in accordance with the Clean Architecture where we have the next layers, see below diagram:
Website allows to salesrep to enter alterations of the customer's suit and then check the status of the further work. After that when the customer paid the order to alteration, then the POS terminal should post the OrderPaid notification to Azure Service Bus Topic. Once our Azure Subscription service client will process this OrderPaid message, salesrep will see the changed status for this order to alteration by incoming notification of this event.
Physical project structure is organised in accordance with MS .NET project structure
To build locally this web application you need to have installed Visual Studio Build Tools 2019 16.3 or later and the .NET Core 3.0+ SDK on your machine. If you want to open this project in development purposes, then you need to install any of these IDE - Visual Studio 2019 (for Mac) / Jetbrains Rider. You can deploy this web app in docker, all you need is to have installed Docker v2.1+ To process event messages from Azure Service Bus Topic, you need to have Azure Subscription with created Azure Service Bus resource to publish and receive messages. The Web App has two sections with the appsettings. The first one is ConnectionString to connect to your Database and the other one is AzureServiceBus with ConnectionString to the Service Bus namespace, and predefined Topic and Subscription names accordingly.
Follow below instructions:
-
Make sure that you filled the required app settings (Look into the
appsettings.jsonfile) -
Navigate to
./srcfolder -
Build the docker image by the following command:
docker build -t suitalterations .Make sure that command was successfully completed to start use your tagged docker image suitalterations:latest -
Run the
docker run --rm -it --name suitalterations -p 5555:80 suitalterations:latestcommand -
Open the URL http://localhost:5555/ in your browser.
- ASP.NET Core 3.0
- Blazor with WebAssembly support
- MediatR
- FluentValidation
- Autofac
- Automapper
- FluentAssertions
- EF Core & Code-First Approach
- Azure SQL server
- Azure Service Bus Topic and subscription
- Domain Driven Design approach & The Dependency Rule
- Clean Architecture (see details)
- CQRS (see details)
- SOLID principles
- Decorator (for the dispatching events)
- Domain Event (see details)
- Value Object (see details
- Shared Kernel (In our case we use common
BaseValueIdTypeas ValueObject type for domain models identities which should be immutable and globally unique like CustomerId, SuitAlterationId) - Aggregate (we have two clusters - Customer and SuitAlteration. See details)
- Seedwork (see details
- Mediator (reduce dependencies between objects)
- Unit of Work (see details)
- Shadow Properties (
_suitAlterationscollection is a shadow property in Customer entity model orCustomerIdin the SuitAlteration entity model. Shadow Properties allows us to decouple our entities from database schema. Thereby, we no need to include foreign keys in our Domain Model) - Event Sourcing - TBD, but not implemented yet (work in progress)

