A comprehensive, production-ready invoice management system built with Next.js, featuring AI-powered suggestions, automated reminders, and professional PDF generation.
- Professional Invoice Creation - Beautiful, branded PDF invoices
- Client Management - Comprehensive client database with history
- Payment Tracking - Multiple payment methods and status tracking
- Analytics Dashboard - Revenue insights and business metrics
- Export Capabilities - CSV exports and bulk PDF downloads
- AI Auto-Suggestions - Smart line item and client suggestions
- Automated Reminders - Intelligent overdue invoice management
- Multi-Currency Support - Global business ready
- GST/VAT Handling - Tax compliance built-in
- Email Integration - Automated invoice delivery
- Responsive Design - Mobile-first, professional UI
- SQLite Database - Reliable local data storage
- JWT Authentication - Secure user management
- PDF Generation - Professional branded invoices
- Email Service - SMTP integration for notifications
- Frontend: Next.js 13, React, TypeScript
- Styling: Tailwind CSS, Custom Green Theme
- Database: SQLite with migration support
- Authentication: JWT with bcrypt
- PDF Generation: jsPDF with custom templates
- Email: Nodemailer with SMTP
- Icons: Lucide React
- UI Components: Custom component library
- Node.js 18+
- npm or yarn
-
Clone and Install
git clone <repository-url> cd smartinvoice npm install
-
Environment Configuration Create
.env.localfile:JWT_SECRET=your-super-secure-jwt-secret EMAIL_HOST=smtp.gmail.com EMAIL_PORT=587 EMAIL_USER=[email protected] EMAIL_PASS=your-app-password EMAIL_FROM=[email protected] NEXT_PUBLIC_APP_URL=http://localhost:3000
-
Start Development Server
npm run dev
-
Access Application
- Open http://localhost:3000
- Demo login:
[email protected]/demo123
- Enable 2-Factor Authentication on your Gmail account
- Generate an App Password:
- Go to Google Account Settings
- Security β 2-Step Verification β App passwords
- Generate password for "Mail"
- Use the generated password in
EMAIL_PASS
Visit /api/test-email to verify email setup.
JWT_SECRET=your-production-jwt-secret
DATABASE_URL=your-production-database-url
EMAIL_HOST=your-smtp-host
EMAIL_USER=your-email
EMAIL_PASS=your-email-password
EMAIL_FROM=your-from-email
NEXT_PUBLIC_APP_URL=https://your-domain.com
NODE_ENV=productionnpm run build
vercel --prodrailway login
railway init
railway upFROM node:18-alpine
WORKDIR /app
COPY package*.json ./
RUN npm ci --only=production
COPY . .
RUN npm run build
EXPOSE 3000
CMD ["npm", "start"]- Professional PDF generation with branding
- Multiple templates and customization
- Automatic numbering and tracking
- Status management (Draft, Sent, Paid, Overdue)
- Complete client profiles
- Invoice history and analytics
- Payment behavior tracking
- Communication logs
- Revenue tracking and forecasting
- Payment analytics
- Client performance metrics
- Export capabilities for accounting
- Smart reminder system
- Overdue invoice management
- Email automation
- Payment notifications
- Update company information in invoice templates
- Customize colors in
globals.css - Replace logo in PDF generator
- Modify email templates
- Add payment gateway integration
- Implement recurring invoices
- Add time tracking
- Extend reporting capabilities
POST /api/auth/login- User loginPOST /api/auth/signup- User registrationGET /api/auth/me- Get current user
GET /api/invoices- List invoicesPOST /api/invoices- Create invoiceGET /api/invoices/[id]- Get invoicePUT /api/invoices/[id]- Update invoiceDELETE /api/invoices/[id]- Delete invoiceGET /api/invoices/[id]/pdf- Download PDF
GET /api/clients- List clientsPOST /api/clients- Create clientGET /api/clients/[id]- Get clientPUT /api/clients/[id]- Update clientDELETE /api/clients/[id]- Delete client
GET /api/analytics- Business analyticsGET /api/export/invoices- Export invoices CSVGET /api/export/clients- Export clients CSV
- JWT-based authentication
- Password hashing with bcrypt
- Input validation and sanitization
- SQL injection prevention
- XSS protection
- CORS configuration
- Fully responsive design
- Touch-friendly interface
- Mobile-optimized forms
- Progressive Web App ready
- Fork the repository
- Create feature branch (
git checkout -b feature/amazing-feature) - Commit changes (
git commit -m 'Add amazing feature') - Push to branch (
git push origin feature/amazing-feature) - Open Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
For support and questions:
- Create an issue on GitHub
- Email: [email protected]
- Documentation: [docs.smartinvoice.com]
- Payment gateway integration (Stripe, Razorpay)
- Recurring invoice automation
- Time tracking integration
- Multi-language support
- Advanced reporting
- Mobile app development
- API for third-party integrations
SmartInvoice - Professional invoice management for modern businesses.