← back to blog

Building a Tax Accounting PWA for Vietnamese Small Businesses β˜•

Apr 12, 2026 Β· the story of how i mass-produced an entire app

> tl;dr: built a free offline tax app for vietnamese aunties.
> it works. mostly. i think. 😎

The Problem πŸ€”

In Vietnam, millions of household businesses must keep accounting records under Circular 152/2025. Most owners are not tech-savvy. We are talking about sugarcane sellers, grocery stores, and your neighbor who sells banh mi from a cart.

THE PROBLEM: Vietnamese Auntie's Brain🧠"Excel?"β†’ "Is that an exercise?""Cloud?"β†’ "It's not raining tho""PDF?"β†’ "sounds like a disease""Tax form?"β†’ 😰😰😰

The Solution πŸ’‘

I built HKD Accounting β€” a free, offline-first PWA. No login, no cloud, no subscription. Open it, tap some buttons, get your tax form.

THE ARCHITECTURE⚑ Next.jsthe face🧠 SQLite WASMthe brainπŸ’Ύ IndexedDBthe memory✨ Tailwindthe drip🎨 html2canvasPDF magicπŸ“‘ Service Workeroffline modeserver cost: $0 β”‚ bugs: yes β”‚ vibes: immaculate

The Stack πŸ› 

  • sql.js β€” A whole SQLite database. In your browser. In WASM. Living its best life.
  • Next.js 14 β€” Because every project needs a framework with a cool name
  • html2canvas + jsPDF β€” Renders HTML β†’ screenshot β†’ PDF. Hacky? Yes. Works? Also yes.
  • ExcelJS β€” Generates .xlsx that match government templates. The tax office cannot tell.

UX: Designing for Aunties πŸ‘΅

The hardest part was not the code β€” it was making it usable for someone who might struggle with a smartphone.

UX FLOW (one-thumb optimized)πŸ“±Open App🟒Tap BIGBUTTONπŸ’°Type orTap Amountβœ…Done!Easy.User types: "200"200k2 triệu20 triệuno more 000s! πŸŽ‰
  • Two modes β€” "Simple" for tax-only, "Full" for POS nerds like me
  • Smart amount input β€” Type "200", get 200k/2M/20M suggestions. No zero-counting.
  • Guided tour β€” First-time spotlight overlay. Like a video game tutorial but for taxes.

Tax Compliance πŸ“‹

TAX FORMS (must match pixel-perfect)πŸ“‹ S1a-HKD (Group 1)under 500M/year β€” no taxNgΓ y thΓ‘ngGiao dα»‹chSα»‘ tiền12/04 β”‚ BΓ‘n hΓ ng (TM) β”‚ 200k12/04 β”‚ BΓ‘n hΓ ng (CK) β”‚ 150k β”‚ β”‚ β”‚ Tα»•ng cα»™ng β”‚ 350kβœ…simple. clean. done.πŸ“‹ S2a-HKD (Group 2)500M-3B/year β€” with taxSame 3 columns as S1a12/04 β”‚ BΓ‘n hΓ ng β”‚ 1.000kTax Summary:GTGT (1.0%): 10.000Δ‘TNCN (0.5%): 5.000Δ‘Total tax: 15.000Δ‘tax goes brrr πŸ’Έ

The Debt System πŸ’Έ

Vietnamese small businesses run on trust. "Ghi nợ" (write down the debt) happens 10 times a day. So I built a full contact + debt tracking system.

DEBT TRACKINGπŸ”΄ Chα»‹ Hoaowes you500kπŸ”΄ Anh TΓΉngowes you200kπŸ”΅ CΓ΄ Lanyou owe100kNet: +600k πŸ“ˆ (you're winning!)

What I Learned 🧠

  • SQLite in WASM is legit β€” Full SQL, indexes, transactions. All in the browser.
  • PWAs on iOS still kinda suck β€” Service worker lifecycle quirks. Apple why.
  • 10x more UX iteration for non-tech users β€” What is obvious to you is cryptic to your auntie.
  • Vietnamese diacritics in PDFs β€” html2canvas is the only way. I tried everything else.

> final_report.pdf βœ…
> final_report_v2.pdf βœ…
> final_FINAL.pdf βœ…
> FINAL_final_v3_THISONE.pdf βœ…
>
> this is fine. πŸ”₯πŸ•

Try It πŸš€

The app is live at hkd.tamduongs.com. Free forever. Works offline. Auntie-approved. 😎

Source code? . Stay chill. ✌️