06 / Invoice intelligence · Moglix

SupplierInv

Project study

Turns unstructured supplier invoices into validated data with generative AI, then reconciles them with no manual review.

SupplierInv / Invoice intelligence · Moglix / 2026

Role
Backend & GenAI · AI & Analytics team
Status
In production
Year
2026
Stack
Python / Gemini / AWS Textract / Pydantic / Kafka / MongoDB / BigQuery / Power BI

02 / Overview

Messy invoices in. Clean, checked data out.

Supplier invoices arrive as scans and PDFs in every possible format. SupplierInv reads them with OCR and Gemini, turns each one into schema-validated data, streams it through Kafka into MongoDB and BigQuery, and reconciles it automatically, feeding live Power BI dashboards for procurement.

  1. Read
  2. Structure
  3. Stream
  4. Reconcile
  5. Report

SupplierInv / how the parts connect

03 / The problem

Hours of reading invoices line by line.

Every invoice had to be read, typed in and checked against the order: item by item, quantities, tax codes and the supplier’s GST number. The work was slow, repetitive and easy to get wrong at scale.

  1. 01

    Invoices in every format and layout

  2. 02

    Line-by-line checks against the order

  3. 03

    Tax and compliance rules on every line

04 / How it works

Five steps from a scanned page to reconciled data.

  1. 01

    Read

    AWS Textract extracts the text and Gemini understands the structure.

  2. 02

    Structure

    Every invoice is validated against a strict Pydantic schema.

  3. 03

    Stream

    A real-time Kafka → MongoDB → BigQuery backbone moves the data.

  4. 04

    Reconcile

    Fuzzy item matching, tolerance bands, HSN validation and GSTIN checks.

  5. 05

    Report

    Results feed live Power BI dashboards for procurement analytics.

05 / Key decisions

Where the important calls were made.

Decision 01

OCR or an LLM?

  1. →

    The choice

    Both: Textract for reliable text, Gemini for structure and meaning.

  2. →

    What it gave

    Accurate text with an understanding of what each field is.

Decision 02

What stops bad data getting in?

  1. →

    The choice

    A strict schema at the door, before anything is stored.

  2. →

    What it gave

    Downstream reports only ever see clean, typed data.

Decision 03

How strict should matching be?

  1. →

    The choice

    Fuzzy matching with tolerance bands instead of exact equality.

  2. →

    What it gave

    Real-world differences pass; real errors do not.

06 / The flow

From the first step to the result.

What it looks like from the side of the person using it — the path through SupplierInv in 4 steps.

  1. 01An invoice arrives
  2. 02It is read and structured
  3. 03It is checked and reconciled
  4. 04Results appear in the dashboard

SupplierInv / user flow

07 / Outcome

From manual review to zero-touch processing.

Invoices reconciled without review
Zero-touch
Kafka → MongoDB → BigQuery
Real-time
Items, tolerance, HSN, GSTIN
4 checks
07 / Next project Procurement A WhatsApp AI agent that lets people run sourcing workflows through plain conversation.