Skip to content

jordiaragonzaragoza/JordiAragon.SharedKernel

Repository files navigation

What is the SharedKernel Project?

The goal of this project is create the building blocks to follow DDD principles and Clean Architecture in .NET

Nugets ready to use:

  • JordiAragon.SharedKernel - NuGet JordiAragon.SharedKernel.Contracts - NuGet
  • JordiAragon.SharedKernel.Domain - NuGet JordiAragon.SharedKernel.Domain.Contracts - NuGet
  • JordiAragon.SharedKernel.Application - NuGet JordiAragon.SharedKernel.Application.Contracts - NuGet JordiAragon.SharedKernel.Application.Contracts.IntegrationMessages - NuGet
  • JordiAragon.SharedKernel.Infrastructure - NuGet JordiAragon.SharedKernel.Infrastructure.EntityFramework - NuGet
  • JordiAragon.SharedKernel.Presentation.HttpRestfulApi - NuGet JordiAragon.SharedKernel.Presentation.HttpRestfulApi.Contracts - NuGet

Dependency graph:

JordiAragon.SharedKernel - Dependency graph

How to debug:

  • You will need the latest Visual Studio 2022 and the latest .NET Core SDK (at least .NET 7 SDK)
  • All the projects library are contained in JordiAragon.SharedKernel.sln solution file.

Used libraries:

  • MediatR
  • AutoMapper
  • Autofac
  • MassTransit
  • FastEndpoints
  • Ardalis.Result
  • Ardalis.Specification
  • Ardalis.SmartEnums
  • Ardalis.GuardClauses
  • FluentValidator
  • Serilog
  • Quartz
  • Refit
  • EasyCaching
  • Volo.Abp.Guids Generator
  • StyleCop & SonarAnalyzer

Brief explanation per project (Pending to complete)

SharedKernel and Contracts

  • Dependency Injection. Allow auto register services using markup interfaces.

Domain and Contracts

  • Common contracts and base implementations to flow DDD principles like: DomainEvents, ApplicationEvents, ValueObjects, Entities, Repository, BusinessRulesValidations and other DDD building blocks.

Application and Contracts

  • Application common contracts and base implementation for EventBus, UnitOfWork and CQRS...
  • Common MediatR pipelines implementation
  • IntegrationMessages contacts and base implementation to be used in EventBus
  • Common EventBus implementation using MassTransit

Infrastructure and Contracts

  • EntityFramework base implementation to allow auditing and outbox to dispatch domain events notifications.
  • BaseCachedRepository is done using ICacheService abstraction.
  • MassTransitEventBus base implementation.

Presentation and Contracts

  • HttpRestfulApi building blocks. Like BaseApiController, ExceptionMiddleware, CurrentUserService and ResponseBuilder for ProblemDetails.

Testing

  • GitHub workflow CI with SonarCloud integration SonarCloud

Resources and Inspiration

Special thanks to all these authors for sharing their knowledge and expertise:

About:

The SharedKernel Project was developed by Jordi Aragón Zaragoza

License:

Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License.

Creative Commons License

About

The goal of this project is create the building blocks to follow DDD principles and Clean Architecture in .NET 7.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages