A comprehensive microservices-based banking solution built with .NET 9, featuring customer profile management, account services, API gateway, and gRPC communication.
This solution implements a modern microservices architecture with the following components:
- API Gateway - YARP-based reverse proxy for routing and load balancing
- Customer Profile Service - User authentication, onboarding, and biometric verification
- Account Services - Core banking account management and operations
- gRPC Contracts - Shared service contracts for inter-service communication
CoreBankingSoftware/
├── AccountServices/ # Account management microservice
├── CustomerProfile/ # Customer profile and authentication service
├── YarpApiGateWay/ # API Gateway with YARP
├── gRPC/Contracts/ # Shared gRPC contracts
└── Directory.Packages.props # Centralized package management
Technology: YARP (Yet Another Reverse Proxy)
Port: Default routing to Customer Service on port 5039
Features:
- Request routing and load balancing
- Service discovery and health checks
- Request/response transformation
- Rate limiting and security policies
Configuration:
- Routes
/customer/{**catch-all}to Customer Service cluster - Configurable destination addresses
Technology: ASP.NET Core 9, PostgreSQL, JWT Authentication
Port: 5039
Key Features:
- User Onboarding: Phone number and email-based registration
- Authentication: JWT token-based authentication system
- BVN Verification: Integration with QuickVerify for BVN validation
- Face Recognition: Biometric verification using FaceAiSharp
- SMS Integration: Twilio-based SMS notifications
- Document Processing: OCR capabilities with Tesseract
Technologies Used:
- Entity Framework Core with PostgreSQL
- Serilog for structured logging
- FluentValidation for input validation
- FaceAiSharp for biometric verification
- Twilio for SMS services
API Documentation: Scalar-based OpenAPI documentation
Technology: ASP.NET Core 9, SQL Server, gRPC
Key Features:
- Account Management: Create, retrieve, and manage bank accounts
- Account Types: Support for different account types (Savings, etc.)
- Account Status: Active, inactive, and closed account states
- Phone-based Accounts: 10-digit account numbers derived from phone numbers
- Balance Management: Account balance tracking and updates
Domain Model:
Accountentity with comprehensive account information- Account status and type enums
- Phone number to account number conversion
- Audit fields for tracking changes
Technologies Used:
- Entity Framework Core with SQL Server
- FluentValidation for business rules
- Swagger for API documentation
- gRPC for service communication
Technology: Protocol Buffers, gRPC
Services:
AccountGrpcApiService- Account management operationsCreateAccount- Create new bank accountsGetAccountById- Retrieve account by customer IDGetAccountByNumber- Retrieve account by phone number
Message Types:
- Account creation and retrieval requests/responses
- Error handling and success indicators
- Account status and balance information
- .NET 9 - Latest .NET framework
- ASP.NET Core - Web API framework
- Entity Framework Core - ORM for data access
- gRPC - High-performance RPC framework
- YARP - Reverse proxy for API Gateway
- PostgreSQL - Customer Profile Service
- SQL Server - Account Services
- JWT Bearer Tokens - Authentication
- ASP.NET Identity - User management
- Password Hashing - Secure password storage
- Twilio - SMS notifications
- QuickVerify - BVN verification
- FaceAiSharp - Biometric face recognition
- Serilog - Structured logging
- FluentValidation - Input validation
- Swagger/Scalar - API documentation
- Docker - Containerization support
- .NET 9 SDK
- PostgreSQL (for Customer Profile Service)
- Docker (optional, for containerized deployment)
-
Clone the repository
git clone <repository-url> cd CoreBankingSoftware
-
Restore packages
dotnet restore
-
Configure databases
- Update connection strings in
appsettings.jsonfiles - Run Entity Framework migrations
- Update connection strings in
-
Start services
# Start API Gateway cd YarpApiGateWay dotnet run # Start Customer Profile Service cd CustomerProfile/src/CustomerProfile.API dotnet run # Start Account Services cd AccountServices dotnet run
Each service includes Dockerfile for containerized deployment:
# Build and run with Docker Compose
docker-compose up --build- Base URL:
http://localhost:5039 - Documentation:
http://localhost:5039/scalar/v1(Development) - Authentication: JWT Bearer tokens required for protected endpoints
- Base URL:
http://localhost:5000(default) - Documentation:
http://localhost:5000/swagger(Development) - gRPC: Available for inter-service communication
- Base URL:
http://localhost:5000(default) - Routes:
/customer/*→ Customer Profile Service
- Database connection strings
- JWT secret keys
- External service API keys (Twilio, QuickVerify)
- Service discovery endpoints
- YARP routing configuration in
RouteClusterConfiguration.cs - Database contexts and connection strings
- Authentication and authorization policies
- Logging and monitoring settings
The solution includes test projects for unit testing:
CustomerProfile/tests/TestProject1CustomerProfile/tests/TestProject2
Run tests with:
dotnet test- User provides phone number and email
- System validates and sends OTP via SMS
- User verifies OTP and sets up profile
- JWT token generated for authentication
- User provides BVN number
- System calls QuickVerify service
- BVN data retrieved and stored
- Face verification using biometric comparison
- Customer profile must exist
- Account created with phone-based account number
- Account linked to customer profile
- Initial balance set to zero
- JWT-based authentication
- Password hashing with ASP.NET Identity
- Input validation with FluentValidation
- Secure biometric data storage
- HTTPS enforcement
- CORS configuration
- Structured Logging: Serilog with console and file sinks
- Log Levels: Information, Warning, Error
- Log Rotation: Hourly rotation with size limits
- Application Insights: Ready for cloud monitoring
- Fork the repository
- Create a feature branch
- Make your changes
- Add tests for new functionality
- Submit a pull request
This project is licensed under the MIT License - see the LICENSE file for details.
For support and questions:
- Create an issue in the repository
- Check the service-specific documentation
- Review the API documentation endpoints
Built with ❤️ using .NET 9 and modern microservices architecture