Best Tech Stack for an Invoice / Billing Tool as a Solo Developer
The best tech stack for building an invoice / billing tool as a solo developer - frameworks, databases, hosting, and tools.
Best Tech Stack for an Invoice / Billing Tool as a Solo Developer
Invoicing is a problem every freelancer, contractor, and small business faces. FreshBooks, Wave, and Invoice Ninja have proven the market, but there's still room for focused, niche invoicing tools: invoicing for specific industries, subscription billing management, or stripped-down tools for freelancers who find QuickBooks overwhelming. The technical challenge is building clean document generation, payment integration, and financial reporting without the bloat.
Here's the stack that lets you build a professional invoicing tool solo.
Recommended Stack at a Glance
| Layer | Pick |
|---|---|
| Frontend | Next.js (React) |
| Backend | Next.js API routes + tRPC |
| Database | PostgreSQL (via Prisma) |
| PDF Generation | React-PDF (@react-pdf/renderer) |
| Payments | Stripe |
| Resend | |
| Hosting | Vercel |
| File Storage | Cloudflare R2 |
Frontend: Next.js
An invoicing tool is a classic CRUD application with a few twists: invoice creation with a visual preview, client management, reporting dashboards, and a public payment page for clients.
Next.js (latest stable 16.2.6, roughly 139,600 GitHub stars and about 40 million npm downloads a week as of late May 2026) handles all of these:
- Dashboard - Overview of outstanding invoices, revenue charts, recent activity
- Invoice editor - Line items, taxes, discounts, notes, branding
- Client portal - Public pages where clients view and pay invoices
- Reports - Revenue over time, outstanding amounts, payment aging
For the invoice editor, build a form-based UI rather than a visual drag-and-drop builder. Invoices have a standard structure: header (logo, company info), client details, line items table, subtotals/taxes/discounts, and footer notes. A well-designed form that shows a live preview alongside it is faster to use than a free-form editor.
The live preview should render identically to the final PDF. Use the same component for both the on-screen preview and PDF generation.
Backend: Next.js API Routes + tRPC
Your backend handles standard CRUD operations plus some invoicing-specific logic:
- Invoice numbering - Auto-generate sequential invoice numbers (INV-001, INV-002)
- Tax calculations - Apply tax rates correctly with rounding
- Recurring invoices - Generate and send invoices on a schedule
- Payment processing - Accept payments via Stripe payment links
- Overdue tracking - Flag overdue invoices and trigger reminder emails
- Multi-currency - Store amounts in the invoice currency with exchange rates
tRPC (latest stable 11.17.0, roughly 40,300 GitHub stars, @trpc/server pulling about 3.5 million npm downloads a week as of late May 2026) keeps your frontend and backend type-safe. Invoice line item calculations (quantity x rate, subtotals, tax, discounts) need to be precise. Shared TypeScript types between frontend and backend prevent mismatches.
Important: Store all monetary values as integers (cents), not floats. $149.99 becomes 14999. This prevents floating-point rounding errors that cause invoice totals to be off by a cent.
Database: PostgreSQL + Prisma
Invoicing data is highly relational: clients have invoices, invoices have line items, invoices have payments, payments link to transactions. PostgreSQL handles this naturally.
Core schema:
users- Business owner accounts with company detailsclients- Client contact info, billing address, default currencyinvoices- Invoice number, client, status (draft/sent/paid/overdue), due_date, totalsline_items- Description, quantity, unit_price, tax_rate, amountpayments- Amount, method, transaction_id, paid_atrecurring_schedules- Frequency, next_send_date, template_invoice
Prisma (latest stable 7.8.0, roughly 46,000 GitHub stars, about 11.6 million npm downloads a week as of late May 2026) provides clean migrations and type-safe queries. Host on Neon or Supabase. Neon's Free plan gives you 0.5 GB of storage and 100 compute-hours per project per month, which is plenty for an early-stage invoicing SaaS; its first paid tier (Launch) switches to usage-based billing at about $0.35 per GB-month of storage and $0.106 per compute-hour, with no fixed monthly minimum (check current pricing before you commit, since Neon's tiers shift).
One schema tip: store calculated totals (subtotal, tax_total, discount_total, grand_total) on the invoice record itself, not just on line items. This makes reporting queries fast and ensures the total shown to the client never changes after the invoice is sent, even if you later change tax rates in your settings.
PDF Generation: React-PDF
Generating professional-looking invoices as PDFs is a core feature. @react-pdf/renderer (latest stable 4.5.1, the react-pdf project sits at roughly 16,600 GitHub stars and the renderer package pulls about 3.4 million npm downloads a week as of late May 2026) lets you define PDF layouts using React components. Same mental model as building UI, but the output is a PDF.
This is the right approach for several reasons:
- You can share styles and components between the web preview and PDF
- React-PDF runs on the server (generate PDFs in API routes)
- It supports custom fonts, logos, colors, and complex layouts
- No external PDF API service needed (no per-document costs)
Generate PDFs on-demand when a user downloads an invoice or when you need to email one. Store the generated PDF in Cloudflare R2 for quick re-downloads. R2 is well suited to this because it charges no egress fees, so re-downloads are free regardless of volume. As of late May 2026, R2 standard storage is $0.015 per GB-month, Class A operations (writes) cost $4.50 per million requests, and Class B operations (reads) cost $0.36 per million requests. The free tier covers 10 GB-month of storage, 1 million Class A requests, and 10 million Class B requests per month, so a young product often pays nothing for R2 at all.
For the client-facing payment page, render the invoice as HTML (not PDF) so clients can view it on any device without downloading a file. Include a "Download PDF" button for their records.
Payments: Stripe
Stripe (the official stripe Node SDK is at 22.2.0 with about 11.9 million npm downloads a week as of late May 2026) handles the payment collection from clients. When a user sends an invoice, include a payment link that opens a Stripe Checkout session for the invoice amount.
Stripe's standard US rate is 2.9% plus 30 cents per successful card charge, with surcharges for manually entered cards (+0.5%), international cards (+1.5%), and currency conversion (+1%). Build your fee math against those numbers, since for a $1,000 invoice the processing fee is about $29.30 and your users will want to see it.
The flow:
- Business owner creates and sends invoice
- Email contains a link to the invoice payment page
- Client clicks "Pay Invoice" on the page
- Stripe Checkout opens with the invoice amount
- Client pays with card, Apple Pay, bank transfer, etc.
- Webhook fires, your app marks the invoice as paid
- Both parties get confirmation emails
Use Stripe Connect if you want to process payments on behalf of your users (your platform facilitates the payment). This lets you take a small platform fee per transaction, which is an additional revenue stream beyond subscriptions.
Email: Resend
Invoicing is an email-heavy product. You'll send:
- Invoice delivery (with PDF attached or payment link)
- Payment confirmations
- Overdue reminders (automated sequences: 1 day, 7 days, 14 days past due)
- Recurring invoice notifications
Resend with React Email templates gives you beautiful, consistent transactional emails. Build your email templates with React components (same pattern as the rest of your app) and send via Resend's API. The resend Node SDK is at 6.12.4 and the open-source react-email package (roughly 19,300 GitHub stars, about 2.2 million npm downloads a week) is at 6.5.0 as of late May 2026. Resend's Free plan covers 3,000 emails a month capped at 100 a day, and its first paid tier (Pro) is $20 a month for 50,000 emails, then about $0.90 per additional 1,000.
The automated reminder sequence is a key feature. Set up a cron job (Vercel Cron or a simple setInterval on a Railway worker) that checks for overdue invoices daily and sends escalating reminders.
Nice-to-Haves
- Multi-currency support with exchange rate API (exchangerate.host, free)
- Stripe for your own SaaS billing (separate from invoice payments)
- Time tracking integration - Log hours and generate invoices from tracked time
- Expense tracking - Attach receipts and track business expenses
- Financial reports - Profit/loss, accounts receivable aging, revenue by client
- Zapier/Make webhooks for integrations with accounting software
Monthly Cost Breakdown
All figures below were checked on 2026-05-30. Vendor pricing moves, so reconfirm before you budget.
| Service | Cost |
|---|---|
| Vercel (Pro) | $20/month per seat, includes $20 of usage credit |
| Neon Postgres (Free plan) | $0 (0.5 GB storage, 100 compute-hours/month) |
| Cloudflare R2 (PDFs) | $0 under free tier (10 GB-month, no egress fees), then $0.015/GB-month |
| Resend (Free plan, 3k emails/mo, 100/day) | $0 |
| Stripe | 2.9% + 30c per successful US card charge |
| Domain | ~$1/month (varies by registrar and TLD) |
| Total | ~$21/month + Stripe fees, until you outgrow the free tiers |
Stripe fees are paid by your users' clients (or absorbed by your users), not by you. Your SaaS costs are just the dashboard hosting and database. Note that the Vercel Pro plan is $20 per seat per month and ships with $20 of monthly usage credit, so a solo developer effectively pays the $20 base until traffic pushes past that credit.
Common Errors and Fixes
A few sharp edges show up almost every time you build this exact stack. Knowing them in advance saves an afternoon each.
Stripe webhook signature verification fails in the Next.js App Router. The cause is almost always reading the request body with req.json(). Stripe computes the signature against the exact raw bytes it sent, and parsing to JSON discards them. In an App Router route handler, read the body with await req.text() and pass that raw string into stripe.webhooks.constructEvent(). Pull the signature from the headers with headers().get('stripe-signature'). Stripe's own troubleshooting docs confirm that any reformatting of the body (whitespace, key reordering, re-encoding) breaks verification.
React-PDF throws "Font family not registered" in production but works locally. Custom fonts registered with Font.register() do not behave well inside React Server Components, and the failure often appears only in production or staging rather than on your machine. Register fonts from a client component or a dedicated module that runs before render, and use Font.load() with async/await so the font is fully fetched before the document renders. If you register multiple times, call Font.clear() first to avoid stale state. These behaviors are documented across the react-pdf repository's open issues.
Invoice totals end up off by a cent. This is the floating-point trap. Store every monetary value as an integer number of cents (so $149.99 is 14999) and only divide by 100 at display time. Do all tax, discount, and subtotal math in integer cents. This is also why the schema keeps a frozen grand_total on the invoice record rather than recomputing it from line items on every read.
Neon free-tier compute keeps "sleeping." Neon's Free plan caps compute-hours per project, and idle databases scale to zero. The first request after idle pays a cold-start penalty. For an invoicing dashboard that is fine, but if a client payment page feels slow on first load, that cold start is usually why. Confirm your current compute-hour allowance on Neon's pricing page, since the Free plan limits move.
Sources
All sources checked on 2026-05-30.
- Next.js version and downloads: registry.npmjs.org/next/latest, api.npmjs.org/downloads/point/last-week/next, github.com/vercel/next.js
- tRPC version, stars, downloads: registry.npmjs.org/@trpc/server/latest, github.com/trpc/trpc
- Prisma version, stars, downloads: registry.npmjs.org/prisma/latest, github.com/prisma/prisma
- React-PDF version, stars, downloads, font issues: registry.npmjs.org/@react-pdf/renderer/latest, github.com/diegomura/react-pdf, react-pdf.org/fonts
- Resend and React Email versions, stars, downloads, pricing: registry.npmjs.org/resend/latest, github.com/resend/react-email, resend.com/pricing
- Stripe SDK version, downloads, pricing: registry.npmjs.org/stripe/latest, stripe.com/pricing, docs.stripe.com/webhooks/signature
- Vercel Pro plan pricing: vercel.com/pricing
- Neon Postgres pricing: neon.com/pricing
- Cloudflare R2 pricing: developers.cloudflare.com/r2/pricing
Conclusion
The best stack for a solo developer building an invoice tool: Next.js with tRPC for the full-stack application, PostgreSQL with Prisma for financial data, React-PDF for document generation, Stripe for payment collection, Resend for email delivery, and Vercel for hosting.
The key to a successful invoicing tool is simplicity. Freelancers and small businesses choose tools like Wave and Invoice Ninja because QuickBooks is too complex. Focus on the core loop: create invoice, send to client, get paid, track the payment. Make that loop as fast and frictionless as possible. Every feature you add beyond that should make the core loop easier, not add complexity. Resist the urge to build a full accounting suite.
Like this? You'll like what I'm building too.
Two ways to support and get more of this work.
HEARTH
A privacy-first Life OS for your desktop. Journal, tasks, and notes that stay on your machine. Coming soon, direct download from this site.
Read moreMY TOOLKITS
Receipts-first toolkits for shipping after hours, building Claude agents, publishing on Amazon, and more. The exact methods I used, not theory.
Browse on WhopRelated Articles
AI Wrapper Stack Guide for Solo Developers
Complete guide to the AI wrapper stack - when to use it, setup, pros/cons, and alternatives.
Best Tech Stack for Building an AI Wrapper as a Solo Developer
The ideal tech stack for solo developers building an AI wrapper in 2026.
Best Tech Stack for an Analytics Dashboard as a Solo Developer
The best tech stack for building an analytics dashboard as a solo developer - frameworks, databases, hosting, and tools.