Personal Invoice Generator
A beautiful, modern desktop app for generating professional invoices with automated scheduling, AI-powered document analysis, and integrated e-mail delivery.
Features β’ Installation β’ Usage β’ Configuration β’ Placeholders β’ License
- Modern UI β Beautiful light and dark themes with a responsive design
- ODT Template System β Use LibreOffice/OpenOffice templates with placeholder substitution
- Automated Scheduling β Define billing rules with flexible periodicity (monthly, quarterly, yearly, custom)
- AI-Powered Analysis β Automatically extract amounts from receipts/invoices using Claude, GPT-4, or Gemini
- E-mail Integration β Compose and send invoices directly via SMTP with rich HTML templates
- Multi-Currency β Support for CZK, EUR, and USD with automatic exchange rate conversion
- File Management β Track and manage "proplatit" (to-reimburse) files with automatic processing
- Secure Storage β SMTP credentials and API keys are encrypted on disk
- Node.js 18+
- Rust (for Tauri)
- LibreOffice (for ODT β PDF conversion)
# Clone the repository
git clone https://github.com/lofcz/pig.git
cd pig
# Install dependencies
npm i
# Run in development mode
npm run tauri dev
# Build for production
npm run tauri build- Configure your settings β Set up your company details, customers, and bank account
- Create a ruleset β Define billing periodicity, salary rules, and invoice templates
- Add extra items β Drop receipts/invoices into the "proplatit" folder for reimbursement tracking
- Generate invoices β Review pending invoices and generate them all at once
- Send s β Compose and send invoices to customers with attached PDFs
βββββββββββββββββββ βββββββββββββββββββ βββββββββββββββββββ
β Configure β βββΊ β Generate β βββΊ β Send via β
β Rulesets β β Invoices β β β
βββββββββββββββββββ βββββββββββββββββββ βββββββββββββββββββ
β β β
βΌ βΌ βΌ
Salary rules ODT β PDF SMTP integration
Periodicity Preview mode HTML templates
Customer mapping Batch generation Attachments
your-invoice-root/
βββ 24/ # Year folder (invoices by year)
β βββ faktura_*.odt
β βββ faktura_*.pdf
βββ 25/
βββ proplaceni/
β βββ proplatit/ # Files to reimburse
β βββ proplaceno/ # Processed files (auto-moved)
βββ pig_template.odt # Your invoice template
| Section | Description |
|---|---|
| General | Root path, LibreOffice path, currency settings, theme |
| Suppliers | Your company details (name, address, IΔ, DIΔ, bank account) |
| Customers | Client companies to invoice |
| Contacts | Contact persons for delivery |
| E-mails | SMTP connectors and HTML templates |
| Rulesets | Billing rules, periodicity, salary schedules |
Rulesets define when and how invoices are generated:
- Periodicity: Monthly, Quarterly, Yearly, or Custom intervals
- Entitlement Day: Day of month when billing period closes
- Salary Rules: Date ranges with base value and deductions
- Invoice Splitting: Automatically split large invoices (e.g., max 80,000 CZK)
- Customer Rules: Map customers based on odd/even months or default
PIG uses two types of placeholders: Invoice Placeholders for ODT templates and ** Placeholders** for templates.
Use these in your LibreOffice/OpenOffice invoice templates:
| Placeholder | Description | Example |
|---|---|---|
{{P_NO}} |
Invoice number | 15012501 |
{{P_ISSUED}} |
Issue date | 15. 1. 2025 |
{{P_DUZP}} |
Date of taxable supply | 15. 1. 2025 |
{{P_DUE}} |
Due date | 29. 1. 2025 |
{{P_VS}} |
Variable symbol | 15012501 |
{{P_DESC}} |
Invoice description | Services |
{{P_VALUE}} |
Invoice amount (formatted) | 50 000,00 |
{{P_VAT}} |
VAT rate | 0% |
| Placeholder | Description |
|---|---|
{{P_SUPPLIER}} |
Full supplier block (multi-line) |
{{P_SUP_NAME}} |
Company name |
{{P_SUP_STREET}} |
Street address |
{{P_SUP_ZIP}} |
ZIP/Postal code |
{{P_SUP_CITY}} |
City |
{{P_SUP_COUNTRY}} |
Country |
{{P_SUP_IC}} |
Company ID |
{{P_SUP_DIC}} |
VAT ID |
{{P_ACC}} |
Bank account number |
| Placeholder | Description |
|---|---|
{{P_CUSTOMER}} |
Full customer block (multi-line) |
{{P_CUST_NAME}} |
Company name |
{{P_CUST_STREET}} |
Street address |
{{P_CUST_ZIP}} |
ZIP/Postal code |
{{P_CUST_CITY}} |
City |
{{P_CUST_COUNTRY}} |
Country |
{{P_CUST_IC}} |
Company ID |
{{P_CUST_DIC}} |
VAT ID |
Use these in subjects and bodies. Supports both {{placeholder}} syntax and full Eta template syntax for advanced logic.
| Placeholder | Description |
|---|---|
{{contact.name}} |
Contact person's name |
{{contact.}} |
Contact |
{{contact.phone}} |
Contact phone |
| Placeholder | Description |
|---|---|
{{invoice.number}} |
Invoice number |
{{invoice.date}} |
Issue date |
{{invoice.dueDate}} |
Due date |
{{invoice.amount}} |
Amount (number) |
{{invoice.currency}} |
Currency code |
{{invoice.description}} |
Description |
| Placeholder | Description |
|---|---|
{{invoices.count}} |
Number of invoices |
{{invoices.totalAmount}} |
Sum of all amounts |
{{invoices.numbers}} |
Comma-separated invoice numbers |
| Placeholder | Description |
|---|---|
{{customer.name}} |
Company name |
{{customer.street}} |
Street address |
{{customer.city}} |
City |
{{customer.zip}} |
ZIP code |
{{customer.country}} |
Country |
{{customer.ic}} |
Company ID |
{{customer.dic}} |
VAT ID |
| Placeholder | Description |
|---|---|
{{supplier.name}} |
Company name |
{{supplier.street}} |
Street address |
{{supplier.city}} |
City |
{{supplier.zip}} |
ZIP code |
{{supplier.country}} |
Country |
{{supplier.ic}} |
Company ID |
{{supplier.dic}} |
VAT ID |
{{supplier.bankAccount}} |
Bank account |
templates support full Eta templating for complex scenarios:
<!-- Loop through invoices -->
<% it.invoices.list.forEach(function(inv) { %>
<p>Invoice #<%= inv.number %> - <%= it.formatAmount(inv.amount, inv.currency) %></p>
<% }) %>
<!-- Conditional content -->
<% if (it.invoices.count > 1) { %>
<p>Please find <%= it.invoices.count %> invoices attached.</p>
<% } else { %>
<p>Please find the invoice attached.</p>
<% } %>
<!-- Czech pluralization -->
<p>
PosΓlΓ‘m <%= it.invoices.count %>
<%= it.plural(it.invoices.count, 'fakturu', 'faktury', 'faktur') %>
</p>
<!-- Format amounts -->
<p>Total: <%= it.formatAmount(it.invoices.totalAmount, 'CZK') %></p>PIG can automatically extract amounts from receipts and invoices using AI vision models.
Configure API keys in Settings β General β API Keys:
| Provider | Default Model |
|---|---|
| Anthropic | Claude 4.5 Haiku |
| OpenAI | GPT-4o |
| Gemini 3 Flash Preview |
- PDF documents
- Images: PNG, JPG, JPEG, GIF, WebP
- Place receipts in the
proplatitfolder - Click the Analyze button in the Extra Items section
- AI extracts amounts and currencies automatically
- Review and adjust values as needed
- Generate invoice β files are moved to
proplaceno
- Frontend: React, TypeScript, Tailwind CSS
- Backend: Rust, Tauri
This library is licensed under the MIT license. π
