An inbox pipeline watches for invoices over IMAP, hands each one to Gemini to classify and extract — supplier, line items, totals, dates — and applies the structured result straight into a Postgres/Supabase ledger. It was hardened against a reliability corpus of real invoices, so it holds up on the messy documents suppliers actually send, not just clean samples.