DEV Community

Cover image for Smart Inventory Manger | Invoice Bee
Sudhanshu Raj
Sudhanshu Raj

Posted on

Smart Inventory Manger | Invoice Bee

What I Built

Small retail shop owners and kirana store managers spend hours each week manually entering paper supplier invoices, calculating margins, tracking stock, and checking wholesale prices.

InvoiceBee automates this entire inventory and purchase cycle:

  1. Multimodal Invoice Ingestion: Take a photo or scan of any vendor tax bill. Local vision models extract line items, prices, discounts, GST rates, and invoice totals into a structured database.
  2. Product Catalog & Margin Guard: Calculates gross margins per line item, updates on-hand stock quantities, and syncs buying costs against retail selling prices.
  3. QR Sticker Generation & Scanner: Generates physical barcode/QR label stickers for products. Cashiers or shop floor staff can scan labels on a mobile browser to pull up pricing, margin percentages, and stock counts.
  4. Local Product Intelligence: Searches the web for product details (MRP, canonical names, HSN codes, counter sales pitch hooks) via a local open-source metasearch engine (SearXNG) and local LLMs.

Retail shops, wholesale distributors, and local stores pay for this because it eliminates manual data entry errors, prevents stockouts, and replaces expensive enterprise ERP solutions with zero cloud subscription fees.

Demo

  • Live frontend interface running with instant bill extraction, QR generator, inventory tracker, and purchase invoice review screens.
  • Demo video : https://youtu.be/m3bUyj1Ej04

Code

Repository: InvoiceBee on GitHub

Key tech stack:

  • Backend: Spring Boot 4, Spring AI, Ollama (gemma4:e4b), MySQL, Liquibase
  • Frontend: React 19, TypeScript, Vite, Tailwind CSS, jsQR, html5-qrcode, qrcode.react
  • Search Infrastructure: SearXNG containerized with Docker Compose

How I Built It

InvoiceBee runs on an open-source AI architecture without commercial API dependencies:

  1. Spring AI & Local Ollama Inference

    • Uses spring-ai-starter-model-ollama running gemma4:e4b locally.
    • For invoice parsing, bill images are processed through zero-shot multimodal vision extraction with structured JSON schemas.
    • For intelligence queries, prompt templates instruct the local model to infer canonical titles, categories, GST HSN codes, and 2-sentence counter pitches.
  2. Self-Hosted SearXNG Search Metacrawler

  3. Client-Side QR Code Engine

    • Dual-engine browser scanning combining html5-qrcode and a multi-scale fallback pipeline via jsQR to handle crumpled stickers, skewed camera angles, or direct image file uploads.

Why Does Open Innovation Matter?

  1. Data Privacy for Small Businesses: Tax bills, supplier pricing, vendor phone numbers, and profit margins are sensitive commercial data. Shop owners cannot risk uploading vendor contracts or purchase invoices to third-party commercial cloud APIs. Running open-weight models on-premise guarantees complete privacy.
  2. Zero Recurring Marginal Costs: Commercial vision and search APIs charge per page or per query. For high-volume retail shops logging daily bills and scanning hundreds of products, open-weight models running on local hardware eliminate variable operational costs.
  3. No Vendor Lock-In: Open tools like SearXNG, Ollama, Spring AI, and jsQR can be deployed, modified, or migrated to any server or workstation without proprietary restrictions.

My First User

Tested with a local grocery store owner in Indore. They tested the invoice scanner by uploading paper supplier invoices with tight row spacing and generated QR stickers for unbranded pulses and grains. Being able to scan an item at the counter to verify current purchase cost against retail selling price helped them verify margins without opening a ledger.

Future works

  1. Can add product crawler which can extract the product details for searched eCommerce sites and get more details AI assistance manager.
  2. Add advance AI tracking stocks, for dead stocker manger, replnishment stocks manager, price and demand AI managers.

Top comments (0)