Smart Stock
From spreadsheets to live inventory: a warehouse tracker that updates stock and value automatically from purchase and sales invoice emails
Project Overview
The question that started it
“I just want to see what's in the warehouse and what it's worth.” The owner of a Dallas liquor wholesale warehouse had no single, trusted view of stock. Smart Stock keeps stock and its value up to date on its own, using the purchase and sales invoices that already land in email.
The Problem
Three systems, no single answer:
- Purchase system: purchase invoices by email, with UPCs
- Sales system: sales invoices by email, names only, no UPCs
- Master sheet: hand-updated counts that drifted out of date
Because sales had no UPCs, they couldn't be matched to stock automatically. Counts were always behind, and inventory value was a guess.
Requirements
- Must have: total inventory value at a glance, live on-hand per product, opening count as the starting point
- Should have: automatic updates from purchase and sales emails, a simple way to match sales names to products
- Left out on purpose: multi-location, forecasting, point-of-sale, the client asked for simple
Gathered through ongoing conversations, real invoice samples and walk-throughs of the daily routine.
Approach
Use intelligence only where it earns its place
Automate the routine: reading invoices, posting stock in and out, and valuing inventory at the latest cost are predictable rules, so they run on their own without AI.
Assist with the messy part: sales list products by name only. Smart matching suggests the likely product for each name and the owner confirms it once; after that, every future sale matches itself.
Started from a clickable mock-up, refocused on the single warehouse after the first review, then connected to real email and data, each round of feedback shipped the same day, with no rebuild from scratch.
Solution Architecture
Gmail inbox → Auto sync (every 15 min) → Invoice reader (CSV & PDF lines) → Name matching (UPC or confirmed alias) → Live inventory (stock, value, history)
- Built with Lovable, Lovable Cloud (database, private sign-in, scheduled jobs), Gmail connector and Google sign-in
- Each email is processed only once and labelled ‘Inventory Processed’
- Only two approved accounts can sign in; hidden from search engines
Key Features
- Dashboard: total value, units and low-stock alerts
- Products: opening, received, sold and on hand, with export; replaces the master sheet
- Product history: every invoice line with cost
- Mapping: match sales names to products once, fixing the missing-UPC gap
- Imports & fixes: file uploads, recounts, damages
- Auto sync: email to stock in 15 minutes, no manual entry
Impact
- $504.6K opening inventory value, fully costed
- 17,369 units in the opening count
- 341 products tracked from day one
- 15 min from invoice email to updated stock
Before: hours updating sheets by hand, counts behind reality, value an estimate. After: invoices post on their own; the owner checks one screen and only confirms new product names.
What's next
Finish mapping remaining names, reorder alerts for fast movers, and reuse the setup for more locations.