Desktop inventory and billing app built with Tkinter for the UI and FastAPI for the local API layer.
- Manage suppliers, products, customers, invoices, and invoice items
- Create billing invoices with automatic stock deduction
- Run as a single desktop app from
run_gui.py - Use MongoDB automatically when available
- Fall back to an in-memory demo database when MongoDB is not installed
On another machine, especially a MacBook, you do not need to install MongoDB just to show the project.
The app now supports:
INVENTORY_DB_MODE=auto: try MongoDB first, then fall back to in-memory demo dataINVENTORY_DB_MODE=memory: always run with seeded demo dataINVENTORY_DB_MODE=mongodb: require a real MongoDB connection
For a presentation, use memory mode so the app always opens with sample data.
- Install Python 3.11+.
- Open Terminal in the project folder.
- Create and activate a virtual environment.
- Install dependencies.
- Run the GUI.
Commands:
python3 -m venv .venv
source .venv/bin/activate
pip install -r requirements.txt
export INVENTORY_DB_MODE=memory
python run_gui.pyIf your Mac Python does not include Tkinter, install Python from python.org and recreate the virtual environment. The app depends on Tkinter for the desktop window.
python -m venv .venv
.\.venv\Scripts\Activate.ps1
pip install -r requirements.txt
$env:INVENTORY_DB_MODE="memory"
python run_gui.pyIf you want to use a real database instead of demo mode, create a .env file from .env.example and set:
MONGODB_URI=mongodb://localhost:27017
MONGODB_DB=inventory_billing_db
INVENTORY_DB_MODE=mongodb
INVENTORY_DEMO_SEED=true
Then start the app normally:
python run_gui.py.
├── app/
│ ├── config.py
│ ├── database.py
│ ├── gui.py
│ ├── main.py
│ ├── schemas.py
│ └── utils.py
├── run_gui.py
├── requirements.txt
└── README.md
- In demo mode, the app opens with sample suppliers, products, customers, invoices, and invoice items.
- The status bar shows whether you are using MongoDB or the in-memory demo backend.
- The GUI starts the local API automatically, so only
python run_gui.pyis needed.