## Inspiration

Chasing late invoices is one of the most frustrating parts of freelancing and running a small business. If you follow up too bluntly, you risk damaging a good client relationship; if you send a generic reminder, it gets buried in their inbox. We built InvoiceNudge to solve both sides of the problem in one workflow: use AI to draft the right message for the exact situation, and attach a working PayPal checkout so the client can pay immediately.

What it does

InvoiceNudge is a full-stack invoice tracking and automated payment recovery web app:

  • Invoice Dashboard: Create client invoices, track due dates, and filter balances by status (Draft, Sent, Overdue, Paid).
  • Tone-Calibrated AI Reminders: Uses Google Gemini (gemini-2.5-flash) to generate tailored payment nudges based on invoice context—scaling from a polite check-in to a firm final notice.
  • PayPal Sandbox Checkout: Integrates PayPal REST APIs directly into the invoice flow so clients can complete checkout and automatically update the invoice status once payment is captured.

How we built it

  • Backend (Node.js & Express): Built the API server (server.js) and core overdue calculation logic (core.js) with JSON-backed storage (data.json).
  • AI Engine (Google Gemini API): Structured prompts around invoice metadata—client name, amount due, due date, days overdue ($\text{Days Overdue} = \max(0, \text{Today} - \text{Due Date})$), and selected tone—so gemini-2.5-flash outputs ready-to-send reminders.
  • Payments (PayPal REST API / Sandbox): Implemented server-side order creation and payment capture verification using PayPal client credentials.
  • Frontend (HTML, CSS, JavaScript): Built a clean single-page dashboard (public/) for creating invoices, generating and copying AI nudges, and testing end-to-end payments.
  • Cloud Deployment (SnapDeploy): Containerized and deployed the production Node.js app with environment-based secret management (GEMINI_API_KEY, PAYPAL_CLIENT_ID, PAYPAL_CLIENT_SECRET) and published the open-source MIT repository on GitHub.

Challenges we ran into

  • Calibrating AI Tone: Early prompts produced stiff, repetitive emails. Passing exact invoice context—such as days overdue and prior status—made the generated reminders sound natural and realistic.
  • Securing Credentials & Syncing Payment State: Keeping Gemini and PayPal keys strictly on the Node.js server while reliably syncing Sandbox order capture back to the frontend required clean API route separation.
  • Free Cloud Container Hosting: Finding a container host that supports full Node.js backends and environment variables without upfront billing took iteration before deploying smoothly on SnapDeploy.

Accomplishments that we're proud of

  • Built a complete, working end-to-end loop—from invoice creation to Gemini AI reminder generation to live PayPal Sandbox checkout—rather than a static mockup.
  • Shipped a live HTTPS production deployment (invoicenudge-b64f9.containers.snapdeploy.app) alongside a clean, MIT-licensed public GitHub repository (hydr016/invoicenudge) with zero leaked secrets.
  • Designed tone tiers that genuinely adapt to invoice aging so users never have to stare at a blank email draft when following up on late payments.

What we learned

  • Giving an LLM structured business context (overdue days, invoice amount, tone tier) yields far better communication than open-ended prompts.
  • Pairing a payment reminder with a direct PayPal checkout path removes friction and speeds up payment collection.
  • Deploying a full-stack Node.js + AI + payments app requires disciplined separation between source code and runtime environment configuration.

What's next for InvoiceNudge

  • Automated Email & Webhook Delivery: Connect SMTP/SendGrid and PayPal Webhooks so scheduled nudges send automatically and invoice statuses update in real time without manual refreshes.
  • Persistent Cloud Database: Migrate storage from local data.json to PostgreSQL or MongoDB for multi-user accounts and long-term audit logs.
  • Multi-Currency & Recurring Invoices: Add automated recurring billing schedules and localized currency formatting for international freelance clients.Inspiration
Share this project:

Updates

Submission history