PROJECT / 0413 Jan 2025 — 18 March 2025

SmartInvoice

Create an invoice, generate a PDF, and get it ready to send.

SmartInvoice landing page
SmartInvoice landing page

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

System architecture
100%

Scroll to explore the connections, or use Fit to see the full diagram.

One Next.js application, with PDF and email branchesNext.js route handlers use Neon SQL for invoices, jsPDF for documents, and Nodemailer for invoice delivery over SMTP.Invoice editorGuest or accountPreview / download / sendNext.js API routesAuth / guest checksInvoice CRUDNeon PostgreSQLInvoices + customersStatus + emailSentjsPDF generatorInvoice → PDF bytesDownload or attachmentNodemailerSMTP transportPDF attachmentRecipient inboxInvoice emailAttached PDFInvoice APINeon SQLGenerate PDFPDF downloadAttach bytesSMTP sendUpdate status

One Next.js application, with PDF and email branches

  1. Invoice route handlers validate an authenticated user or guest and read/write invoices through the Neon SQL database service.
  2. The PDF route generates bytes with jsPDF for download. The send route generates the same document as an email attachment.
  3. Nodemailer sends through configured SMTP, then the route records emailSent and invoice status in PostgreSQL.

SmartInvoice · System architecture

Component responsibilities
  1. Next.js route handlers

    Invoice APIs validate an authenticated user or guest, then call the Neon SQL database service for invoice and customer records.

  2. PDF generation

    jsPDF builds invoice PDF bytes for download and email attachments inside the Next.js application.

  3. 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

  1. Invoice creation

    A focused interface helps users enter invoice information and prepare the document.

  2. PDF generation

    Generate a PDF from the invoice data for downloading and sharing.

  3. Account & delivery workflows

    JWT authentication supports account access, while email dispatch handles sending invoices.

More projects

View all
GitHub
LinkedIn
X