Inspiration

Construction subcontractors and tradespeople do the work, then spend weeks chasing people to get paid for it. The U.S. construction industry loses over $200 billion a year to slow and missing payments, the average subcontractor waits around 96 days to get paid, and only 5% consistently get paid on time. Most manage all of this with a phone, their memory, and a folder of paper. I wanted to take the entire getting-paid burden off the people doing the actual work.

What it does

PaidKit turns a photo of a work order into a professional invoice, keeps a clear record of who owes you and how much, chases the payment automatically on a schedule, and tracks the state lien deadlines that protect your legal right to get paid. A subcontractor snaps a picture of their work order, Gemini extracts the labor, materials, and party details, and PaidKit generates the invoice, emails it to the general contractor or owner, follows up automatically until it's paid, and warns them before their Notice to Owner deadline closes.

How I built it

PaidKit is a Next.js 15 app (App Router, React 19, TypeScript) deployed on Google Cloud Run with a custom domain. It uses Gemini (gemini-2.5-flash-lite) to extract structured data from a photographed work order, returning labor line items, materials, party information, and a per-field confidence score. Firestore stores contractors, jobs, and invoices, Firebase Auth handles sign-in, Resend delivers the invoice and follow-up emails, and Cloud Scheduler runs the automated payment chasing daily. Every extracted invoice is validated against the work order's own stated total, and a mismatch warning flags any discrepancy so a wrong invoice never gets sent silently.

Challenges I ran into

The hardest part was trusting the extraction. Real work orders are messy: they list multiple labor tasks at different rates, their own totals sometimes don't reconcile with their line items, and a single wrong number on an invoice is a real problem for someone counting on that money. I built the system to model multiple labor lines rather than a single hours-and-rate pair, to surface a confidence score on every field, and to cross-check the computed total against the document's stated total and warn on any mismatch. On the deadline side, Florida's Notice to Owner rules are genuinely intricate, so the app tracks the day-40 mailing rule (certified mail counts as served the day it's sent) rather than a naive deadline.

What I learned

Green tests are not proof. Almost every real bug I found had passing tests, a redirect loop, a timezone error, an extraction that silently collapsed multiple labor rates into one. What actually caught them was verifying against real data every time. I also learned that the getting-paid problem is real but under-discussed: talking directly to subcontractors surfaced pain nobody posts about publicly, and that shaped the product more than any assumption I started with.

What's next for PaidKit

Generated Notice to Owner documents with attorney-reviewed templates, so the app doesn't just track the deadline but helps file the notice. Expanding beyond Florida to other states with their own lien rules. And migrating the extraction pipeline to Vertex AI to scale as more contractors come on.

Built With

Share this project:

Updates