A comprehensive, production-ready banking API built with .NET 9.0, Clean Architecture, and CQRS Pattern
- π³ Account Management: Create, manage, and monitor bank accounts with real-time balance tracking
- π° Transaction Processing: Secure fund transfers with comprehensive transaction history and audit trails
- π Advanced Security: JWT authentication, 2FA, IP whitelisting, and password policies
- π₯ User Management: Role-based access control (Admin, Manager, User, Auditor)
- π Comprehensive Banking: Cards, Loans, Deposits, Bill Payments, Recurring Payments
- π Audit & Compliance: Complete audit logging and regulatory compliance
- β‘ High Performance: Optimized database with 50+ indexes and soft delete support
- π Production Ready: PostgreSQL-backed with CI/CD pipelines
This project uses PostgreSQL as the primary database (Neon serverless PostgreSQL in production).
- Accounts Module: Accounts, AccountFees, AccountHolds, AccountRestrictions, AccountStatusHistories, FeeSchedules, JointAccountHolders
- Transaction Module: Transactions
- Authentication Module: Sessions, TwoFactorTokens, AccountLockouts, PasswordPolicies, PasswordHistories, IpWhitelists
- Identity Tables: AspNetRoles, AspNetUsers, AspNetUserRoles, AspNetUserClaims, AspNetUserLogins, AspNetUserTokens, AspNetRoleClaims
- Features:
- 50+ optimized indexes
- 30+ foreign key relationships
- Soft delete support on all business entities
- Complete audit trail (CreatedAt, UpdatedAt)
- Role-based access control via ASP.NET Core Identity
- .NET 9.0 SDK
- PostgreSQL 14+ (or a Neon / any hosted PostgreSQL)
- Visual Studio 2022 or VS Code
- Git
# Clone the repository
git clone https://github.com/yourusername/bank-management-system.git
cd bank-management-system
# Restore dependencies
dotnet restore
# Build the solution
dotnet build
# Set the DATABASE_URL environment variable, then run the API
# Migrations are applied automatically on startup
export DATABASE_URL="postgresql://user:password@host/dbname?sslmode=require"
dotnet run --project src/Bank.Api/Bank.Api.csprojThe API will be available at http://localhost:5000
Visit http://localhost:5000/swagger to explore the API using Swagger UI.
Set the DATABASE_URL environment variable (standard PostgreSQL URI format):
DATABASE_URL=postgresql://user:password@host:5432/dbname?sslmode=require
- π Features
- ποΈ Project Structure
- βοΈ Setup Guide
- π Deployment
- π οΈ Technologies
- π Use Cases
- π€ Contributing
This project follows Clean Architecture with CQRS (Command Query Responsibility Segregation) pattern:
- Bank.Api: API layer with controllers, middleware, and configuration
- Bank.Application: Application/business logic layer with commands, queries, and handlers
- Bank.Domain: Domain layer with core entities, interfaces, and business rules
- Bank.Infrastructure: Infrastructure layer with data access, Entity Framework, and external services
- Clean Architecture: Clear separation of concerns with minimal dependencies
- CQRS Pattern: Separate handling of commands (write operations) and queries (read operations)
- Repository Pattern: Abstraction over data access logic
- Dependency Injection: Loose coupling through IoC container
- Soft Delete: Logical deletion with query filters
- Audit Trail: Complete tracking of entity changes
We welcome contributions! Please read our Contributing Guide and Code of Conduct.
This project is licensed under the MIT License - see the LICENSE file for details.
- π§ Email: support@bankproject.com
- π Issues: GitHub Issues
- π Documentation: Project Wiki