Skip to content

ErkanSoftwareDeveloper/minibank

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🏦 MiniBank

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.


✨ Features

  • User authentication (username & password)
  • Check balance
  • Deposit money
  • Withdraw money
  • Transfer funds between users
  • Transaction history
  • MySQL database integration
  • Simple and clean GUI interface

🛠️ Technologies Used

  • Python 3
  • Tkinter – GUI framework
  • MySQL Connector – connect and interact with MySQL database
  • SQL (Minibank-4.sql) – database and table setup

📦 Installation

Clone the repository:

git clone https://github.com/ErkanSoftwareDeveloper/minibank.git
cd minibank

Install dependencies:

pip install -r requirements.txt

🗄️ Database Setup

Use 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.


▶️ Usage

Run the application:

python mini_bank.py
  1. Login with a username and password
  2. View balance, deposit, withdraw, or transfer money
  3. Check transaction history within the application
  4. All changes are saved to the MySQL database

📁 Project Structure

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

📸 Picture

Bildschirmfoto 2026-01-11 um 16 23 48 Bildschirmfoto 2026-01-11 um 16 23 22

🚀 Possible Improvements

  • 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)

📄 License

This project is intended for educational and personal use.

About

A simple Python, SQL based mini banking application

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Languages