π¦ Secure Banking Management System
A comprehensive desktop application built with Python and Tkinter, designed for banking staff to manage customers, handle financial accounts, track transactions, and generate financial reports. This system features a robust security layer including session management, input sanitization, and encrypted credential verification. β¨ Features
π Secure Authentication: Multi-factor style security with login attempt limits and automatic session timeouts.
π₯ Customer Management: Full CRUD (Create, Read, Update, Delete) operations for bank customers with built-in validation for emails and phone numbers.
π³ Account Operations: Manage multiple account types (Chequing, Saving, TFSA, RRSP, RESP, FHSA) with real-time balance tracking.
π Transaction History: A searchable ledger of all financial movements across the system.
π° Loan Management: Track loan statuses, interest rates, and amounts per customer.
π Financial Reporting: A built-in reporting engine providing customer financial summaries, total balances, and active product counts.
π¨ Modern GUI: A clean, organized interface using ttk themed widgets, scrollable treeviews, and tabbed notebooks.
π οΈ Tech Stack
Language: Python 3.x
GUI Framework: Tkinter / ttk
Database: MySQL (via mysql-connector-python)
Security: Custom SecurityManager for SHA-256 hashing and XSS/Injection prevention.
π Prerequisites
Before running the application, ensure you have the following installed:
MySQL Connector for Python:
Bash
pip install mysql-connector-python
π Installation & Setup
- Database Configuration
Create a MySQL database and run your schema scripts. Your database should include the following tables: User, Customer, Account, AccountType, Transactions, Loan, and Insurance. 2. Project Files
Ensure your directory structure looks like this: Plaintext
. βββ main.py # The GUI code provided βββ config.py # Database and App configurations βββ security.py # SecurityManager class βββ README.md
- Configuration (config.py)
Create a config.py file to store your credentials: Python
DB_CONFIG = { 'host': 'localhost', 'user': 'your_username', 'password': 'your_password', 'database': 'banking_db' }
APP_CONFIG = { 'max_login_attempts': 3, 'session_timeout_minutes': 15 }
- Running the App Bash
python main.py
π‘οΈ Security Implementation
The system is designed with a "Security First" mindset:
Input Sanitization: All user inputs are cleaned to prevent SQL Injection.
Password Hashing: Passwords are never stored in plain text (managed by SecurityManager).
Session Guard: The system monitors user activity; if the application is idle, it automatically logs the user out to protect sensitive data.
Validation: Regex-based validation for emails and phone numbers ensures data integrity.
π Database Schema Overview
The system interacts with a relational database containing:
Customer: Basic identity info.
Account & AccountType: Financial holdings linked to customers.
Transactions: Historical record of credits/debits.
Loans: Credit products and their current status.
User: Internal staff credentials and roles (Admin/Staff).
π€ Contributing
Fork the Project.
Create your Feature Branch (git checkout -b feature/AmazingFeature).
Commit your Changes (git commit -m 'Add some AmazingFeature').
Push to the Branch (git push origin feature/AmazingFeature).
Open a Pull Request.