Inspiration The world doesn't need another generic AI chat wrapper, but small businesses desperately need cash flow. Every day, thousands of businesses struggle with Accounts Receivable (AR). Founders and finance teams spend countless hours manually chasing overdue invoices, sending awkward follow-up emails, and trying to figure out which customers are actually going to pay. This manual overhead leads to high Days Sales Outstanding (DSO) and crippled cash flow.

We realized that while Generative AI is amazing at communication and unstructured data, it is terrible at math. So, we set out to build CollectIQ: a platform that combines the strict, deterministic rules of a financial ledger with the intelligent, conversational power of AI. We wanted to build a product that founders would actually use tomorrow to get paid faster.

What it does CollectIQ is a multi-tenant Accounts Receivable copilot that automates the entire collections workflow:

AI-Powered Data Extraction: Users drag and drop invoices (PDF, JPG, PNG). Instead of manual data entry, CollectIQ uses Vision AI to extract line items, totals, dates, and entities. Crucially, the user reviews and confirms this data before it hits the immutable ledger. Automated Collection Engine: CollectIQ syncs directly with Gmail (via OAuth). It uses intelligent agents to orchestrate follow-ups—sending friendly reminders before due dates, and escalating urgency for overdue accounts. Smart Communication Analysis: When a customer replies to an invoice email, CollectIQ reads the inbound thread, classifies the intent (e.g., "Payment Promise," "Dispute," "Request for W9"), and flags high-risk communications on the dashboard. Enterprise-Grade Security: The app features strict Row-Level Security (RLS) and Role-Based Access Control (RBAC), ensuring that financial data is sandboxed per organization. How we built it We architected CollectIQ for production from day one.

Frontend: React, TypeScript, Vite, and Tailwind CSS. We focused heavily on a premium, consumer-grade UX that feels fast and responsive. Backend & Database: Supabase (PostgreSQL). We relied heavily on Postgres for deterministic financial state machines. Database constraints prevent negative payments, duplicate invoices, and unauthorized access. AI & Automation: We utilized Supabase Edge Functions (Deno) running cron jobs to evaluate the ledger daily. We integrated LLMs (Gemini / OpenAI) for structured JSON extraction of documents and semantic classification of inbound Gmail threads. Integrations: Google Workspace API (OAuth 2.0) for reading and sending authenticated emails on behalf of the user. Challenges we ran into Our biggest challenge was trust. In finance, a single AI hallucination (like hallucinating an extra zero on a payment due) is catastrophic.

To solve this, we implemented the "AI as an Assistant, Database as the Source of Truth" pattern. We wrote strict Postgres triggers and RLS policies that physically prevent the AI from mutating core financial math. The AI is only allowed to draft emails and suggest data extraction; a deterministic state machine handles the actual ledger balances.

Additionally, navigating the complexities of the Gmail API (parsing raw MIME threads and stripping out HTML signatures to feed clean text to the LLM) required significant reverse-engineering and testing.

Accomplishments that we're proud of: We didn't just build a prototype; we built a deployable, multi-tenant SaaS application. We are incredibly proud of the seamless Gmail integration and the fact that the platform feels like a mature product. The "Smart Classification" feature—where the AI reads a messy email thread and instantly updates the invoice's collection stage—feels like magic every time it runs.

What we learned: We learned that the most valuable AI products aren't the ones where AI does everything, but the ones where AI seamlessly bridges the gap between unstructured human behavior (emails, PDFs) and structured software (databases, ledgers). We also leveled up our skills in Postgres Row-Level Security and Deno Edge Functions.

What's next for CollectIQ: We believe CollectIQ can become the default AR platform for modern SMBs. Our immediate next steps are:

Accounting Sync: Bi-directional sync with Xero and QuickBooks Online. Payment Gateways: Embedding Stripe/Plaid payment links directly into the AI-generated emails. Predictive Analytics: Using historical payment data to assign "Risk Scores" to specific clients before an invoice is even issued.

Built With

Share this project:

Updates

Submission history