A modern Invoice Generator built with Next.js 15, Auth.js, Tailwind CSS, and Mailtrap. This project allows businesses and freelancers to create, manage, and send invoices seamlessly with features like email verification, magic links, and custom PDF generation.
Important
A big shoutout to Jan Marshal for this amazing project idea
- Next.js 15 – Framework for building the application
- Tailwind CSS v4 – For responsive UI and styling
- Auth.js – Authentication with email magic links
- Mailtrap (Nodemailer) – Email testing and delivery
- PDFKit / Custom Template – Generate real PDFs for invoices
- Implemented with Auth.js
- Email magic links with Mailtrap
- Custom verification route
- Collects Name and Address before creating invoices
- Clean and responsive layout
- Index route includes analytics with animated charts
-
Create Invoice
- Send email to client on completion
- Custom invoice template (from scratch)
- Generate a real PDF and attach via link
-
Edit Invoice
- Send update email to client
- Custom template via HTML Builder
-
Reminder Emails
- Send automated reminders via Mailtrap templates
-
Other Invoice Actions
- Download invoice (PDF)
- Delete invoice
- Mark invoice as Paid
- Streaming with a beautiful skeleton UI
- Deployed on Vercel
git clone https://github.com/IFTE-13/invoiceg.git
cd invoicegpnpm installCreate a .env.local file in the root of your project and add:
AUTH_SECRET=""
EMAIL_SERVER_USER=
EMAIL_SERVER_PASSWORD=
EMAIL_SERVER_HOST=live.smtp.mailtrap.io
EMAIL_SERVER_PORT=
EMAIL_FROM=
DATABASE_URL=""
MAILTRAP_TOKEN=""pnpm run devThis project uses Mailtrap for testing emails in a safe environment.
- Go to Mailtrap and create a free account.
- Create a new Inbox (or use the default one).
- Inside the Inbox, go to SMTP Settings → choose Node.js (Nodemailer).
- Copy the credentials provided (username & password).
- Add them to your
.env.localfile.
Contributions are welcome! To contribute:
- Fork the repository
- Create a new branch (git checkout -b feature/YourFeature)
- Make your changes and commit (git commit -m "Add new feature")
- Push the branch (git push origin feature/YourFeature)
- Open a Pull Request
Caution
This project is licensed under the MIT License. Feel free to use and modify the code as per the terms of the license.