This repository contains a desktop Inventory Management System built with Python, Tkinter, and SQLite.
- Employee, supplier, category, and product management
- Billing and sales workflow
- SQLite database initialization via script
- Encrypted storage for selected sensitive fields
- OTP-based password reset flow via SMTP
- Python 3
- Tkinter (GUI)
- SQLite
cryptography(Fernet encryption)
login.py: main entry pointcreate_db.py: database and table initializationdashboard.py,employee.py,supplier.py,category.py,product.py,billing.py,sales.py: app modulesscript.sql: SQL schema referenceconfig.json: SMTP credentials (local, do not commit real values)config.example.json: template for SMTP credentialsbill/: generated bill text outputtests/: unit and GUI test scripts
- Install Python 3.10+.
- Create and activate a virtual environment.
- Install dependencies:
pip install cryptography- Configure email credentials for OTP:
- Copy
config.example.jsontoconfig.json(if needed). - Set:
email: Gmail address used to send OTPspassword: Gmail app password (not your normal account password)
- Copy
python login.pyOn first launch, the app creates ims.db automatically and prompts for initial admin creation if no admin exists.
This project includes test scripts under tests/, including:
- Unit tests for database, login, billing, and encryption classes
- GUI automation tests
Test files are not fully standardized for one-command execution, but they can be run directly, for example:
python "tests/Unit Testing/CryptoManagerClass/encrypt_decrypt.py"- Do not commit real credentials in
config.json. secret.key,ims.db, and generated bills are ignored by.gitignore.- If credentials were previously committed, rotate them immediately.
Recommended regular maintenance:
- Keep dependencies updated (
cryptographyin particular). - Periodically review committed files for secrets.
- Keep diagrams and documentation aligned with code changes.