Inspiration

What it does

How we built it

Challenges we ran into

Accomplishments that we're proud of

What we learned

What's next for Main Street

Inspiration

The most common answer I saw in this hackathon to "can I trust an AI with my money?" was spending limits and approval screens. I wanted to try the other answer: let people watch. A shop owner trusts the person at the counter because they can see them work. So I drew the PayPal account as a street and made every AI action a person walking somewhere.

What it does

  • Shows a PayPal account as a town. Each customer is a person, placed by their latest invoice: overdue on the left with a red mark, open by the post office, paid outside the bakery.
  • Click a person to get their invoice: amount, due date, PayPal's QR code and pay link.
  • Tell Mira, the manager, what you want in plain English. "Chase everyone overdue over $50" sends one PayPal reminder per matching invoice, and Ava the accountant walks to each customer as it goes out.
  • Mira can also create and send an invoice, or record a payment.
  • When PayPal marks an invoice paid, that customer walks into the bakery, fireworks go off, and the vault's total goes up.

How I built it

  • App: Next.js 15 and React 19 on Vercel. The town is one HTML canvas drawn entirely in code, with no game engine and no image files.
  • PayPal: the Agent Toolkit gives Mira her tools: create, send, remind, record payment and QR code for invoices, plus orders, shipment tracking, products and reports. The Invoicing v2 API feeds the town, polled every 4 seconds.
  • AI: Claude Haiku 5.5 through the Anthropic SDK, in a tool loop. The current invoice list goes into the prompt, so "chase everyone over $50" becomes the right tool calls in one step.
  • Safety: delete, cancel and refund are switched off in the toolkit config. The demo is public and those can't be undone.

Challenges I ran into

  • PayPal won't send invoices to India-based accounts, and my sandbox buyer was Indian (INR_FOREIGN_CURRENCY_BLOCKED). I added "Paid in cash", which records a payment on the invoice through PayPal, so the payment moment works without a buyer login.
  • An agent can't approve a PayPal payment without a person, and webhooks need a public URL during development. I poll instead. Four seconds is short enough that the walk-in feels immediate.
  • The toolkit ships tool definitions shaped for OpenAI. Claude takes the same JSON Schema under a different key, so the adapter is five lines.

Accomplishments that I'm proud of

  • Nothing on screen is faked. Every person is an invoice in the sandbox, every reminder is a real API call, and the fireworks only fire when PayPal says the invoice is paid.
  • The whole scene (buildings, people, fireworks, the passing van) is under 400 lines of canvas code.
  • It works on a phone.

What I learned

  • Giving the model the current state up front beats making it look things up. Mira rarely needs a "list invoices" call.
  • A small model at low effort is enough when the tools are well described. Replies come back in a few seconds.
  • PayPal's invoice list leaves out the payer link, and a successful reminder returns an empty 204. Both cost me time until I tested against the sandbox instead of reading docs.

What's next for Main Street

  • Webhooks instead of polling.
  • Disputes and shipment tracking as town events. Cole the courier is already standing outside the post office.
  • An approval step before anything that moves money, for use outside the sandbox.

Built With

Share this project:

Updates

Submission history