Skip to content
Sri Sai Hemanth Bollepalli
All work

06SystemsPrototype

Tallyx: a double-entry accounting and GST engine

A clean-room double-entry and GST engine in TypeScript with exact money, an immutable journal and voucher numbers that cannot have gaps.

Systems engineering · implemented prototype · 2026

tests in the suite
571
money as a 64-bit integer
4 dp
contiguous under 8 parallel writers
1..400
gaps in voucher numbering
0

Problem

Accounting software is where floating-point bugs become legal liabilities. A ledger that drifts by a fraction of a paisa per entry is untraceable after a few thousand postings.

A voucher sequence with a gap is a statutory problem, not a cosmetic one, and database sequences leave gaps whenever a transaction rolls back.

Approach

  1. 01

    Money is an integer

    Amounts are signed 64-bit integers at four decimal places, never floats, which reaches about ±922 trillion currency units. The debit or credit side is stored separately from the magnitude.

  2. 02

    The journal is immutable

    Editing a posted voucher writes a reversal plus a correction, both linked to the original, so the audit trail never sits on mutable rows.

  3. 03

    Numbering is gap-free by construction

    Voucher numbers come from a locked counter inside the posting transaction, not from a database sequence.

  4. 04

    Exact at the boundary too

    Money crosses the HTTP boundary as decimal strings, never JSON numbers, so the exact money layer is not undone in transit.

  5. 05

    A core that needs no database to test

    The domain layer imports nothing, reports import only the domain, and nothing imports the UI.

Results

Numbering was verified with 8 parallel processes posting 50 vouchers each: the result was a contiguous 1 to 400 with zero gaps.

Numbering under concurrency
  1. 01

    8 processes

    Posting in parallel

  2. 02

    50 posts each

    To the same voucher series

  3. 03

    1..400

    Contiguous, zero gaps

What is implemented
AreaScope
AccountingDouble-entry journal, trial balance, profit and loss, balance sheet, account statements
GSTDate-effective rates, CGST/SGST versus IGST, cess, GSTR-1 partitions, ledger reconciliation
InventoryFIFO, LIFO and weighted-average valuation across warehouses
BillsBill-by-bill allocation, aging buckets, over-settlement prevention
Tests571 across 19 files, including numbering under concurrency

Limits

What this work did not show.

  1. There is no hosted demo: the previous deployment is offline. The full stack runs locally against SQLite.
  2. Not built: multi-user Postgres deployment, e-invoicing integration, payroll and bank feeds.
  3. Behaviour was derived from observing TallyPrime Edit Log 7.2 and reimplemented independently. The project is not affiliated with Tally Solutions.
  4. The source is public and the licence is proprietary.

Stack

  • TypeScript
  • Node.js
  • React
  • SQLite
  • Terraform
  • Docker
HomeTop of page
WorkSection
ResearchSection
ArchiveSection
AboutSection
ContactSection
CVPage
Finding the resection cavities a standard nnU-Net misses01
Twelve knee findings, no expert image labels02
Does an ECG model read the atrium?03
ADMET predictions that say when not to trust them04
A CRM whose records can be verified offline05
An accounting engine that never stores money as a float06
Copy email addressCopy
Write an emailMail
Copy BibTeX for the MICCAI 2026 paperCopy
MICCAI 2026 paperPDF
GitHubProfile
ORCIDProfile
LinkedInProfile
Source code for this siteGitHub

21 results