01. Quickstart Guide
Getting StartedLuen allows independent software engineers, consultants, and digital agencies to generate compliant, vector-sharp PDF invoices without spreadsheets or ERP software overhead.
Input business details, billing address, tax ID (GSTIN/VAT), and client details. Use Settings to save defaults for instant 1-click prefill.
Add milestone line items, hourly rates, quantities, and optional HSN/SAC codes with automated subtotal math.
Configure intra-state GST (CGST + SGST), inter-state IGST, or toggle Cross-Border Export Under LUT with automatic statutory declarations.
Download crisp, pixel-perfect PDF documents directly to your device with automated download quota telemetry.
> Invoice Serial # : INV-2026-042
> Currency & TaxMode : INR (₹) • Intra-State CGST(9%) + SGST(9%)
> Line Items Loaded : 3 Deliverables • Subtotal: ₹85,000.00 • Total: ₹100,300.00
> Compilation Status : Clean vector graph parsed in 184ms
02. Metadata Persistence Architecture
Database SpecTo maintain sub-second rendering performance and eliminate database bloat, Luen implements a metadata-only persistence architecture. We do not store pre-compiled binary PDF blobs or gigabytes of repetitive file streams in our database.
model Invoice {
InvoiceId String @id @default(cuid())
invoiceNumber String @unique // Format: "INV-YYYY-XXXX"
// Recipient Client Data
CustomerName String?
CustomerEmail String?
CustomerAddress String?
Subject String?
// Date Fields
IssueDate DateTime
DueDate DateTime
// Financial Totals
Currency String @default("INR") // 'INR', 'USD', 'EUR', etc.
subtotal Decimal @default(0.0)
tax Decimal @default(0.0)
discount Decimal? @default(0.0)
total Decimal @default(0.0)
// Lifecycle Status Marker
paymentStatus InvoiceStatus @default(PENDING)
// User Relationship
userId String
user User @relation(fields: [userId], references: [id], onDelete: Cascade)
// Audit Timestamps
createdAt DateTime @default(now())
updatedAt DateTime @updatedAt
@@map("invoice")
}- Microsecond Query Latency: Invoice records remain under 1KB per row, allowing instantaneous dashboard retrieval and status filtering.
- Deterministic Vector Compilation: The exact PDF vector tree is re-compiled on-demand using stored metadata, guaranteeing zero document degradation.
- Strict Audit Verification: Financial audit values (`subtotal`, `tax`, `total`, `Currency`) remain structured as SQL Decimals for analytics and tax filing.
03. Form Fields & Deliverable Itemization
Data DictionaryTo avoid client accounts payable disputes, ensure invoice form fields adhere to standard corporate accounting conventions:
Always use sequential alphanumeric series without gaps (e.g., INV-2026-001). Duplicate serial numbers create audit friction with corporate procurement systems.
Define clear payment windows using standard payment horizons: Net 15, Net 30, or Upon Receipt.
For Indian GST invoices, apply statutory SAC codes (e.g., 998314 for Information Technology / Custom Software Development).
04. Payment Processing & Status Lifecycles
LifecycleEvery invoice tracked in Luen transitions through structured status markers represented by the InvoiceStatus enum:
The invoice is active and delivered to the client, but payment verification is awaiting bank settlement.
Funds have been received and verified via UPI, direct bank wire transfer, or cross-border payment gateway.
Current date has exceeded the configured DueDate without confirmed payment.
The document was voided due to revised project scope, contract adjustments, or mutual agreement.
05. GST & International Tax Engine
Tax RulesLuen incorporates deterministic calculation models for Indian Goods and Services Tax (GST) as well as zero-rated international export declarations:
Applicable tax rate is split evenly between Central GST (CGST) and State GST (SGST). For an 18% standard rate: CGST = 9%, SGST = 9%.
Applicable tax rate is compiled as Integrated GST (IGST). For an 18% standard rate: IGST = 18.00%.
For foreign cross-border invoices, toggling LUT suppresses tax calculation and automatically embeds the mandatory statutory declaration on the PDF canvas:
"Supply Meant for Export Under Letter of Undertaking (LUT) Without Payment of Integrated Tax"
06. Multi-Currency Subscriptions & Quota Rules
Billing & PlansLuen features localized multi-market subscription routing via Razorpay:
Billed in INR via UPI Autopay, Indian Netbanking, and domestic debit/credit cards under RBI e-Mandate compliance.
Billed in USD via cross-border international Visa, Mastercard, and American Express cards with automated recurring renewal.
Starter Free accounts receive 5 PDF downloads/month. Quotas reset automatically on the 1st of every calendar month. Pro subscribers enjoy unlimited downloads, watermark removal, and custom branding.
07. PDF Vector Compilation & Troubleshooting
TroubleshootingLuen embeds automatic row pagination with break-inside: avoid to prevent individual line item descriptions from being clipped across printed page boundaries.
Upload PNG or SVG logo files under 2MB. Logos are embedded as Base64 vector streams to ensure 300+ DPI print clarity on high-resolution office printers.
On mobile devices, PDF rendering is processed securely through server-side buffer streaming to eliminate mobile iframe canvas crashes and popup blocker restrictions.