Skip to content

Mostafa-SAID7/Bank-Api

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

184 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

🏦 FinBank API - Enterprise Banking System

A comprehensive, production-ready banking API built with .NET 9.0, Clean Architecture, and CQRS Pattern

Quality Gate Status Bugs Code Smells Coverage Security Rating Vulnerabilities

✨ Key Features

  • πŸ’³ 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

Database

This project uses PostgreSQL as the primary database (Neon serverless PostgreSQL in production).

Database Schema

  • 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

Quick Start

Prerequisites

  • .NET 9.0 SDK
  • PostgreSQL 14+ (or a Neon / any hosted PostgreSQL)
  • Visual Studio 2022 or VS Code
  • Git

Installation

# 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.csproj

The API will be available at http://localhost:5000

Verify Installation

Visit http://localhost:5000/swagger to explore the API using Swagger UI.

Database Configuration

Set the DATABASE_URL environment variable (standard PostgreSQL URI format):

DATABASE_URL=postgresql://user:password@host:5432/dbname?sslmode=require

Documentation

Architecture

This project follows Clean Architecture with CQRS (Command Query Responsibility Segregation) pattern:

Project Structure

  • 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

Key Design Patterns

  • 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

Contributing

We welcome contributions! Please read our Contributing Guide and Code of Conduct.

License

This project is licensed under the MIT License - see the LICENSE file for details.

Support

About

A comprehensive banking API built with .NET 9.0 and Clean Architecture principles.

Topics

Resources

License

Security policy

Stars

0 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors