Skip to content

About

Fill in a form, get a clean PDF invoice. Your business details stay on your machine.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

Invoice Generator

A small Next.js app for freelancers and small studios. Fill in one form and get a clean PDF invoice with tax worked out. Every invoice also gets saved on your machine, sorted by year.

It runs locally. Your business details, clients and invoices never leave your computer and never go into git.

What it does

  • One form for client details, project, dated line items (hours × rate), notes and a tax rate
  • Totals in USD, plus the CAD equivalent at an exchange rate you set
  • GST/HST number on every invoice, so it's ready for Canadian clients
  • Downloads the PDF and saves a copy to Invoices/<year>/<invoice-number>_<client>.pdf
  • Keeps your draft in the browser while you work, and lets you save named sessions to reuse for repeat clients

Requirements

  • Node.js 20 or later
  • npm

Setup

git clone https://github.com/bhaumikkaji/InvoiceGenerator.git
cd InvoiceGenerator
npm install
npm run setup

npm run setup asks for your business details one at a time and saves them to company.json. You can also copy company.example.json to company.json and edit it by hand. The fields are:

Field What goes there
name Your business name, shown at the top and bottom of the invoice
tagline One line under the name, e.g. "Design & Creative Services"
address, city Your business address
email, phone How clients reach you
gstHstNumber Your GST/HST registration number
invoicePrefix Code at the start of each invoice number, e.g. INV gives INV-2610-123

company.json is gitignored. Until it exists the app uses placeholders and shows a reminder banner. Run npm run setup again any time to change your details.

Run it

npm run dev

Open http://localhost:3000, fill in the form and click Generate. The PDF downloads, and a copy lands in Invoices/.

For a faster production build:

npm run build
npm start

Customizing the invoice

  • Layout and colors: src/lib/InvoicePDF.tsx (built with @react-pdf/renderer)
  • Tax and currency maths: src/lib/calculations.ts
  • Invoice number format and default due date (30 days): src/lib/constants.ts

License

MIT

About

Fill in a form, get a clean PDF invoice. Your business details stay on your machine.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages