Skip to content

A comprehensive C++ console-based banking application with user authentication, client management, and banking operations.

License

Notifications You must be signed in to change notification settings

MostafaElsehy/BankSystem

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

2 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

Bank Management System

A comprehensive console-based banking application built in C++ that provides complete client and user management functionality with banking operations.

๐Ÿฆ Overview

This Bank Management System is a feature-rich console application that demonstrates solid object-oriented programming principles and clean architecture. It provides a complete banking solution with user authentication, client management, and financial transactions.

โœจ Features

๐Ÿ” Authentication & Authorization

  • User Login System: Secure username/password authentication
  • Permission-Based Access Control: Granular permissions for different system functions
  • Session Management: Maintains user session throughout the application

๐Ÿ‘ฅ Client Management

  • Complete CRUD Operations: Create, Read, Update, Delete client records
  • Client Search: Find clients by account number
  • Client Information: Personal details, account numbers, PIN codes, and balances
  • Soft Delete: Safe deletion with recovery capability

๐Ÿ’ฐ Banking Operations

  • Deposits: Add money to client accounts
  • Withdrawals: Remove money with balance validation
  • Balance Inquiries: View individual and total account balances
  • Transaction History: Track all financial operations

๐Ÿ‘ค User Management

  • User Administration: Add, update, and delete system users
  • Permission Management: Assign specific permissions to users
  • User List: View all system users

๐Ÿ’พ Data Persistence

  • File-Based Storage: Reliable data storage using text files
  • Data Serialization: Custom format for data storage and retrieval
  • Backup Capability: Easy data backup and restore

๐Ÿ—๏ธ Architecture

Design Patterns

  • Screen-Based Navigation: Clean separation of UI screens
  • Inheritance Hierarchy: Proper OOP with base classes
  • Factory Pattern: Object creation and management
  • Data Access Layer: Centralized data operations

Class Structure

clsPerson (Base Class)
โ”œโ”€โ”€ clsBankClient (Client Management)
โ””โ”€โ”€ clsUser (User Management)

Screen Classes
โ”œโ”€โ”€ clsMainScreen (Main Menu)
โ”œโ”€โ”€ clsLoginScreen (Authentication)
โ”œโ”€โ”€ clsTransactionsScreen (Banking Operations)
โ”œโ”€โ”€ clsClientListScreen (Client Display)
โ”œโ”€โ”€ clsAddNewClientScreen (Client Creation)
โ”œโ”€โ”€ clsUpdateClientScreen (Client Updates)
โ”œโ”€โ”€ clsDeleteClientScreen (Client Deletion)
โ”œโ”€โ”€ clsFindClientScreen (Client Search)
โ”œโ”€โ”€ clsDepositScreen (Deposit Operations)
โ”œโ”€โ”€ clsWithdrawScreen (Withdrawal Operations)
โ”œโ”€โ”€ clsTotalBalancesScreen (Balance Display)
โ””โ”€โ”€ clsManageUsersScreen (User Management)

๐Ÿš€ Getting Started

Prerequisites

  • Visual Studio 2019 or later (with C++ support)
  • Windows 10/11 (uses Windows-specific console commands)
  • C++17 or later standard

Installation

  1. Clone or Download the project to your local machine
  2. Open BankSystem.sln in Visual Studio
  3. Build the solution (Ctrl+Shift+B)
  4. Run the application (F5 or Ctrl+F5)

First Run Setup

  1. The application will create Users.txt and Clients.txt files automatically
  2. Default admin credentials may be available in the Users.txt file
  3. Create your first user account through the user management system

๐Ÿ“ Project Structure

BankSystem/
โ”œโ”€โ”€ BankSystem.cpp              # Main application entry point
โ”œโ”€โ”€ Global.h                    # Global variables and constants
โ”œโ”€โ”€ clsPerson.h                 # Base class for person data
โ”œโ”€โ”€ clsBankClient.h             # Client management class
โ”œโ”€โ”€ clsUser.h                   # User management class
โ”œโ”€โ”€ clsMainScreen.h             # Main menu screen
โ”œโ”€โ”€ clsLoginScreen.h            # Login authentication screen
โ”œโ”€โ”€ clsTransactionsScreen.h     # Banking transactions menu
โ”œโ”€โ”€ clsClientListScreen.h       # Client list display
โ”œโ”€โ”€ clsAddNewClientScreen.h     # Add new client screen
โ”œโ”€โ”€ clsUpdateClientScreen.h     # Update client screen
โ”œโ”€โ”€ clsDeleteClientScreen.h     # Delete client screen
โ”œโ”€โ”€ clsFindClientScreen.h       # Find client screen
โ”œโ”€โ”€ clsDepositScreen.h          # Deposit operations screen
โ”œโ”€โ”€ clsWithdrawScreen.h         # Withdrawal operations screen
โ”œโ”€โ”€ clsTotalBalancesScreen.h    # Balance display screen
โ”œโ”€โ”€ clsManageUsersScreen.h      # User management screen
โ”œโ”€โ”€ clsScreen.h                 # Base screen class
โ”œโ”€โ”€ clsInputValidate.h          # Input validation utilities
โ”œโ”€โ”€ clsString.h                 # String manipulation utilities
โ”œโ”€โ”€ clsUtil.h                   # General utilities
โ”œโ”€โ”€ clsDate.h                   # Date handling utilities
โ”œโ”€โ”€ Users.txt                   # User data storage
โ”œโ”€โ”€ Clients.txt                 # Client data storage
โ””โ”€โ”€ README.md                   # This documentation file

๐Ÿ”ง Usage Guide

Login Process

  1. Start the application
  2. Enter your username and password
  3. Access the main menu upon successful authentication

Main Menu Options

  1. Show Client List - View all registered clients
  2. Add New Client - Register a new bank client
  3. Delete Client - Remove a client from the system
  4. Update Client Info - Modify existing client information
  5. Find Client - Search for a specific client
  6. Transactions - Access banking operations
  7. Manage Users - Administer system users
  8. Logout - End current session

Banking Transactions

  • Deposits: Select client and enter amount to deposit
  • Withdrawals: Select client and enter amount (validates sufficient funds)
  • Balance Inquiry: View total balances across all accounts

๐Ÿ”’ Security Considerations

Current Implementation

  • Plain Text Storage: Passwords and PINs are stored in plain text
  • File-Based Security: Relies on file system permissions
  • No Encryption: Data is not encrypted at rest

Recommended Improvements

  • Password Hashing: Implement bcrypt or SHA-256 hashing
  • Data Encryption: Encrypt sensitive data in files
  • Input Validation: Add comprehensive input sanitization
  • Audit Logging: Track all system operations
  • Database Migration: Consider moving to a proper database

๐Ÿ› ๏ธ Technical Details

Data Format

Client and user data is stored in delimited text format:

FirstName#//#LastName#//#Email#//#Phone#//#AccountNumber#//#PinCode#//#Balance

File Structure

  • Users.txt: Contains all system user accounts
  • Clients.txt: Contains all bank client records
  • Build Output: Executable and debug files in x64/Debug/

Memory Management

  • Stack Allocation: Uses RAII principles
  • No Dynamic Memory: Avoids memory leaks
  • Automatic Cleanup: Proper resource management

๐Ÿ› Known Issues

  1. Security: Passwords stored in plain text
  2. Concurrency: No protection against simultaneous access
  3. Error Handling: Limited error recovery mechanisms
  4. Data Validation: Basic input validation only
  5. Platform Dependency: Windows-specific console commands

๐Ÿ”ฎ Future Enhancements

Short Term

  • Implement password hashing
  • Add comprehensive input validation
  • Improve error handling and recovery
  • Add transaction logging
  • Create data backup functionality

Long Term

  • Migrate to database storage
  • Add web-based interface
  • Implement multi-user concurrent access
  • Add reporting and analytics
  • Create mobile application

๐Ÿ‘ฅ Contributing

This project serves as an educational example of C++ application development. Contributions are welcome for:

  • Security improvements
  • Code optimization
  • Additional features
  • Documentation enhancements
  • Bug fixes

๐Ÿ“„ License

This project is provided as-is for educational purposes. Feel free to use, modify, and distribute according to your needs.

๐Ÿ“ž Support

For questions or issues:

  1. Review the code documentation
  2. Check the class comments for implementation details
  3. Examine the data files for format understanding
  4. Test with sample data to understand functionality

Note: This is a demonstration project showcasing C++ programming concepts and should not be used in production environments without proper security enhancements.

About

A comprehensive C++ console-based banking application with user authentication, client management, and banking operations.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages