Banking.Core is a modular, cloud-ready banking application built with .NET Aspire, following Microsoft C# coding conventions and modern distributed system practices. The solution demonstrates a clean architecture approach, leveraging domain-driven design, separation of concerns, and containerized infrastructure for scalable, maintainable development.
The application is structured into the following main layers:
-
API Layer (
Banking.Core.API):- ASP.NET Core Web API exposing endpoints for banking operations (e.g., customer management, balance operations).
- Handles HTTP requests, validation, and delegates business logic to the Application layer.
-
Application Layer (
Banking.Core.Application):- Contains business logic, service orchestration, and DTOs.
- Implements use cases and application services, decoupled from infrastructure.
-
Domain Layer (
Banking.Core.Domain):- Defines core domain entities, value objects, and domain events.
- Enforces business rules and invariants.
-
Infrastructure Layer (
Banking.Core.Infrastructure):- Implements data persistence (MongoDB), repositories, and integrations (Kafka, telemetry, etc.).
- Provides concrete implementations for abstractions defined in the Domain and Application layers.
-
AppHost (
Banking.Core.AppHost):- Orchestrates the distributed application using .NET Aspire.
- Configures containers for MongoDB, Kafka, and supporting services.
- Manages environment variables, health checks, and service lifetimes.
- MongoDB: Used for data persistence, configured with SCRAM-SHA-256 authentication. Credentials and connection strings are managed securely via configuration files.
- Kafka: Used for event-driven communication and integration.
- Mongo Express: Provides a web-based UI for MongoDB management, secured with the same credentials as the database.
- Health Checks: Exposed via
/healthendpoint for readiness and liveness probes. - Configuration: All sensitive values (e.g., connection strings, credentials) are stored in
appsettings.jsonand injected via environment variables.
Banking.Core.sln
src/
Banking.Core.API/
Banking.Core.AppHost/
Banking.Core.Application/
Banking.Core.Domain/
Banking.Core.Infrastructure/
docs/
architecture.png
📚 For detailed running instructions, see RUNNING.md
⚠️ Prerequisites: Before running this project, follow the setup guide: Running .NET Aspire in Visual Studio Code
-
Build the Solution:
dotnet build Banking.Core.sln
-
Run with Aspire (Recommended):
dotnet run --project src/Banking.Core.AppHost
-
Access the Services:
- API:
https://localhost:7001orhttp://localhost:5001 - Health Check:
https://localhost:7001/health - Aspire Dashboard:
http://localhost:15888
- API:
dotnet run --project src/Banking.Core.APIPress F5 and select your preferred project type (API or AppHost) from the dropdown.
- All code follows Microsoft C# Coding Conventions.
- Consistent naming, formatting, and documentation are enforced throughout the solution.
Contributions are welcome! Please ensure all code adheres to the established architecture and coding standards.
© 2025 Banking.Core. All rights reserved.
