Inspiration
In disaster relief, money needs to move quickly, but every payment still needs to be justified. An invoice can exceed an approved rate, include work outside the agreed scope, repeat a milestone, or push a campaign over budget. Those details can be hard to catch when people are reviewing paperwork under pressure.
I built ClearAid to make those checks easier to follow and explain before a person approves a payment.
What ClearAid does
An operator selects a relief campaign and registered vendor, enters or reviews an invoice, and runs it through preflight checks. ClearAid compares invoice details with the approved scope, source evidence such as a purchase order or statement of work, vendor rates, grant limits, and previous payments.
AI helps organize the evidence and explain discrepancies. Deterministic controls make the payment decision, and a human remains responsible for approval. PayPal Sandbox demonstrates the payment workflow, while a SHA-256 linked public ledger makes recorded donations and disbursements inspectable.
How I built it
ClearAid uses React, Next.js, and TypeScript, deployed on Cloudflare Workers with Vinext. Neon stores the project’s records. PayPal Sandbox handles demo payment flows, and the Vercel AI SDK connects the AI agent to the reconciliation workflow.
The agent also uses a short-lived in-memory cache to reuse results for identical normalized invoice reviews, reducing repeat model calls for up to 30 minutes.
Challenges and what I learned
The main challenge was making the clean invoice pass while reliably blocking overrates, duplicate billing, unapproved items, and budget overruns. I also had to keep the agent’s explanations separate from the rules that actually control payment.
I learned that an AI explanation is most useful when people can inspect the evidence behind it—and that payment controls should stay predictable, clear, and under human review.
All campaigns, vendors, and invoices in this demo use synthetic data and PayPal Sandbox. No live funds move.
Built With
- cloudflare-workers
- google-gemini
- neon
- next.js
- paypal-sandbox
- postman
- react
- typescript
- vercelsdk
- vinext