DEV Community

manja316
manja316

Posted on

Every Indian GST invoice generator forces signup. I built one that doesn't.

I needed to send one GST invoice last week. Took me 25 minutes.

Vyapar wanted me to sign up. Zoho Books wanted me to sign up. Tally wanted me to install desktop software and walked me through a 3-screen wizard. The Indian government's e-invoice portal needed an aadhaar OTP and a separate "tax payer login."

I just needed: enter buyer GSTIN + line items → PDF.

So I built it. Single page, runs in your browser, generates a compliant tax invoice in 60 seconds. Free, open source, no signup, no analytics on your form data.

Live demo: https://gst.protodex.io

Here's what's actually in it.

What a GST invoice needs (the bureaucratic part)

Rule 46 of the CGST Rules lists 16 mandatory fields. The interesting ones from a code perspective:

  1. GSTIN of supplier and recipient (15 chars, format: 27ZYXWV9876E1A2)
  2. HSN/SAC code per line item — 4 digits if your turnover ≤ ₹5cr, 6 digits if more
  3. GST split: CGST + SGST if same state, IGST if different state
  4. Place of supply — determines the split logic above

The split is where most calculators get it wrong. Naive implementation:

const tax = amount * gstPercent / 100;
const cgst = tax / 2;  // ← WRONG when seller != buyer state
const sgst = tax / 2;
Enter fullscreen mode Exit fullscreen mode

Correct implementation:

const sameState = sellerStateCode === buyerStateCode;
const tax = amount * gstPercent / 100;
const cgst = sameState ? tax / 2 : 0;
const sgst = sameState ? tax / 2 : 0;
const igst = sameState ? 0 : tax;
Enter fullscreen mode Exit fullscreen mode

If your seller is in Karnataka (KA) and your buyer is in Maharashtra (MH), it's IGST — a single tax that the Central government collects and redistributes. Same state: CGST + SGST, split equally between Central and State.

I bundled the top 40 HSN/SAC codes most SMBs and freelancers use (software dev 998314, hosting 998433, legal 998212, retail goods classes 8471 for computers, 6109 for T-shirts, etc.). Full official list is ~150k codes at cbic-gst.gov.in if you need an obscure category.

How the PDF gets generated (no server)

The PDF is built entirely client-side using jsPDF + the jspdf-autotable plugin. The whole pipeline:

import { jsPDF } from 'jspdf';
import 'jspdf-autotable';

const doc = new jsPDF({ unit: 'mm', format: 'a4' });
doc.text('TAX INVOICE', 105, 15, { align: 'center' });
doc.autoTable({
  startY: 60,
  head: [['Description', 'HSN', 'Qty', 'Rate', 'GST', 'Total']],
  body: lineItems.map(toRow),
});
doc.save('invoice.pdf');
Enter fullscreen mode Exit fullscreen mode

No server, no upload, no API. Your invoice data never leaves the tab. Open DevTools → Network → you'll see zero requests after page load.

What I deliberately didn't build

  • GSTR-1 filing — that's a monthly compliance feature. Use Zoho/Vyapar.
  • E-invoice / IRN generation — mandatory only if turnover > ₹5cr. The handful of buyers above that threshold already use enterprise tools.
  • Recurring invoices — if you need this, you need accounting software anyway.
  • Server-side persistence — invoices auto-save to your browser's localStorage. Refresh-safe, machine-bound. Switch machines = re-enter once.

What I learned about Indian tax software

It's a market where the dominant tools (Tally, Zoho, Vyapar) compete on feature breadth and SaaS pricing, but they all skip the use case I had: "I send one invoice every other month and just want a PDF."

That's a long tail problem — too small for SaaS, too irregular for a Tally install, too compliance-heavy for a Word template. So everyone falls back to copy-pasting an Excel template they downloaded from a forum 3 years ago. Or hires a CA for what's a 60-second task.

The free no-signup tier is the right shape for that user.

What's next

Things on the roadmap if there's interest:

  • Logo upload (currently the PDF is text-only)
  • Save invoice history locally (right now localStorage keeps the form, not the past PDFs)
  • CSV export of line items for accounting handoff
  • e-Way bill generator for goods movement > ₹50k (separate compliance category)

Let me know which of these you'd actually use. If it's just "I need logo upload," I'll ship that this week.


Source / try it: https://gst.protodex.io
This is part of protodex.io — a small set of free utilities focused on Indian compliance + global dev work. Sister sites: property.protodex.io (Indian property total-cost calculator), cron.protodex.io (cron expression explainer with systemd timer output).

Top comments (0)