InvoiceGen is a powerful, open-source invoice management platform that simplifies how businesses handle their invoicing workflows. Upload, create, organize, extract data with AI, and share invoices effortlesslyβall in one place.
π Self-hostable β’ π€ AI-powered β’ π§ Email integration β’ π File organization β’ π Privacy-focused
- Drag & Drop Interface - Intuitive file upload with visual feedback
- Multiple Format Support - PDF, PNG, JPG, JPEG, and WebP files
- Cloud Storage - Secure storage powered by Cloudflare R2
- Instant Preview - View invoices immediately after upload
- File Size Validation - Automatic checks to ensure optimal performance
- Automatic Data Extraction - Extract invoice details using Google's Gemini AI
- Smart Field Recognition - Automatically identifies:
- Invoice number and date
- Billing and vendor information
- Line items with prices and quantities
- Payment details (account, IFSC, UPI)
- Contact information
- Total amounts and currency
- Background Processing - AI extraction runs without blocking your workflow
- Email Notifications - Get notified when extraction is complete
- Free & Unlimited Options - One free extraction, or unlimited with your own API key
- Custom AI Integration - Add your personal Gemini API key for unlimited extractions
- Professional Templates - Create beautiful invoices with a clean, business-focused design
- Dynamic Item Management - Add unlimited line items with automatic calculations
- Real-time Preview - See your invoice as you build it
- A4 Print-Ready - Perfect formatting for printing and PDF export
- Auto PDF Generation - Invoices automatically saved as PDFs
- Edit Anytime - Full editing capabilities for manually created invoices
- Smart Pagination - Automatically handles multi-page invoices
- Nested Folder Structure - Organize invoices like Google Drive
- Unlimited Groups - Create folders within folders for perfect organization
- Drag & Move - Easily move invoices between groups
- Smart Breadcrumbs - Always know where you are in your folder structure
- Folder Management - Create, rename, and delete folders with ease
- Invoice Count Display - See how many invoices are in each folder at a glance
- Safe Deletion - Choose to move or permanently delete invoices when removing folders
- At-a-Glance Statistics - View total invoices, storage usage, and activity
- Group Navigation - Browse your organized folder structure
- Quick Actions - Upload, create, or manage invoices from anywhere
- Real-time Updates - Invoice counts update automatically
- Responsive Design - Works beautifully on desktop, tablet, and mobile
- Send via Email - Share invoices directly from the platform
- Custom Headers - Professional sender names and reply-to addresses
- Email Preview - Real-time preview of how emails will look in Gmail
- Custom Messages - Personalize email subject and body
- PDF Attachments - Invoices sent professional PDF files
- Right-Click Menu - Quick access to send options from invoice list
- Custom SMTP Support - Use your own email server for sending
- Gmail Integration - Built-in support for Gmail SMTP
- 40MB Storage Limit - Generous storage for all your invoices
- Usage Tracking - Monitor your storage consumption
- Secure Authentication - Powered by Better Auth
- OAuth Support - Sign in with Google, GitHub, or email
- User Isolation - Each user's data is completely private
- Presigned URLs - Secure file uploads and downloads
- Ownership Verification - Every action is verified for security
- User Information - View and update your profile details
- Detailed Statistics - Track invoices, storage, and activity
- Monthly Insights - See invoices created this month
- AI Settings - Manage your Gemini API key for unlimited extractions
- SMTP Configuration - Add custom email server settings with header customization
- Account Information - View login method and member since date
Right-click on any invoice to:
- View full details
- Quick preview
- Download to your device
- Send via email
- Move to a different folder
- Delete permanently
- Smooth Animations - Polished interactions throughout
- Loading States - Clear feedback for all actions
- Toast Notifications - Instant success and error messages
- Responsive Tables - Perfect on any screen size
- Keyboard Shortcuts - Power user features
- Dark Mode Ready - Theme support built-in
- Side-by-Side View - PDF/image on left, extracted data on right
- Folder Navigation - Browse other folders without leaving the page
- Action Buttons - Download, edit, or extract with one click
- Extracted Data Display - Beautiful cards showing all invoice information
- Status Indicators - See extraction status at a glance
- Edit Support - Modify manually created invoices
- PostgreSQL Database - Reliable, scalable data storage
- Cloudflare R2 - Fast, global file storage
- Structured Storage - Organized by user ID and invoice ID
- Automatic Cleanup - Files deleted when invoices are removed
- Local Preferences - API keys and SMTP settings stored locally
# Clone the repository
git clone https://github.com/hetref/invoicegen.git
cd invoicegen
# Install dependencies
npm install
# Set up environment
cp .env.example .env
# Edit .env with your configuration
# Run database migrations
npx prisma migrate deploy
npx prisma generate
# Start development server
npm run devCreate a .env file with your settings:
# Database
DATABASE_URL="postgresql://user:password@localhost:5432/invoicegen"
# Storage (Cloudflare R2 or AWS S3)
CLOUDFLARE_R2_ACCESS_KEY_ID="your_access_key"
CLOUDFLARE_R2_SECRET_ACCESS_KEY="your_secret_key"
CLOUDFLARE_R2_BUCKET_NAME="invoices"
CLOUDFLARE_R2_ACCOUNT_ID="your_account_id"
CLOUDFLARE_R2_ENDPOINT="https://your-account.r2.cloudflarestorage.com"
# AI Features (Optional - provides 1 free extraction per user)
GEMINI_API_KEY="your_gemini_api_key"
# Email Features (Optional)
GMAIL_EMAIL="your-email@gmail.com"
GMAIL_APP_PASSWORD="your_app_password"
# Authentication
BETTER_AUTH_SECRET="your_random_secret_key_here"
BETTER_AUTH_URL="http://localhost:3000"Visit http://localhost:3000 and start managing your invoices!
Deploy instantly to Vercel:
- Total Limit: 40MB per user
- Smart Validation: Checks before upload and creation
- Real-time Tracking: See usage in your profile
- Efficient Storage: Only stores necessary data
- Free Tier: 1 extraction per user
- Unlimited: Add your own Gemini API key
- Smart Detection: Extracts all invoice fields automatically
- Error Handling: Clear messages for any issues
- Model Display: See which AI model is being used
- Professional Design: Clean, business-appropriate templates
- Dynamic Forms: Add/remove items as needed
- Automatic Calculations: Totals computed in real-time
- PDF Export: High-quality A4 PDFs generated automatically
- Edit History: Modify invoices after creation
- Flexible SMTP: Use Gmail or your own server
- Custom Templates: Personalize subject and message
- Attachment Support: Invoices sent as PDFs
- Send from List: Quick access from invoice table
- Context Menu: Right-click to send
- Frontend: Next.js 15, React, TypeScript
- UI Components: Shadcn UI, Tailwind CSS
- Database: PostgreSQL with Prisma ORM
- Storage: Cloudflare R2 (S3-compatible)
- Authentication: Better Auth (OAuth + Email)
- AI: Google Gemini API
- Email: Nodemailer with multiple SMTP providers
- PDF Generation: jsPDF with html2canvas
- Deployment: Docker-ready, Vercel-compatible
- π Modern: Built with latest stable technologies
- π Universal: Works on any cloud provider or server
- π§ Self-hostable: No vendor lock-in or recurring costs
- π± Responsive: Works on desktop, tablet, and mobile
- β‘ Fast: Optimized for performance and SEO
- π Secure: Enterprise-grade security practices
- Create professional invoices instantly
- Organize by client or project
- Send invoices directly to clients
- Track all invoices in one place
- Manage invoices from multiple vendors
- Extract data automatically from received invoices
- Organize by department or category
- Share invoices with team members
- Upload client invoices
- Auto-extract data for bookkeeping
- Organize by client folders
- Generate reports from stored data
- Create invoices on the go
- Professional templates included
- Email directly to clients
- Track sent invoices
InvoiceGen is built with user experience at its core:
- Simplicity First - Clean, uncluttered interface
- Speed Matters - Optimized for fast performance
- Professional Look - Business-appropriate design
- Mobile Ready - Works on all devices
- Accessibility - Built with ARIA standards
- Consistency - Uniform design language throughout
- Secure Authentication - OAuth and credential-based login
- Data Isolation - Complete user data separation
- Presigned URLs - Time-limited, secure file access
- Ownership Checks - All operations verify user permissions
- Local Storage - Sensitive keys stored client-side only
- Encrypted Passwords - Secure password hashing
- HTTPS Only - Secure communication
InvoiceGen is designed to scale:
- Efficient Database Queries - Optimized with indexes
- Cloud Storage - R2 handles unlimited files
- Serverless Ready - Deploy to Vercel
- Background Jobs - AI extraction doesn't block UI
- Lazy Loading - Only load what's needed
- Pagination Support - Handle thousands of invoices
Community-driven development roadmap:
- π¨ Template Library - Pre-built invoice templates
- π Bulk Operations - Mass invoice processing
- π REST API - Full programmatic access
- π₯ Team Collaboration - Multi-user workspaces
- π Advanced Analytics - Business intelligence dashboards
- π§Ύ Accounting Integration - Export to QuickBooks, Xero
- π± Mobile Apps - iOS & Android applications
- β° Invoice Reminders - Automatic payment follow-ups
- π³ Payment Tracking - Payment status and history
- π Multi-language - Internationalization support
- π OCR Integration - Additional AI providers
- ποΈ Bulk Import - CSV/Excel invoice import
This project is licensed under the MIT License - see the LICENSE file for details.
We welcome contributions from the community! Here's how you can help:
- Use GitHub Issues to report bugs
- Include steps to reproduce the issue
- Provide system information and error messages
- Open GitHub Issues with feature ideas
- Explain the use case and expected behavior
- Help others vote on your ideas with π
- Fork the repository
- Create a 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
- Help improve our README
- Add code comments and documentation
- Create examples and tutorials
- Join discussions in GitHub Issues
- Share your use cases and ideas
- Help prioritize features
InvoiceGen is designed to be easily self-hosted. Perfect for:
- Small Businesses wanting control over their data
- Developers wanting to customize features
- Teams needing offline invoice management
- Privacy-conscious organizations
- Node.js 18+
- PostgreSQL database
- Cloudflare R2 or AWS S3-compatible storage
- Domain name (optional)
-
Clone the repository
git clone https://github.com/hetref/invoicegen.git cd invoicegen -
Environment Configuration
cp .env.example .env # Edit .env with your settings -
Database Setup
npm install npx prisma migrate deploy
-
Start the Application
npm run build npm start
Deploy to popular platforms:
- Vercel: One-click deployment
- Railway: Full-stack hosting
- DigitalOcean: App Platform
- AWS: EC2 or ECS
- Google Cloud: Cloud Run
- π Bug Reports: GitHub Issues
- π‘ Feature Requests: GitHub Discussions
- π Documentation: Project Wiki
- π¬ Community: GitHub Discussions
Have questions? Want to contribute? We'd love to hear from you!
InvoiceGen makes invoice management effortless. Whether you're uploading existing invoices, creating new ones from scratch, or extracting data with AI, everything you need is at your fingertips.
Start managing your invoices smarter, not harder.
Made with β€οΈ by the InvoiceGen Community
Open source β’ Self-hostable β’ Privacy-first
β Star us on GitHub if you find this project helpful!