(Tkinter + SQLite + Argon2id)
A desktop Bank Account Management System built with Python and Tkinter. It supports admin and customer workflows, stores data in SQLite, and secures credentials with Argon2id hashing. The UI is intentionally simple and fast, while the backend focuses on correctness and safety.
If you read only this README, you should understand how the system works, how the data is stored, and how to operate or extend it.
Admin features
- Create and delete admin accounts
- Create and delete customer accounts
- View customer account summaries
Customer features
- Secure login with PIN
- Deposit and withdraw funds (with limits)
- Change PIN
- View balance and account summary
- Close account
Security highlights
- Admin passwords and customer PINs are hashed with Argon2id
- SQLite storage (no plaintext credentials)
- Input validation at the service layer
- Transaction updates are atomic
The project is split into clear layers:
- UI layer:
bank_app/ui.py- Tkinter windows and user interactions
- Service layer:
bank_app/services.py- Business rules, validation, and security
- Storage layer:
bank_app/storage.py- SQLite schema and persistence
- Security:
bank_app/security.py- Argon2id hashing and verification
This separation makes the code easier to test, reason about, and change safely.
The app stores data in data/bank.db with three tables:
admins
username(unique)password_hashcreated_at
customers
account_number(primary key)pin_hashbalance(integer)created_atnameaccount_type(SavingsorCurrent)date_of_birth(DD/MM/YYYY)mobilegendernationalitykyc_document
transactions
account_numberamounttx_type(depositorwithdraw)balance_aftercreated_at
- Python 3.10+ (3.11 recommended)
- Tkinter (bundled with most Python installs on Windows/macOS)
Install runtime dependencies:
python -m venv .venv
.\.venv\Scripts\Activate.ps1
pip install -r requirements.txtFrom the repo root:
python mainProject.pyYou can also run:
python -m bank_appIf no admin exists, the Admin Login screen shows a Create First Admin button.
You can also bootstrap via environment variables (optional):
BANKAPP_BOOTSTRAP_ADMIN_IDBANKAPP_BOOTSTRAP_ADMIN_PASSWORD
Example (PowerShell):
$env:BANKAPP_BOOTSTRAP_ADMIN_ID="admin"
$env:BANKAPP_BOOTSTRAP_ADMIN_PASSWORD="admin@123"
python mainProject.pyAfter the first admin is created, normal admin login is enabled.
- Open the app and choose Employee
- Log in as admin
- Use the menu to:
- Create admins
- Create customer accounts
- View customer summaries
- Close accounts
- Open the app and choose Customer
- Log in with account number + PIN
- Use the menu to:
- Deposit and withdraw money
- Change PIN
- Check balance
- Close account
- PIN must be exactly 4 digits
- Passwords must be at least 6 characters
- Minimum balance:
10000 - Max deposit/withdraw per transaction:
25000 - Date format:
DD/MM/YYYY
These rules are enforced in bank_app/services.py and bank_app/validation.py.
Install dev dependencies:
pip install -r requirements-dev.txtRun the test suite:
pytest -qTests cover:
- Argon2id hashing and verification
- Validation rules (dates, mobile numbers)
- Core service workflows (admin/customer, deposit/withdraw)
A workflow is included at .github/workflows/python-ci.yml to run tests on pushes and pull requests.
Older versions stored data in flat text files under database/. Those files are now deprecated and not used by the app.
If you need to import legacy data into SQLite:
python scripts/migrate_legacy.pyThe script reads:
database/Admin/adminDatabase.txtdatabase/Customer/customerDatabase.txt
bank_app/
config.py
errors.py
security.py
services.py
storage.py
ui.py
scripts/
migrate_legacy.py
tests/
test_security.py
test_services.py
test_validation.py
images/
mainProject.py
README.md
- Keep UI code in
bank_app/ui.pyand business logic inbank_app/services.py. - Always validate inputs in the service layer.
- Avoid storing secrets in plaintext.
- If you add new features, add at least one test.
App opens but icons are missing
- Make sure you run the app from the repo root so
images/is discoverable.
Tkinter is missing
- On Linux, install
python3-tkvia your package manager.






