How alperenkucukali/dotnet-microservices works
Project Type & Purpose
• This is a .NET 8 sample Distributed Bank using a microservices architecture.
• It demonstrates DDD, CQRS, MediatR, FluentValidation, AutoMapper, gRPC, event‐driven communication (RabbitMQ/MassTransit), API gateway (Ocelot), containerization (Docker), centralized logging (ELK), health checks, resilience (Polly), and multiple databases (PostgreSQL, MongoDB).
High‐Level Components (from file tree & README)
• API Gateway: OcelotApiGateway
• Microservices (each following Clean Architecture & DDD)
• Customer
· REST API (Customer.API)
· gRPC Server (Customer.GRPC)
· PostgreSQL (via EF Core)
• Account
· REST API (Account.API)
· Consumes Customer gRPC
· Publishes transaction events to RabbitMQ
· PostgreSQL (via EF Core)
• Transaction
· REST API (Transaction.API)
· Consumes RabbitMQ events
· MongoDB
• WebStatus: ASP.NET MVC status‐page UI
• Shared Building Blocks: Common.Logging (SeriLogger), EventBus.Messages (integration contracts)
• Infrastructure & Support
• RabbitMQ (MassTransit)
• PostgreSQL, MongoDB
• ELK Stack (Elasticsearch, Logstash, Kibana)
• Portainer, pgAdmin
• Docker Compose setup
Architectural Patterns & Interactions
• API Gateway routes external HTTP clients to service REST endpoints.
• Customer gRPC Server offers strongly-typed inter-service calls; consumed by Account API.
• Account publishes IntegrationBaseEvent messages to a RabbitMQ exchange; Transaction API hosts a MassTransit consumer.
• Each microservice implements CQRS via MediatR: Commands, Queries, Behaviours, Validators.
• Data stores are isolated per service (PostgreSQL for Customer/Account; MongoDB for Transaction).
• Centralized logging streams to ELK; health checks expose readiness.
• Resilience on outbound HTTP calls via IHttpClientFactory + Polly (retry, circuit breaker).
Final Checklist
– [ ] All major components labeled
– [ ] Callouts for Clean Architecture layers and shared blocks
– [ ] Docker Compose orchestration overview
– [ ] Health checks and logging flows