How to Build an Inventory Management App
The secret of an accurate inventory app is that nobody edits the stock number. Every change is a movement, and the number is the sum of them.

Key takeaways
- Record every change as a stock movement (received, sold, adjusted, transferred) and derive the quantity from the movements. Never let people overwrite the number.
- A USB or Bluetooth barcode scanner usually types like a keyboard, so a focused text field is all the app needs. Camera scanning needs a library and testing on real phones.
- Low-stock alerts need a reorder point per item and location, and a daily digest beats one email per item.
An inventory management app tracks what you have, where it is and when to reorder. Build it on a stock movement ledger: every receipt, sale, adjustment and transfer is a row, and the quantity on hand is the sum of those rows for an item at a location. Add fast barcode input, a reorder point per item and a regular count, and you have a tool that stays accurate long after a spreadsheet would have drifted.
Why the spreadsheet drifts
Most small businesses start with a sheet that has a Quantity column. It works until two people change it on the same day, someone types 40 instead of 4, and nobody can say why the shelf has 12 when the sheet says 19. A single editable number has no history, so errors cannot be traced or undone. The ledger approach fixes exactly this: the number can only change through a recorded movement with a reason and a person attached.
The data model
- items: SKU, name, barcode (one or more), unit (each, box, kg), category, cost, sale price, supplier, active flag.
- locations: a store, a warehouse, a van, or a shelf inside one of those if you need that detail.
- stock_movements: item, location, quantity change (positive or negative), type (received, sold, adjusted, transferred out, transferred in, counted), reference (purchase order or order number), note, user, created at.
- stock_levels: item, location, quantity on hand. A summary kept up to date from movements so lists load fast.
- reorder_rules: item, location, reorder point, reorder quantity.
- suppliers and purchase_orders: who you buy from, what you ordered, what arrived.
The stock_levels table is a convenience, not the truth. If it ever disagrees with the sum of movements, the movements win, and you can rebuild levels from them. Ask for a database trigger or function that updates the level in the same transaction as each movement, so the two never go out of step in normal use.
A transfer between locations is two movements (out of one, into the other) saved together. If only one half saves, stock vanishes or doubles, so make it a single operation that succeeds or fails as a whole.
Barcode input without the headache
Barcodes are where inventory apps feel fast or feel like data entry. There are two practical routes, and you can support both.
Handheld scanners
Most USB and Bluetooth barcode scanners act like a keyboard: they type the code into whatever field has focus and press Enter. That means the app needs no special integration. Build a scan screen with one large input that stays focused, look up the item when Enter arrives, and show the result big enough to read at arm's length. A good scan screen supports rapid fire: scan, the item appears with quantity 1, scan again to make it 2, scan a different item to start a new line.
Phone cameras
Scanning with a phone camera needs a barcode reading library and camera permission, and quality varies by phone, lighting and label. It works in a mobile browser and in an Expo app, but treat it as something to test on the actual phones your staff carry, in the actual stockroom light, before you depend on it. Always keep a manual search box as a fallback for torn or missing labels.
Units, cases and packs
A quiet source of wrong numbers is the difference between how you buy and how you sell. You order sparkling water by the case of 24 and sell it by the bottle. If staff receive "1" when a case arrives, stock is off by 23 before anyone sells a thing.
Pick one base unit per item (the smallest unit you sell or use, here a bottle) and store every movement in it. Then add pack sizes: the case barcode means 24 base units, the bottle barcode means 1. When a case is scanned at receiving, the app records +24 automatically. Reports can still show "6 cases and 3 bottles" for the buyer, but the ledger only ever counts bottles. The same idea handles weight: store grams, display kilograms.
Low-stock alerts and stock counts
A reorder point is the quantity at which you should order more, usually enough to cover sales while the new stock is on its way. Set it per item and location, then run one check a day: every item at or below its point goes into a single email or an in-app list, grouped by supplier. That turns into a draft purchase order with one click. On Startbase Cloud, a daily check like this is a scheduled job with an email from the Emails section.
Counts keep the ledger honest. A cycle count picks a shelf or category, someone scans what is physically there, and the app records a "counted" movement for the difference. Show the variance (expected 19, counted 12) before saving, and require a note for large gaps. Over a few weeks the variance report tells you where stock is really going.
Screens for version one
- 01Items list with search, category filter and quantity per location, low items highlighted.
- 02Item page with details, barcodes, levels per location and the movement history.
- 03Scan screen for receiving, selling or moving stock, with the action chosen at the top.
- 04Receive purchase order: tick off what arrived, partial deliveries allowed.
- 05Count screen with expected versus counted and a variance summary.
- 06Reorder list: everything below its point, grouped by supplier.
The brief
Build an inventory management web app for a shop with two locations (store and back room). Items have SKU, name, one or more barcodes, unit, category, cost, price and supplier. Stock changes only through stock_movements (received, sold, adjusted, transfer out, transfer in, counted) with user, reason and reference; quantity on hand per item and location is kept in stock_levels by a database function in the same transaction. Transfers save both movements atomically. Build a scan screen with an always-focused input that works with USB keyboard-style scanners (scan then Enter), plus a manual search fallback. Add receiving against purchase orders, cycle counts showing expected versus counted, reorder points per item and location, and a daily job that emails one low-stock digest grouped by supplier. Staff can scan and count; only managers can adjust stock by hand or edit items.
Before trusting it with real stock, import your current items from a CSV (the Database docs cover CSV import up to 5 MB) and record one opening "counted" movement per item so the ledger starts from a real number.
Leave these out at first
- Point of sale. Selling is its own system with receipts, taxes and card readers. Record sales as movements, imported or entered, until you know you need a POS.
- Lot numbers, expiry dates and serial numbers. Essential for food, pharmacy and electronics, unnecessary for many shops. Add them only if your goods need them.
- Cost accounting methods. FIFO and weighted average cost are for your accountant's system. Keep a simple cost per item.
- Live sync with every sales channel. Connecting each online store is real integration work. Start with one channel or a daily import.
An inventory app is a classic internal tool: small team, clear job, big payoff. Our guide to internal tools covers how to roll one out so staff actually use it, and the shops use cases show where it fits next to selling online. To sell online, what an ecommerce app costs lays out the budget, and turning a spreadsheet into an app covers moving your current sheet over.
Frequently asked questions
How do inventory apps track stock accurately?
They record every change as a movement with a type, quantity, person and reason, and calculate stock on hand from those movements. Nobody edits the quantity directly, so every number can be explained.
Do I need special hardware to scan barcodes?
No. Many USB and Bluetooth scanners act like a keyboard and type the code into a focused field. Phone camera scanning is also possible with a barcode library, but test it on your actual phones and lighting first.
What is a reorder point?
The stock level at which you should order more, usually enough to keep selling until the new delivery arrives. The app compares each item's quantity with its reorder point and lists what needs ordering.
Can I import my existing inventory spreadsheet?
Yes. Import items from a CSV, then record one opening count per item and location so the movement history starts from a verified quantity.
