A Prompt for an Inventory Tracker
Spreadsheets break the day two people update stock at once. This brief builds a tracker where every change is a movement with a reason, and counts add up.
Key takeaways
- Never store stock as a number people edit. Store movements (received, sold, used, adjusted) and compute stock from them.
- Barcode scanners that act as keyboards work with any web form; build for them first.
- A daily low stock email is the feature that saves money. Set reorder points per item.
This is a ready-to-paste prompt for an inventory tracker for a small shop, studio, workshop or warehouse corner. It tracks items across a few locations, records every change as a stock movement with a reason, takes input from a barcode scanner, warns you by email when anything falls below its reorder point, and imports your current spreadsheet. The brief is built around one idea that saves small businesses a lot of grief: stock is a history, not a number.
The prompt
Build an inventory tracker web app for a small business with up to 5 staff. Practical, dense, fast on a laptop and usable on a phone in the storeroom. Use Startbase Cloud for sign-in (email and password, invite only), data and emails. Roles: admin and staff. Data: items (SKU, name, barcode, category, unit such as piece, box or kg, cost price, reorder point, reorder quantity, supplier, active), locations (name, for example Shop floor, Back room, Van), stock_movements (item, location, quantity change positive or negative, type: received, sold, used, transfer out, transfer in, adjustment, reason note, user, created_at), and suppliers (name, email, lead time in days). Current stock per item and location is the sum of its movements; it is never edited directly. Screens: 1) Stock: a table of items with stock per location and total, filters for category and low stock, search by name, SKU or barcode. 2) Quick entry: a single focused input where scanning a barcode (scanners type the code and press Enter) finds the item, then I pick a movement type and quantity with big buttons; built for scanning many items in a row. 3) Item page: details, stock per location, a chart of stock over 90 days, and the movement history. 4) Transfer: move a quantity between locations as two linked movements. 5) Stock count: pick a location, enter counted quantities, and the app records adjustments for the differences with the reason Stock count. 6) Import CSV of items with opening stock as received movements, with a preview. Every morning at 8 am local time, email admins a list of items at or below their reorder point with the suggested reorder quantity and supplier. Staff can add movements; only admins can edit items, delete anything, or record adjustments. Out of scope: purchase orders, sales channel integrations, accounting, and multiple businesses.
Why it is written this way
Movements, not a stock column
If stock is a number people overwrite, two staff updating at once lose one update, a typo erases history, and nobody can answer "where did those ten boxes go?". If every change is a movement with a type, user and reason, stock is the sum, the history explains itself, and mistakes are fixed by adding a correcting movement rather than editing the past. This is the same principle accountants use for money, applied to boxes.
Quick entry built for scanners
Most USB and Bluetooth barcode scanners behave like a keyboard: they type the code and press Enter. A single always-focused input with big follow-up buttons means you can scan a delivery of forty items without touching the mouse. No special hardware integration needed, which is why the brief says how scanners behave instead of naming a device.
Stock counts as adjustments
Physical counts never match the system exactly. Recording the difference as an adjustment with a reason (instead of overwriting the number) shows you shrinkage over time, which is often the most useful number in the whole app.
Roles and invite only
Staff record what happens; admins change what things are. Restricting adjustments and deletes to admins keeps the numbers honest. Invite-only sign-in, a switch in Startbase Cloud's sign-in settings, keeps strangers out of your stock list.
The 8 am email
Low stock alerts are where the tracker pays for itself. The email runs as a scheduled job inside your database; schedules are stored in UTC, so the brief says "local time" and you should name your time zone when the agent asks. Emails can go through the platform sender with no keys once the App AI gateway is on, within a daily limit, which is plenty for one daily summary.
Three follow-ups to send after the first build
- 01"Add purchase orders: from the low stock email or the stock page, create a draft order per supplier with suggested quantities, edit it, mark it sent, and when it arrives, receive it line by line into a location as received movements."
- 02"Add printable labels: for selected items, generate a page of labels with name, SKU and a barcode, sized for standard A4 label sheets with 24 labels per sheet."
- 03"Add a stock value report: total stock value at cost price per location and category, and the value of adjustments per month."
Purchase orders close the loop the low stock email opens. Labels make scanning possible for items that came without barcodes, which in small shops is most of them. The value report is the number your accountant asks for at year end, and the adjustment value shows what shrinkage actually costs.
Two variations
- A phone-first version for a mobile team: build it as an Expo app so staff scan barcodes with the phone camera, and run it through Expo Go on each phone. Keep the same data model; only the quick entry screen changes. Store builds are not available from Startbase right now, so plan on Expo Go or the web version.
- An equipment checkout tracker: for a school, film club or tool library, items are individual assets with a serial number, and movements become check out and check in with a borrower and due date. A daily job emails borrowers the day before items are due back.
Common problems and the wording that fixes them
- Stock goes negative. Someone records a sale that was never received. Decide whether that is allowed. Ask: "Block movements that would take stock at a location below zero, except adjustments by admins, and show the current stock next to the quantity field."
- The stock table is slow with thousands of movements. Summing everything on every load gets heavy. Ask: "Keep a stock_levels table per item and location, updated in the same transaction as each movement, and add a nightly check that it matches the sum of movements."
- Scanning creates duplicates. Scanners sometimes send the code twice. Ask: "Ignore the same barcode scanned twice within one second, and show the last five scans on the quick entry screen with an undo for each."
- Import mangles SKUs. Spreadsheets turn 00123 into 123. Ask: "Treat SKU and barcode columns as text on import, keep leading zeros, and show any rows where they look like numbers in the preview."
- The morning email lists items nobody stocks anymore. Ask: "Exclude inactive items from alerts, and add a Snooze for 7 days option per item in the email link."
Going live in the shop
Pick a quiet day, do a full count, import it as opening stock, and from then on, every delivery and every sale or use goes through the app. Half-adoption (some changes in the app, some in the old spreadsheet) is the only way an inventory system truly fails. Publish it once and bookmark the quick entry screen on the storeroom device.
For a wider guide to inventory features, alerts and barcode options, read how to build an inventory management app. The movement ledger is easier to reason about after database basics for non-developers, and the morning email is a scheduled job. More tools like this are on the internal tools use case page.
Frequently asked questions
What is the best way to track inventory in a small business?
Record every change as a movement (received, sold, used, transferred, adjusted) with who and why, compute stock from those movements, count physically on a schedule, and set reorder points so the system tells you what to buy.
Can a web app use a barcode scanner?
Yes. Most USB and Bluetooth barcode scanners act like a keyboard, typing the code and pressing Enter, so a focused input field in a web app works with them directly.
Can I import my inventory spreadsheet?
Yes, as a CSV. Import items with their opening stock recorded as received movements, keep SKUs as text so leading zeros survive, and check a sample against a physical count before importing everything.

