HowAutomate
    All case studies

    India Accounting OS: A GST & TDS-Ready Accounting Engine Where the Database Enforces the Rules

    Our own accounting platform for Indian businesses: double-entry books, GST invoicing, TDS under both the 1961 and 2025 Income-tax Acts, MSME 43B(h) tracking and period locks — with the critical rules enforced by PostgreSQL itself, not just application code.

    Results

    • 151Automated tests, run against a real PostgreSQL database
    • 2 ActsTDS resolved by transaction date: 1961 Act and 2025 Act
    • 0Floating-point numbers used for money
    • 5Specification documents covering the full roadmap
    India Accounting OS: A GST & TDS-Ready Accounting Engine Where the Database Enforces the Rules

    1The challenge

    Indian accounting rules change constantly. The Income-tax Act, 2025 came into force on 1 April 2026 with reorganised TDS sections, while transactions dated earlier still follow the 1961 Act. GST rates change by notification. Most small-business software hard-codes these rules or enforces key controls only in application code, where one bad import or script can produce unbalanced books, edit a filed period or apply today's rate to last year's invoice.

    2What we built

    We designed India Accounting OS from five written specifications (accounting, GST, TDS, banking and AI) and built the accounting engine first. Debit must equal credit is checked by the database when each transaction commits; posted entries can be reversed but never deleted; locked periods refuse postings; and every tax rate, threshold and TDS section is a dated rule row with effective-from and effective-to dates, so a law change is new data rather than a software release. It runs on our own server in Mumbai at accounts.howautomate.com, with server-side sessions and strict company-level access control.

    3How it works

    The engine covers companies and users, a chart of accounts mapped to Schedule III balance-sheet headings, sales and purchase invoices with automatic CGST/SGST versus IGST, credit and debit notes, receipts and payments, inventory at weighted average cost, cost centres, year-end close, and trial balance, profit and loss and balance sheet reports.

    Compliance features follow how Indian businesses actually work: gapless invoice numbering series, vendor MSME status with 43B(h) payment deadlines and a report of amounts to add back, TDS on expenses, purchase bills and advances with threshold catch-up and lower-deduction certificates, and TDS reversed automatically when goods are returned. Credit notes always use the original invoice's tax rate, not the rate on the day the note is raised.

    Several of the important rules live in PostgreSQL itself. A deferred constraint trigger rolls back any transaction whose debits and credits don't match. Overlapping tax rules can't even be stored. Money is held as exact decimals and never passes through a JavaScript float. Tax rules ship as drafts and only take effect after a named reviewer activates them.

    Real testing found real bugs. The first database-backed test run showed a locked period accepting entries on servers in India, because the database driver turned dates into local-midnight timestamps — we wrote it up in [The Timezone Bug That Let a Locked Accounting Period Accept Entries](https://howautomate.com/blog/postgres-date-timezone-bug-node). Using the app in a browser caught a sign-out that silently failed and an audit-trail crash that code review had missed.

    Security was designed in rather than added later: hashed passwords, revocable server-side sessions, rate limits and account lockout, and every company-scoped request checked against the user's access so one company can never read another's books. The platform is in an early pilot. GST return preparation, bank reconciliation and the AI assistant are fully specified and next on the roadmap.

    Built with

    • TypeScript
    • Node.js
    • PostgreSQL 17
    • Fastify
    • Vitest
    • Traefik
    • Linux VPS (Mumbai)

    More Cloud case studies

    Have a problem like this one? Tell us about it.

    Chat with us