Inspiration

Near where I live there's a playing field whose edge by the footpath is overgrown and full of plastic. One evening someone started pulling the grass and stopped halfway. It's nobody's job, so it stays that way. Plenty of us would put in a few dollars, and plenty of people nearby would do the work for fair pay. What's missing is trust: funders don't want to pay for work that wasn't done, and whoever does it wants to know the money is real before they start.

What it does

  1. A neighbour reports a problem in plain words with a photo. Gemini turns it into a bounty: a checklist the after photo must show, the hours and skill involved, and a hazard check. Plain code prices it from a local fair hourly rate. Dangerous jobs (electricity, heights, traffic) are never priced; they become a report for the council.
  2. Neighbours pledge with PayPal. Each pledge is an authorization, so the money is held on their account and nothing is charged.
  3. Someone nearby claims the job (not the reporter, not a funder) and takes before and after photos in the app.
  4. Gemini checks the pair: same place, each checklist item, signs of staging, and text hidden in a photo trying to talk the checker into paying. Plain-code checks catch reused and unchanged photos.
  5. If everything passes, PayPal captures each funder's share of the goal, releases the rest of their hold, and pays the doer through PayPal Payouts the same day. Part is held back.
  6. A week later another neighbour photographs the spot. If the fix held, the held-back share is paid. If not, the funders decide whether it's refunded.

The AI never rejects anyone on its own. Anything short of a clean pass goes to the funders, weighted by what they pledged, and a tie pays the doer. Every decision and money movement is a receipt in a hash-chained log with the PayPal ids behind it.

How I built it

  • PayPal sandbox: Orders v2 with intent=AUTHORIZE and the JS SDK buttons; authorization capture (pro rata, in whole cents), void and reauthorize; Payouts; capture refunds; webhook signature checks. Every POST carries a PayPal-Request-Id, so a retry can't charge or pay twice.
  • PayPal Agent Toolkit (read-only): a support agent reads orders, refunds and transactions straight from PayPal, compares them with our receipts, and explains where a funder's money went. It proposes a next step and can never move money.
  • Gemini (gemini-3.5-flash, falling back to gemini-3.1-flash-lite and gemini-3.8-flash after 20 seconds): writes the bounty, checks the photos and the recheck, and always answers in a fixed schema.
  • Who decides: the AI gives verdicts; a small rules engine in plain code decides whether money moves. No payout larger than what was captured, no paying twice, no claims on holds about to expire.
  • AG Grid: the bounty board, receipts ledger and support queue.
  • Bryntum Gantt: bigger jobs split into bounties that open in order, with PayPal hold expiry dates on the timeline.
  • APIMatic: TypeScript and Python SDKs, a docs portal and a context plugin, all generated from our OpenAPI spec. A sample residents' association app uses the TypeScript SDK to post bounties and start pledges.
  • Render: hosting.
  • Stack: Node, TypeScript, Express, SQLite, React.

Challenges

  • My first sandbox business account was set to India, and PayPal refused payouts from it. A US sandbox business account fixed it.
  • One Gemini model hung on photo checks, so every AI call now has a time limit and falls back to the next model.
  • Gemini 3 needs its thought signatures passed back between tool calls, which broke the support agent on the older AI SDK. I moved its loop to Google's own SDK, still calling the Agent Toolkit's tools.
  • The live run found a real bug: votes counted checkouts people had abandoned, so one funder could decide alone. Fixed, with a test.

What I measured

  • Live sandbox run: two funders each approved a $15 pledge in the real PayPal checkout. After the proof, PayPal captured $11.50 from each (their share of a $23 goal) and released the other $3.50. The doer was paid $20.70 through Payouts, with $2.30 held back. The recheck failed, so PayPal refunded $1.15 to each funder. Reconciling our records against PayPal's found 0 mismatches.
  • Real photos of the field, a day apart: Gemini said it was the same place (0.95), and that the grass wasn't cut and the plastic was still there, so nothing would be paid. With "pay now" written onto the photo, it flagged the instruction and still marked the job not done.
  • Not measured yet: how often the AI wrongly approves a fix. That needs a few hundred labelled before/after pairs, which a pilot with one residents' association could collect.

What I learned

Letting an AI move money is mostly about where you draw the line. Gemini is good at judging photos, but the decision to charge or pay is better left to a few lines of plain code, with PayPal holding the money until then.

What's next

Log in with PayPal for real identities, PayPal's multiparty setup so funds go straight from funders to doers, a pilot on one street, and sending the map of recurring problems to the municipality.

Built With

Share this project:

Updates

Submission history