A desktop inventory management system built with C++17 and Qt 6 Widgets, backed by SQLite. Designed for small warehouses and shops that need accurate stock levels, a clean audit trail, and low-stock alerts — without a server.
Dashboard — live KPI cards (product count, total stock value, low-stock count, supplier count), an animated stock-by-category bar chart with hover tooltips, a low-stock watchlist, and the latest movements.
Products — full CRUD with live search, category filter, and a low-stock-only toggle. SKUs are enforced unique, low quantities are highlighted in red, and the current view can be exported to CSV. Quantity is deliberately locked in the edit dialog: stock levels only change through recorded movements, so the audit trail always matches the shelf.
Stock movements — stock in, stock out, and absolute adjustments, each recorded atomically inside a database transaction with a live before/after preview. Negative stock is impossible by design (a CHECK constraint plus application-level validation).
Suppliers — vendor directory with contact details and a live count of products per supplier. Deleting a supplier keeps its products and clears the link (ON DELETE SET NULL).
Movements log — an immutable audit trail of every unit in, out, or adjusted, searchable by product and filterable by type.
Everything refreshes reactively: any write anywhere in the app emits a single dataChanged() signal that every page listens to.
The UI uses a dark "night shift" theme — deep slate surfaces with a safety-amber accent taken from warehouse pick-lane signage, and monospace type reserved for SKUs and figures.
- CMake ≥ 3.16
- A C++17 compiler (GCC, Clang, or MSVC)
- Qt 6 (Widgets + Sql modules) with the SQLite driver
On Ubuntu/Debian:
sudo apt install cmake build-essential qt6-base-dev libqt6sql6-sqliteOn Windows/macOS, install Qt 6 via the Qt online installer and make sure CMake can find it (-DCMAKE_PREFIX_PATH=/path/to/Qt/6.x/gcc_64 or equivalent).
git clone https://github.com/<you>/StockPilot.git
cd StockPilot
cmake -B build -DCMAKE_BUILD_TYPE=Release
cmake --build build -j
./build/StockPilotThe database is created on first run at the platform's per-user data location (e.g. ~/.local/share/StockPilot/stockpilot.db on Linux, %APPDATA%/StockPilot on Windows) and is seeded with sample products and suppliers so the app is explorable immediately. Delete the file to start fresh.
StockPilot/
├── CMakeLists.txt
├── resources/
│ ├── resources.qrc # Qt resource bundle
│ └── styles.qss # application-wide stylesheet
└── src/
├── main.cpp # entry point, stylesheet + DB bootstrap
├── DatabaseManager.* # all SQL lives here (singleton data layer)
├── MainWindow.* # shell: sidebar navigation + page stack
├── pages/ # Dashboard, Products, Suppliers, Movements
├── dialogs/ # Product, Supplier, and Stock-movement dialogs
└── widgets/ # StatCard, custom QPainter bar chart
- Single data-access layer. No widget touches SQL.
DatabaseManagerexposes typed helpers and emitsdataChanged()after every successful write, which keeps all four pages in sync with one connection per signal. - Transactional stock movements.
recordMovement()updates the product quantity and appends to the movements log inside one SQLite transaction, so the two can never drift apart. - Schema constraints as a second line of defense. Unique SKUs, non-negative quantities, and movement types are all enforced by the schema in addition to UI validation.
- No QtCharts dependency. The dashboard chart is a ~150-line
QPainterwidget with a grow-in animation and hover tooltips, keeping the build to Qt 6 base modules only.
| Table | Purpose |
|---|---|
products |
SKU, name, category, supplier link, quantity, reorder level, prices |
suppliers |
vendor contact details |
movements |
append-only log: IN / OUT / ADJUST, quantity, note, timestamp |
MIT — see LICENSE.

