Skip to content

About

Web service for publishing orders to alteration of suits

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

59 Commits

Folders and files

Repository files navigation

Suit Alterations

ASP.NET Core Blazor App with CQRS implementation and DDD using Clean Architecture

App architecture is designed in accordance with the Clean Architecture where we have the next layers, see below diagram:

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.

Screenshot of SPA Home page

Getting Started (for developers)

Prerequisites

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.

Running web app on Docker

Follow below instructions:

  1. Make sure that you filled the required app settings (Look into the appsettings.json file)

  2. Navigate to ./src folder

  3. 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

  4. Run the docker run --rm -it --name suitalterations -p 5555:80 suitalterations:latest command

  5. Open the URL http://localhost:5555/ in your browser.

Technologies & Frameworks

  • 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

Patterns & Design Approaches

  • 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 BaseValueIdType as 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 (_suitAlterations collection is a shadow property in Customer entity model or CustomerIdin 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)

About

Web service for publishing orders to alteration of suits

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Used by

Contributors

Languages