SmartInvoice
Create an invoice, generate a PDF, and get it ready to send.
Overview
SmartInvoice is a full-stack invoice management application with a minimalist interface for invoice creation. The application combines JWT authentication, RESTful APIs, PostgreSQL storage, dynamic PDF generation, and automated email dispatch into an invoicing workflow.
Architecture
Scroll to explore the connections, or use Fit to see the full diagram.
One Next.js application, with PDF and email branches
- Invoice route handlers validate an authenticated user or guest and read/write invoices through the Neon SQL database service.
- The PDF route generates bytes with jsPDF for download. The send route generates the same document as an email attachment.
- Nodemailer sends through configured SMTP, then the route records emailSent and invoice status in PostgreSQL.
Component responsibilities
Next.js route handlers
Invoice APIs validate an authenticated user or guest, then call the Neon SQL database service for invoice and customer records.
PDF generation
jsPDF builds invoice PDF bytes for download and email attachments inside the Next.js application.
Email delivery
The invoice send route uses Nodemailer with configured SMTP, then records emailSent and status in PostgreSQL.
Why I built this
I wanted to make invoice creation feel like one clear workflow, from entering the information to preparing a document for delivery. It was also an opportunity to connect authentication, relational data, PDFs, and email in a full-stack application.
Use case
A freelancer or small business can prepare an invoice, generate a PDF, and download or send it through the application's delivery workflow.
What I learned
- Designing an invoice workflow across a Next.js interface, REST API, and PostgreSQL data layer.
- Turning structured application data into a PDF document.
- Connecting authentication and email dispatch to the rest of a product workflow.
Key features
Invoice creation
A focused interface helps users enter invoice information and prepare the document.
PDF generation
Generate a PDF from the invoice data for downloading and sharing.
Account & delivery workflows
JWT authentication supports account access, while email dispatch handles sending invoices.


