A modern, professional invoice generator built with Next.js 15, React 19, TypeScript, and Tailwind CSS. This web application converts the original Python CLI invoice maker into a beautiful, user-friendly web interface.
- 🎨 Modern UI: Clean, responsive design with Tailwind CSS
- 📝 Form Validation: Comprehensive validation using react-hook-form and Zod
- 📄 PDF Generation: High-quality PDF invoices with improved layout
- 👀 Live Preview: Real-time PDF preview as you edit
- 💾 Instant Download: Download generated PDFs immediately
- 💰 Multi-Currency: Support for multiple currencies (USD, EUR, GBP, JPY, INR)
- 🧮 Auto Calculations: Automatic subtotal, tax, discount, and total calculations
- 📱 Responsive: Works perfectly on desktop, tablet, and mobile devices
- Invoice ID Display: Shows invoice ID next to the title in the PDF
- Reduced Title Size: Smaller, more professional title font size
- Web Interface: No more command-line interaction needed
- Live Preview: See your invoice as you create it
- Better UX: Form validation, auto-calculations, and error handling
- Framework: Next.js 15 (Page Router)
- Frontend: React 19
- Language: TypeScript
- Styling: Tailwind CSS
- Form Handling: react-hook-form
- Validation: Zod
- PDF Generation: jsPDF
- Build Tool: SWC
- Node.js 18.0.0 or later
- npm or yarn
-
Install dependencies:
npm install
-
Run the development server:
npm run dev
-
Open your browser and navigate to
http://localhost:3000
# Build the application
npm run build
# Start the production server
npm start- Fill out the invoice form with your business information and client details
- Add invoice items with descriptions, quantities, and rates
- Add discounts if applicable
- Set tax rate and currency
- Generate PDF and see the live preview
- Download the PDF when you're satisfied
- Invoice ID (auto-generated or custom)
- Invoice Date
- Due Date
- Tax Rate (%)
- Currency Selection
- Company Name (required)
- Contact Person
- Complete Address
- Phone, Email, Tax ID
- Company Name (required)
- Contact Person
- Complete Address
- Phone, Email, Tax ID
- Description (required)
- Quantity (required)
- Rate (required)
- Automatic total calculation
- Add/remove items dynamically
- Description
- Amount
- Add/remove discounts dynamically
The generated PDF includes:
- Professional header with invoice ID
- Complete billing information
- Itemized list with calculations
- Tax calculations
- Professional footer
- Responsive layout
npm run dev- Start development servernpm run build- Build for productionnpm start- Start production servernpm run lint- Run ESLintnpm run type-check- Run TypeScript type checking
src/
├── components/ # React components
│ ├── forms/ # Form components
│ ├── ui/ # UI components
│ └── PDFPreview.tsx # PDF preview component
├── lib/ # Utility libraries
│ ├── services/ # Services (PDF generation)
│ ├── utils/ # Utility functions
│ └── validations/ # Zod schemas
├── pages/ # Next.js pages
├── styles/ # Global styles
└── types/ # TypeScript types
- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add some amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
This project is open source and available under the MIT License.
If you encounter any issues or have questions, please create an issue in the repository.
Built with ❤️ using Next.js, React, and TypeScript