How nika2811/fintech-solution works
High-Level Components
a) Client-Facing Layer:
• API Gateway (Ocelot)
• Swagger Documentation endpoints
b) Core Microservices:
• Identity Service
• Order Service
• Payment Processor Service
c) Infrastructure Components:
• RabbitMQ (Message Broker)
• PostgreSQL Databases (one per service)
• Consul (Service Discovery)
• Observability Stack:
• OTEL Collector
• Grafana
• Prometheus
• Loki
• Tempo
Component Relationships
a) External Communications:
• Client requests → API Gateway
• API Gateway → Individual Services
b) Inter-Service Communications:
• Order Service ↔ Identity Service (authentication)
• Order Service ↔ Payment Processor (payment processing)
• Services → RabbitMQ (event publishing)
• Services ← RabbitMQ (event consumption)
c) Data Layer:
• Each service → Its dedicated PostgreSQL database
Specific Implementation Details
Architectural patterns:
a) For Each Microservice:
• API Endpoints
• Services Layer
• Repository Layer
• Database Context
b) Cross-Cutting Concerns:
• Rate Limiting
• Error Handling Middleware
• Authentication/Authorization
• Observability Integration
Event Flow Patterns
Event-driven architecture:
• Payment Processing Events
• Order Status Updates
• Asynchronous Communication Paths
Specific Implementation Notes
Annotations for:
a) Identity Service:
• Company registration flow
• API credential management
• Authentication endpoints
b) Order Service:
• Order creation and validation
• Payment status handling
• Daily limit checking ($10,000)
c) Payment Processor:
• Payment routing logic
• External payment service integration
• Status update broadcasting
Infrastructure Details
a) Containerization:
• Docker containers for each service
• Docker Compose orchestration
b) Monitoring Stack:
• Metrics flow to Prometheus
• Logs to Loki
• Traces to Tempo
• Grafana dashboards