NexusLedger is a next-generation, high-performance payment ledger system designed for the fintech sector. Engineered for exactly-once processing and absolute data integrity, it leverages a distributed microservices architecture to handle high-throughput financial transactions with ease.
NexusLedger is built as a greenfield project showcasing modern software engineering patterns:
- Microservices Architecture: Decomposed into domain-centric services (Gateway, Settlement, Reconciliation).
- Event-Driven Choreography: Asynchronous communication via Apache Kafka ensures loose coupling and scalability.
- Data Integrity:
- Idempotency: Redis-backed barriers in the Payment Gateway prevent duplicate processing.
- Transactional Outbox: Guarantees atomic writes to the Ledger and message dispatching, eliminating "dual-write" issues.
- Resilience: Integrated Polly policies for circuit breaking and exponential backoff strategies.
- Observability: Full tracing with OpenTelemetry and Jaeger propagation across message boundaries.
- Orchestration: Fully orchestrated local development environment using .NET Aspire.
| Category | Technology |
|---|---|
| Core | .NET 9 / 10, C# |
| API | ASP.NET Core Web API |
| Orchestration | .NET Aspire |
| Message Broker | Confluent Kafka |
| Database | SQL Server (EF Core), Redis (Caching/Locks) |
| Observability | OpenTelemetry, Jaeger, Prometheus |
| Testing | xUnit, Pact.io (Contract Testing) |
| Containerization | Docker, Docker Compose |
- Payment Gateway API
- Role: Entry point for payment initiation.
- Features: Validates requests, enforces idempotency, and publishes
PaymentInitiatedevents.
- Settlement Service
- Role: The core ledger worker.
- Features: Consumes events, creates ledger entries using T-SQL/EF Core, and manages the Transactional Outbox.
- Reconciliation Worker
- Role: Financial health check.
- Features: Daily comparison of internal ledger state against external bank statements.
- .NET 9 SDK (or newer)
- Docker Desktop
- Aspire Workload
NexusLedger uses .NET Aspire to orchestrate the entire suite of services and infrastructure (Kafka, Redis, SQL Server) with a single command.
-
Clone the repository
git clone https://github.com/junaid109/Nexus-Ledger.git cd Nexus-Ledger -
Run with Aspire
dotnet run --project NexusLedger.AppHost
-
Explore the Dashboard The console output will provide a link to the Aspire Dashboard (typically
https://localhost:18888), where you can view logs, traces, and metrics for all running services.
Run unit and integration tests:
dotnet testThis project is licensed under the MIT License - see the LICENSE file for details.