InventoryAI — Devpost Submission

Inspiration

Small businesses and restaurants spend hours every week manually keying in supplier invoices — counting items, updating spreadsheets, guessing when to reorder. We wanted to make that entire process disappear with one photo.

What it does

InventoryAI turns any supplier invoice into a live inventory update in under 10 seconds.

  • Snap or upload a receipt (photo, PDF, or scanned image)
  • Gemini 2.5 AI reads every line item — product name, quantity, unit, price
  • Fuzzy matching + UPC lookup links extracted items to your existing product catalog. New items are auto-created.
  • One tap to apply — stock levels update instantly
  • Analytics dashboard shows vendor spend, reorder predictions, price variance alerts, and top-moving products
  • AI assistant lets you ask questions about your inventory in plain English
  • POS-style checkout deducts stock as you sell
  • Reorder alerts tell you exactly how many days before a product runs out

How we built it

Frontend: Astro + React for island-based interactivity with Tailwind CSS. Supports dark/light themes via CSS custom properties.

Backend: FastAPI with async MongoDB (Beanie ODM). Every API route is scoped to the authenticated store via JWT, giving true multi-tenant data isolation.

AI: Google Gemini 2.5 Flash handles OCR and structured extraction from invoice images and PDFs. A second Gemini call powers the inventory chat assistant.

Matching: A multi-layer pipeline — exact UPC barcode match → fuzzy string search → vendor catalog lookup → AI-assisted categorization. Unmatched items are flagged for manual review.

Challenges we ran into

  • Multi-tenancy from scratch — the initial build had no tenant scoping, so all users shared the same product database. We rewrote every model and query to scope by store_id encoded in the JWT.
  • Invoice variance — supplier invoices have wildly inconsistent formats. Getting Gemini to reliably extract structured line items across handwritten receipts, PDFs, and phone photos required careful prompt engineering.
  • Matching ambiguity — "whole milk 2L" and "Milk (2 litre, full fat)" are the same product. The fuzzy matching pipeline handles this but required extensive tuning to avoid false positives.

Accomplishments that we're proud of

  • Sub-10-second end-to-end flow from photo to updated inventory
  • Duplicate invoice detection with automatic flagging
  • Reorder prediction using daily consumption rates from transaction history
  • Clean, responsive UI that works on mobile — useful in an actual warehouse or shop floor

What we learned

  • Gemini's vision capabilities are surprisingly robust on low-quality receipt photos
  • Multi-tenancy needs to be designed in from day one — retrofitting it is painful
  • Fuzzy string matching for product names is harder than it sounds

What's next

  • Email/WhatsApp integration so invoices can be forwarded directly
  • Supplier portal for direct EDI connections
  • Native mobile app for faster camera capture
  • Automated purchase order generation based on reorder predictions

Built With

Share this project:

Updates