Skip to content

maxxentropy/ImmutableLedger

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Solution: ImmutableLedger

  1. ImmutableLedger.Domain Project Type: Class Library (.NET Core) Purpose: Contains enterprise-wide logic and types Dependencies: None

  2. ImmutableLedger.Application Project Type: Class Library (.NET Core) Purpose: Contains business logic and types Dependencies:

    • ImmutableLedger.Domain
  3. ImmutableLedger.Infrastructure Project Type: Class Library (.NET Core) Purpose: Contains all external concerns Dependencies:

    • ImmutableLedger.Domain
    • ImmutableLedger.Application
  4. ImmutableLedger.Service (or ImmutableLedger.Api for web applications) Project Type: Worker Service (.NET Core) or ASP.NET Core Web API Purpose: Entry point of the application, composition root Dependencies:

    • ImmutableLedger.Domain
    • ImmutableLedger.Application
    • ImmutableLedger.Infrastructure
  5. ImmutableLedger.Domain.Tests Project Type: xUnit Test Project (.NET Core) Purpose: Unit tests for Domain layer Dependencies:

    • ImmutableLedger.Domain
  6. ImmutableLedger.Application.Tests Project Type: xUnit Test Project (.NET Core) Purpose: Unit tests for Application layer Dependencies:

    • ImmutableLedger.Domain
    • ImmutableLedger.Application
  7. ImmutableLedger.Infrastructure.Tests Project Type: xUnit Test Project (.NET Core) Purpose: Integration tests for Infrastructure layer Dependencies:

    • ImmutableLedger.Domain
    • ImmutableLedger.Application
    • ImmutableLedger.Infrastructure

Project Contents:

  1. ImmutableLedger.Domain

    • Entities (e.g., LedgerEntry.cs)
    • Value Objects
    • Enums
    • Exceptions
    • Interfaces (e.g., ILedgerRepository.cs)
  2. ImmutableLedger.Application

    • Interfaces (e.g., ILedgerService.cs, IMessageHandler.cs)
    • Services (e.g., LedgerService.cs, MessageHandler.cs)
    • DTOs (Data Transfer Objects)
    • Exceptions
  3. ImmutableLedger.Infrastructure

    • Data
      • Repositories (e.g., ShardedPostgreSqlLedgerRepository.cs)
      • Database Contexts
    • Sharding
      • AdaptiveShardingStrategy.cs
      • ShardManager.cs
    • Messaging
      • SqsClient.cs
    • External Services Integrations
  4. ImmutableLedger.Service

    • Program.cs (composition root, DI setup)
    • LedgerWorker.cs
    • appsettings.json

Dependency Flow: Domain <- Application <- Infrastructure <- Service

Key Principles:

  1. The Domain layer has no dependencies on other layers.
  2. The Application layer depends only on the Domain layer.
  3. The Infrastructure layer depends on both Domain and Application layers.
  4. The Service layer depends on all other layers and composes them.
  5. All dependencies point inwards, towards the Domain layer.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published