MangoPay - Event-Driven Microservices Banking Platform
October 3, 2025 • 3 min read
Table of Contents
MangoPay - Event-Driven Microservices Banking Platform
MangoPay is an open-source, event-driven microservices platform built with .NET 8, designed to simulate realistic banking workflows such as wallet creation, transactions, and notifications.
It’s a hands-on exploration of distributed systems, message-driven design, and Clean Architecture, allowing experimentation with asynchronous workflows, service boundaries, and operational challenges, all in a controlled, local environment.
Vision
The goal behind MangoPay was to create a realistic yet approachable banking simulation. It’s complex enough to teach real-world distributed system challenges, including data consistency, event orchestration, and bounded contexts, yet still manageable for solo development and learning.
Architecture & Design
MangoPay is composed of independent microservices, each owning its own data and business logic. Services communicate exclusively through RabbitMQ using a publish/subscribe model, achieving eventual consistency and resilient asynchronous workflows.
Key services include:
Authentication & User Management: Handles user registration, JWT-based authentication, and profile data.
Wallet Service: Manages wallet creation, ownership, and real-time balance updates.
Transaction Service: Processes deposits, withdrawals, and transfers while publishing events for downstream services.
Verification Service: Simulates KYC and identity checks.
Notification Service: Sends simulated emails for registration, verification, and transactions.
API Gateway: Provides a unified entry point for all services with routing, aggregation, and rate limiting.
Each service follows Clean Architecture principles, with isolated layers for domain logic, application services, infrastructure, and API exposure.
Event Flow Example
When a deposit is made, the Transaction Service publishes a FundsDeposited event. The Wallet Service listens for this event and updates the user’s balance, while the Notification Service sends a confirmation email, all asynchronously and idempotently. This demonstrates event-driven choreography and eventual consistency in practice.
Technical Highlights
Event-driven messaging via RabbitMQ.
Per-service PostgreSQL databases for autonomy and data isolation.
Redis caching for performance and deduplication.
Observability with Prometheus, Grafana, and cAdvisor.
Infrastructure automation using Docker, Terraform, and LocalStack.
Continuous Integration through GitHub Actions.
Development Focus & Lessons Learned
MangoPay was an experiment in designing distributed systems with clarity, reliability, and operational awareness. Key lessons include:
Architecture is about boundaries and contracts, not just technology choices.
Clean code matters even across multiple independent systems.
Designing for failure and recovery is as important as designing for success.
Observability, metrics, and event logs are crucial for debugging distributed workflows.
Starting small and prioritizing clarity over complexity produces more sustainable systems.
Future Directions
Potential evolutions for MangoPay:
Implementing Saga and Outbox patterns for distributed transaction management.
Exploring CQRS and event sourcing for advanced state handling.
Horizontal scaling, fault injection testing, and resilience experiments.
Real-time dashboards to monitor financial flows and service health.
Reflection
MangoPay is a deep dive into distributed system design and operational thinking. It represents my journey to understand how complex systems communicate, remain consistent, and survive real-world conditions.
Through MangoPay, I learned to value simplicity, clear boundaries, and architecture as a form of communication, not just between services, but between engineers building them.