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 Invoice Copilot

Inspiration

Freelancers lose time turning "12 hours at $50 plus a $150 logo, 6% tax" into a formal invoice and a payment link. I wanted to make that one step.

What it does

Invoice Copilot takes a plain-English description of a job and returns a finished invoice with exact totals, then creates a PayPal Orders v2 checkout in the PayPal sandbox and returns an approval link. An optional AI step reads the free text and extracts the client, line items, tax and due date. Without any keys it runs in dry-run mode and shows the exact PayPal request it would send, so anyone can try it.

How I built it

Node.js with no dependencies. All money is computed in integer cents so totals are exact. The AI step uses any OpenAI-compatible chat endpoint. Its output is treated as untrusted: it is validated, and a deterministic built-in parser takes over if the model fails. PayPal is called through OAuth client credentials and the Orders v2 API with an itemized breakdown and tax. A test makes sure only the PayPal sandbox host is ever called.

Challenges

Serving the HTML page was returning JSON because of a Buffer bug, and a stray word "at" was being used as a line-item label. Both were caught by tests and live checks and fixed, with a regression test added.

What I learned

Treating model output as untrusted input and keeping a deterministic fallback makes an AI feature much safer for anything involving money.

What's next

Real sandbox order testing with live keys, saved clients, PDF invoices and an agent that sends reminders.

Run it

node src/server.js, then open http://127.0.0.1:3000. Tests: node --test (12 passing).

Built With

Share this project:

Updates

Submission history