๐ Overview
InvioLite is a modern, professional invoice generator built with vanilla JavaScript. It allows you to create beautiful invoices, quotes, and proforma invoices with ease. No installation or build process required - it works entirely in your browser!
Key Features
๐ Multiple Document Types
Create invoices, proforma invoices, and quotes with the same professional interface.
๐ฑ Multi-Currency
Support for TRY, USD, EUR, GBP with proper formatting and symbols.
๐ Multi-Language
6 languages: Turkish, English, German, Italian, Bulgarian, Russian.
๐จ 5 Templates
Choose from Classic Professional, Stripe Inspired, Commercial, Design, and Physical.
๐ฅ PDF Export
Generate high-quality PDF files directly in the browser.
๐พ Auto-Save
Automatically saves your work every 2 seconds to browser storage.
Technology Stack
- Vanilla JavaScript (ES6+) - No frameworks required
- HTML5 - Semantic markup
- CSS3 - Modern styling
- html2pdf.js - PDF generation (CDN-loaded)
Browser Compatibility
- โ Chrome (latest)
- โ Firefox (latest)
- โ Safari (latest)
- โ Edge (latest)
c o d e l i s t . c c
Quick Start
- Download or extract the files to your web server or local machine
- Open
index.htmlin a modern web browser - Start creating invoices!
File Structure
inviolite/
โโโ index.html # Main application file
โโโ script.js # Core application logic
โโโ style.css # Base styles and editor panel
โโโ translations.js # Translation manager
โโโ translations.json # Multi-language strings
โโโ config.json # Configuration file
โโโ package.json # Project metadata
โโโ README.md # Quick start guide
โโโ templates/
โ โโโ template-1.css # Classic Professional template
โ โโโ template-2.css # Stripe Inspired template
โ โโโ template-3.css # Commercial template
โ โโโ template-3-commercial.html
โ โโโ template-4.css # Design template
โ โโโ template-4-design.html
โ โโโ template-5.css # Physical template
โ โโโ template-5-physical.html
โโโ logo.png # Company logo (optional)
Web Server Setup (Optional)
While InvioLite works locally, for best results (especially for PDF generation), use a web server:
Python Server
python3 -m http.server 8000
Then open: http://localhost:8000
PHP Server
php -S localhost:8000
Then open: http://localhost:8000
Node.js Server
npx http-server -p 8000
Then open: http://localhost:8000
โ๏ธ Configuration
All customization is done through the config.json file. This centralized configuration makes it easy to customize your invoice generator.
Configuration Structure
{
"company": {
"name": "Your Company Name",
"logo": "logo.png",
"address": {
"line1": "Company Address Line 1",
"line2": "City / State",
"country": ""
},
"contact": {
"email": "info@example.com",
"phone": "+1 555 000 0000",
"website": "example.com"
}
},
"invoice": {
"defaultNumber": "INV-001",
"defaultTaxRate": 20,
"currency": "TRY",
"dateFormat": "DD.MM.YYYY"
},
"branding": {
"primaryColor": "#ff6600",
"headerBarColor": "#ff6600"
},
"footer": {
"enabled": true,
"showLogo": true,
"showCompanyInfo": true,
"showEmail": true,
"showPhone": true,
"showWebsite": true,
"showAddress": true
},
"template": {
"name": "template-1",
"displayName": "Classic Professional"
}
}
Company Information
| Field | Description | Example |
|---|---|---|
company.name |
Your company name | "Acme Corporation" |
company.logo |
Logo filename (PNG, SVG, or JPG) | "logo.png" |
company.address.line1 |
First address line | "123 Business St" |
company.address.line2 |
Second address line | "Suite 100, New York" |
company.contact.email |
Contact email | "info@example.com" |
company.contact.phone |
Contact phone | "+1 555 000 0000" |
company.contact.website |
Company website | "example.com" |
Invoice Defaults
| Field | Description | Options |
|---|---|---|
invoice.defaultNumber |
Default invoice number format | "INV-001", "2025-001", etc. |
invoice.defaultTaxRate |
Default tax/VAT rate (%) | 0-100 |
invoice.currency |
Default currency | "TRY", "USD", "EUR", "GBP" |
invoice.dateFormat |
Date format preference | "DD.MM.YYYY", "MM/DD/YYYY", etc. |
Branding
| Field | Description | Format |
|---|---|---|
branding.primaryColor |
Primary brand color | Hex color: "#ff6600" |
branding.headerBarColor |
Header bar accent color | Hex color: "#ff6600" |
Footer Configuration
Control what appears in the invoice footer:
footer.enabled- Enable/disable entire footerfooter.showLogo- Show company logofooter.showCompanyInfo- Show company namefooter.showEmail- Show email addressfooter.showPhone- Show phone numberfooter.showWebsite- Show websitefooter.showAddress- Show address
Template Selection
Choose from 5 professional templates:
"template-1"- Classic Professional"template-2"- Stripe Inspired"template-3"- Commercial"template-4"- Design"template-5"- Physical
๐ Usage Guide
Creating an Invoice
- Fill in document details:
- Select document type (Invoice, Proforma Invoice, or Quote)
- Choose currency (TRY, USD, EUR, GBP)
- Enter invoice number
- Set issue date and expiry date
- Add customer information:
- Company/Name
- Address
- Phone number
- Add line items:
- Click "+ Add Item" to add products/services
- Enter description, quantity, and unit price
- Remove items with the "Remove" button
- Configure pricing:
- Set tax rate (default: 20%)
- Add discount (percentage or fixed amount)
- Add notes (optional):
- Payment terms
- Delivery details
- Other important information
- Export:
- Click "Download PDF" to generate PDF
- Click "Print" to print directly
- Click "Save" to save to browser storage
- Click "Export" to download JSON backup
Data Management
Auto-Save
The application automatically saves your work to browser localStorage every 2 seconds after changes. Your data persists across page reloads.
Manual Save
Click the "Save" button to manually save your current invoice state.
Export Data
Click "Export" to download a JSON backup file containing:
- All line items
- Form data (customer info, dates, etc.)
- Settings (tax rate, discount)
- Timestamp
Import Data
Click "Import" and select a previously exported JSON file to restore your invoice data.
Language Switching
Use the language selector in the header to switch between available languages:
- ๐น๐ท Turkish (Tรผrkรงe)
- ๐ฌ๐ง English
- ๐ฉ๐ช German (Deutsch)
- ๐ฎ๐น Italian (Italiano)
- ๐ง๐ฌ Bulgarian (ะัะปะณะฐััะบะธ)
- ๐ท๐บ Russian (ะ ัััะบะธะน)
The selected language is saved and persists across sessions.
๐จ Templates
InvioLite includes 5 professional invoice templates. Switch between them via config.json.
Template 1: Classic Professional
- Style: Traditional business invoice
- Features: Bold orange accent bar, classic typography
- Best for: Professional services, traditional businesses
- Files:
templates/template-1.css
Template 2: Stripe Inspired
- Style: Clean, modern design
- Features: Gradient header bar, minimal design
- Best for: Tech companies, SaaS businesses
- Files:
templates/template-2.css
Template 3: Commercial
- Style: Professional B2B invoice
- Features: Blue gradient header, structured layout
- Best for: B2B companies, commercial transactions
- Files:
templates/template-3.css,templates/template-3-commercial.html
Template 4: Design
- Style: Creative and modern
- Features: Purple gradient header, card-based layout
- Best for: Design agencies, creative businesses
- Files:
templates/template-4.css,templates/template-4-design.html
Template 5: Physical
- Style: Traditional paper invoice
- Features: Black borders, traditional layout
- Best for: Physical businesses, printed invoices
- Files:
templates/template-5.css,templates/template-5-physical.html
Switching Templates
Edit config.json and change the template name:
{
"template": {
"name": "template-2",
"displayName": "Stripe Inspired"
}
}
๐ก Customization
Adding Your Logo
- Place your logo file in the project root directory
- Supported formats: PNG, SVG, JPG
- Update
config.json:"logo": "your-logo.png" - If no logo is found, the company name will display as styled text
Customizing Colors
Edit config.json to change branding colors:
{
"branding": {
"primaryColor": "#your-color",
"headerBarColor": "#your-color"
}
}
Adding Custom Templates
- Create a new CSS file in
templates/directory - Name it:
template-X.css(where X is a number) - Copy styles from an existing template and modify
- Update
config.jsonto use your template
Adding New Languages
- Open
translations.json - Copy an existing language section
- Add a new language code (e.g., "fr" for French)
- Translate all strings
- Add language option to
index.htmllanguage selector
Modifying Invoice Layout
For templates 1 and 2, modify the HTML in index.html. For templates 3, 4, and 5, edit the corresponding HTML files in templates/ directory.
๐ง API Reference
InvoiceGenerator Class
The main application class that handles all invoice operations.
Methods
loadConfig()
Loads configuration from config.json.
await invoiceGenerator.loadConfig();
addItem()
Adds a new line item to the invoice.
invoiceGenerator.addItem();
removeItem(index)
Removes a line item at the specified index.
invoiceGenerator.removeItem(0);
updatePreview()
Updates the invoice preview with current data.
invoiceGenerator.updatePreview();
calculateTotals()
Calculates subtotal, tax, discount, and grand total.
const totals = invoiceGenerator.calculateTotals();
exportPDF()
Generates and downloads a PDF of the invoice.
await invoiceGenerator.exportPDF();
saveToStorage()
Saves current invoice data to localStorage.
invoiceGenerator.saveToStorage();
loadFromStorage()
Loads invoice data from localStorage.
invoiceGenerator.loadFromStorage();
exportData()
Exports invoice data as JSON file.
invoiceGenerator.exportData();
importData(file)
Imports invoice data from JSON file.
invoiceGenerator.importData(file);
TranslationManager Class
Handles multi-language support.
Methods
loadTranslations()
Loads translations from translations.json.
await translationManager.loadTranslations();
t(key, params)
Gets translated string for a key.
const text = translationManager.t('ui.save');
const taxLabel = translationManager.t('invoice.tax', { rate: 20 });
setLanguage(lang)
Sets the current language.
translationManager.setLanguage('en');
getCurrentLanguage()
Gets the current language code.
const lang = translationManager.getCurrentLanguage();
๐ Troubleshooting
Common Issues
PDF Export Not Working
Solutions:
- Ensure you're running on a web server (not file://)
- Check browser console for errors
- Try a different browser
- Check if html2pdf.js library loads correctly
Logo Not Displaying
Solutions:
- Check file path in
config.json - Ensure logo file exists in project root
- Check file format (PNG, SVG, JPG supported)
- Company name will display as fallback if logo missing
Data Not Saving
Solutions:
- Check browser localStorage is enabled
- Clear browser cache and try again
- Check browser console for errors
- Try manual save button
Template Not Loading
Solutions:
- Check template name in
config.json - Ensure template CSS file exists
- For templates 3, 4, 5, ensure HTML files exist
- Check browser console for 404 errors
Language Not Switching
Solutions:
- Check
translations.jsonincludes the language - Ensure language option exists in HTML selector
- Check browser console for errors
- Clear browser cache
Browser Console Errors
If you encounter errors, check the browser console (F12) for detailed error messages. Common issues:
- CORS errors: Run on a web server, not file://
- 404 errors: Check file paths are correct
- JSON parse errors: Check
config.jsonsyntax - Type errors: Check JavaScript console for details
Performance Issues
- Slow loading: Check internet connection for CDN resources
- Laggy preview: Reduce number of line items
- PDF generation slow: Normal for large invoices, be patient
โ Frequently Asked Questions
General
Do I need a server to run InvioLite?
No, InvioLite works locally in your browser. However, for PDF generation, it's recommended to use a local web server.
Can I use this commercially?
Yes, InvioLite is designed for commercial use. Check your license agreement for specific terms.
Is my data secure?
Yes, all data is stored locally in your browser. No data is sent to any server.
Customization
Can I modify the code?
Yes, you can modify the code to suit your needs. However, you cannot redistribute or resell the modified code.
How do I add more currencies?
Edit translations.json to add currency translations, and update the currency selector in index.html.
Can I create custom templates?
Yes, create new CSS files in the templates/ directory and reference them in config.json.
Technical
What browsers are supported?
Chrome, Firefox, Safari, and Edge (latest versions).
Does it work on mobile?
Yes, InvioLite is fully responsive and works on mobile devices.
Can I integrate this with my website?
Yes, you can embed InvioLite in your website or integrate it with your existing systems.
๐ Support
For support, questions, or feature requests:
- Email: info@imgera.com
- Website: imgera.com
- Check this documentation
- Review the troubleshooting section
- Check browser console for errors
- Try clearing browser cache