DEV Community

Ayodeji
Ayodeji

Posted on

How I Built an AI Invoice Generator with Groq, AWS DynamoDB, and Vercel v0

I built InvoiceAI an AI powered invoice generator that lets you describe
what you want to invoice in plain English and get a fully formatted invoice
in seconds, complete with PDF download and a real payment link.

Here's how I built it for the #H0Hackathon.

The Problem

Freelancers and small businesses waste time manually creating invoices.
You know what you did, who you did it for, and how much it costs
you shouldn't have to fill out a form to capture that.

The Stack

-Vercel v0 — scaffolded the entire UI in one prompt

  • Next.js 16 — framework
  • Groq (Llama 3.3 70B) — AI natural language to invoice fields
  • AWS DynamoDB — stores every generated invoice
  • Paystack — generates real payment links
  • jsPDF — client-side PDF generation
  • Vercel — deployment

How It Works

  1. User types: "50 hours of mobile app development at $80/hr for TechLagos Ltd, 7.5% VAT"
  2. Groq parses the text and extracts structured invoice data
  3. Live preview updates instantly
  4. User downloads PDF — invoice is saved to DynamoDB automatically
  5. One click generates a real Paystack payment link to send to the client

Building the UI with v0

I used Vercel v0 to scaffold the entire UI in one prompt. It generated
a production-ready Next.js component with a split-panel layout
form on the left, live invoice preview on the right.
I just had to wire up the AI and database logic.

Connecting AWS DynamoDB

Using the AWS SDK v3, I connected DynamoDB directly from Next.js server actions.
Every time a user downloads an invoice, it's saved to DynamoDB with the client
details, line items, tax rate, and timestamp. This gives the app a real
data foundation that scales from day one.

await dynamo.send(new PutCommand({
  TableName: 'invoices',
  Item: {
    invoiceId: data.invoiceNumber,
    clientName: data.clientName,
    clientEmail: data.clientEmail,
    items: data.items,
    createdAt: new Date().toISOString(),
  },
}))
Enter fullscreen mode Exit fullscreen mode

The Result

  • AI generates invoice from plain English in under 2 seconds
  • Real PDF download (no print dialog)
  • Real Paystack payment link generation
  • Every invoice stored in DynamoDB

Live demo: https://invoiceai-brown.vercel.app
GitHub: https://github.com/LrdSantan/invoiceai

This was built for the #H0Hackathon AWS Databases + Vercel v0.

Built by Ayodeji full stack engineer and founder of Tixora.

Top comments (0)