Rapido is the virtual funds transfer app built using Microservices architecture, written in .NET 8.0.
Each service is an independent web application with its custom architecture, and the overall integration between the services is mostly based on the message-driven approach with local contracts.
Depending on the service complexity, different architectural styles are being used, including simple CRUD approach, along with CQRS, Clean Architecture and Domain-Driven Design.
The database is being used is PostgreSQL & EntityFrameworkCore as ORM, moreover application uses Redis as a cache and Vault for storing application secrets.
Disclaimer: This is NOT a commercial project.
Technologies used in the project:
- .NET 8
- ASP.NET Core
- EntityFramework Core
- Docker
- PostgreSQL
- Redis
- RabbitMQ
- Consul
- Jaeger
- Vault
- Terraform
- Seq
- MassTransit
- YARP
- Testcontainers
And more...
At the beginning, the project wasn't intended to be anything serious. I just wanted to learn the basics of microservices, not build a whole application. In the future, I will consider properly separating the microservices into their own repositories.
An API Gateway acts as a single entry point for clients to access microservices in a system. It routes requests to the appropriate microservices using YARP as revese proxy.
Autonomous applications with the different set of responsibilities, decoupled from each other - there's reference between the services and shared packages, and the synchronous communication & asynchronous integration (via messages) is based on local contracts approach.
Currencies - fetching & transforming currency exchange rates from third-party API
Customers - managing the customers (create, verify, lock).
Users - managing the users/identity (register, login, permissions etc.).
Wallets - managing the wallets and owners, responsible for fund transfers(transfer, add, deduct (funds))
Payments - managing the deposits and withdrawals from account.
Notifications - sending notifications via email (transfer confirmation, account verification, password recovery etc).
Simple Saga pattern implementation for transactional handling the business processes spanning across the distinct services.
The set of shared components for the common abstractions & cross-cutting concerns. In order to achieve even better decoupling and decentralization, it's split into the separate projects.
There is web UI written in Blazor. Both projects are still actively developed.
Clone repo using git.
git clone https://github.com/str4n/Rapido.git
Open compose/terraform/seed.tf
file and replace external api key.
apiKeys = {
external = [
{
serviceName = "exchangeRate"
key = "secret" <-- Replace this key!
}
]
...
To start your infrastructure, use Docker to run the docker-compose file.
docker-compose -f compose\infrastructure.yml up -d
It will prepare the required infrastructure. Then, you can start the services independently of each other via dotnet run
or use docker-compose
to start whole application.
To run whole application use docker-compose again.
docker-compose -f compose\services.yml up -d