A simple desktop banking application built with Python and Tkinter, with data stored in MySQL. Supports basic banking operations like deposits, withdrawals, and transfers, and logs all transactions.
- User authentication (username & password)
- Check balance
- Deposit money
- Withdraw money
- Transfer funds between users
- Transaction history
- MySQL database integration
- Simple and clean GUI interface
- Python 3
- Tkinter – GUI framework
- MySQL Connector – connect and interact with MySQL database
- SQL (Minibank-4.sql) – database and table setup
Clone the repository:
git clone https://github.com/ErkanSoftwareDeveloper/minibank.git
cd minibankInstall dependencies:
pip install -r requirements.txtUse the included Minibank-4.sql file to create the database, tables, and sample data:
-- Temporarily disable foreign key checks
SET FOREIGN_KEY_CHECKS = 0;
-- Drop old tables if they exist
DROP TABLE IF EXISTS transactions;
DROP TABLE IF EXISTS users;
-- Re-enable foreign key checks
SET FOREIGN_KEY_CHECKS = 1;
-- Create users table
CREATE TABLE users(
id INT AUTO_INCREMENT PRIMARY KEY,
username VARCHAR(50) UNIQUE NOT NULL,
password VARCHAR(100) NOT NULL,
balance DECIMAL(10,2) DEFAULT 0.00,
created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP
) ENGINE=InnoDB;
-- Create transactions table
CREATE TABLE transactions (
id INT AUTO_INCREMENT PRIMARY KEY,
user_id INT NOT NULL,
type ENUM('deposit','withdraw','transfer') NOT NULL,
amount DECIMAL(10,2) NOT NULL,
details VARCHAR(255),
created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
CONSTRAINT fk_user FOREIGN KEY (user_id) REFERENCES users(id)
) ENGINE=InnoDB;
-- Insert example users
INSERT INTO users (username, password, balance)
VALUES
('Ali', '1234', 500.00),
('Ayse', 'abcd', 1000.00),
('Mehmet', 'pass', 750.00);
-- Insert example transactions
INSERT INTO transactions (user_id, type, amount, details)
VALUES
(1, 'deposit', 200.00, 'Salary deposited'),
(1, 'withdraw', 50.00, 'Grocery shopping'),
(2, 'transfer', 100.00, 'Sent to Ali');Make sure your MySQL server is running and credentials in mini_bank.py are correct.
Run the application:
python mini_bank.py- Login with a username and password
- View balance, deposit, withdraw, or transfer money
- Check transaction history within the application
- All changes are saved to the MySQL database
minibank/
├─ mini_bank.py # Main application file
├─ Minibank-4.sql # SQL file to create database and sample data
├─ .gitignore # Git ignored files
├─ README.md # Project documentation
└─ requirements.txt # Project dependencies
- Password hashing for security
- Multi-user login with session management
- Export transaction history as CSV or PDF
- Dark / light UI theme
- Packaging as executable (.exe)
This project is intended for educational and personal use.