Cole.
All work

Green's Compugadgets

Inventory system and AI data migration

Inventory, purchasing and sales system for a Cebu computer store, with Gemini invoice reading and a Peachtree migration pipeline.

Role
Freelance full-stack developer
When
Nov 2025
Stack
  • Next.js
  • Fastify
  • Supabase
  • BullMQ
  • Gemini API
  • TypeScript

Real interface, recorded on sample data. Names and figures shown are fictional.

The problem

A computer store in Mandaue City ran on Peachtree accounting and paper supplier invoices. Moving to a modern system meant years of records and a pile of invoices nobody wanted to retype.

How it was built

  • Inventory, purchase orders, receiving, sales invoices and payments, with owner, manager and encoder roles.
  • Invoice uploads go to a BullMQ queue. A worker cleans the image, Gemini reads it into structured JSON, and zod validates it before a person reviews it.
  • A three-way match compares the invoice, the purchase order and what was actually received.
  • Peachtree imports: the parser detects headerless exports, Gemini maps source columns to fields with a confidence score, then deterministic cleaning, conflict resolution, a dry run and one atomic database commit with an audit PDF.
  • Customer and vendor contact details are encrypted in Postgres with pgcrypto triggers.
  • Every Gemini call goes through rate limiting, retries and a circuit breaker, with deterministic fallbacks.
A supplier invoice in GreenVentory, from a photo to stock on hand
  1. UploadBullMQ

    Invoice photos join a job queue

  2. Clean

    Rotate, grayscale and normalize the scan

  3. ReadGemini vision

    Vendor, totals and line items as JSON

  4. Validatezod

    Schema check and per-field confidence

  5. Match

    Invoice against PO and what arrived

  6. Approve

    Owner or manager posts it to stock

Where it landed

Delivered to the client alongside a public storefront at greenscompugadget.net.

Vendor invoice review: scanned invoice beside AI-extracted fields and the three-way match table
Vendor invoice review: scanned invoice beside AI-extracted fields and the three-way match table
Peachtree import wizard at the AI mapping step, with a confidence score per column
Peachtree import wizard at the AI mapping step, with a confidence score per column
Inventory table of GPUs, SSDs, laptops and RAM with stock counts and peso prices
Inventory table of GPUs, SSDs, laptops and RAM with stock counts and peso prices
Stockout risk report with risk levels per item
Stockout risk report with risk levels per item
Next project: EchoicOpen case study
Echoic campaigns, a campaign schedule and a generated carousel post