Inspiration

In Tamil and Hindu tradition, Chitragupta is the divine accountant in the court of Yama, the god of death. He writes every deed of every life — good and bad — into a great book, and when a life ends, the book is opened and read back. Nobody escapes the ledger.

Personal finance apps, meanwhile, are spreadsheets wearing a costume of their own: grey tables that judge you silently and that nobody opens twice. The idea behind Chitragupta Ledger is to give money the weight it already has in our heads. An expense is not a row in a table — it is a debt entry in your book of deeds. A saving is not a leftover — it is merit. And the month-end summary should not be a pie chart; it should be a judgement, pronounced by the court.

What it does

Chitragupta Ledger is a working personal money + habit ledger dressed as Yama's court at night — torch-lit, charcoal and antique gold, with Tamil display headings over a clean English UI.

  • Write in the book — record an Expense, Income, Saving or Good deed with amount (₹), a per-type category, a note and a date. Validation is strict: no ₹0 expenses, no future dates. New entries are "written in" with a quill animation.
  • The karma scales — every expense adds to the Pava (debt) side; income, savings and good deeds add to the Punya (merit) side. A live gold-and-ember gauge shows the balance, your net karma in rupees, and your recording streak.
  • The Ledger Book — entries live as parchment pages, grouped by date with day nets, filterable to Pava-only or Punya-only, with two-step "strike out" deletion and a full clear-the-book reset.
  • Yama's Verdict — the month's judgement: money in, money out, saved, good deeds, savings rate, and your "greatest leak" (the category quietly draining you) — ending in a one-line verdict chosen by a rule table, from "Swarga's gates stand open — a month of merit" down to "Naraka's clerks are sharpening their quills."
  • Shareable verdict card — one click renders the verdict to a 1080×1350 PNG using the Canvas 2D API (no libraries) and downloads it.
  • Court atmosphere — flickering CSS torch flames with a warm vignette (toggleable; prefers-reduced-motion starts dimmed). Ambience is visual-only; there are no audio files.
  • Private by design — zero backend, zero accounts. Data lives only in the browser's localStorage and never leaves the device. On first run the book is seeded with a few demo entries so the scales and verdict are alive immediately; clear them whenever you like.

How we built it

The build was spec-driven in Kiro from the first line, and the /.kiro directory is committed at the repo root:

  • Specs — .kiro/specs/chitragupta-ledger/ holds requirements.md (numbered requirements with acceptance criteria: entry creation, deletion/reset, the karma balance, the verdict), design.md (architecture, the localStorage data model, derived-values rules, the verdict rule table, the canvas-card design, error handling and a testing section) and tasks.md (the implementation checklist the app was built against).
  • Steering — .kiro/steering/design-system.md locks the court's design system: the exact palette as CSS custom properties (deep charcoal --ink, antique gold --gold, parchment, ember for Pava — with the rule "Pava is always ember; Punya is always gold, never swap them"), typography (Tamil display headings, clean English UI), component and motion rules, and a zero-external-assets rule. The stylesheet in the repo follows it token for token.
  • Hooks — .kiro/hooks/ contains the smoke-check-on-save agent hook (a fileEdited trigger on the three app files, with its .hook.json mirror for import into Kiro IDE). On every save it runs a three-part check: JS syntax, HTTP-200 reachability of the page and both assets from a local static server, and a spec-hygiene scan that fails the save if any external URL appears in the app files other than the single permitted Google Fonts stylesheet — mechanically enforcing the design system's zero-external-assets rule.
  • The app itself — zero-dependency HTML, CSS and JavaScript in three files (index.html, styles.css, app.js). No framework, no build step, no npm. Derived values (totals, streak, savings rate = (Income − Expenses) / Income, verdict) are computed from the entries on every render, never stored. All visuals are CSS gradients, one inline SVG gopuram silhouette and Unicode glyphs — zero image files and zero copyrighted assets, so the app runs offline and deploys to any static host.
  • Verification — the finished app was rendered in a real browser at phone (390×844) and desktop (1280×800) widths and every view inspected from screenshots: court header, scales, entry form, ledger pages, filters, verdict and the cleared-book empty state. That pass caught a real defect — on phone widths, ledger notes were truncating mid-word and category names wrapping — fixed in CSS only (the ≤480px rules now give the note column room and let notes wrap to two lines), re-rendered to confirm, then shipped.

Challenges we ran into

  • Making the costume serve the function. A parchment ledger page, a ruled margin line and a red thread are lovely — until entry rows have to fit a 390px phone screen next to an amount, a side badge and a delete button. The first phone render clipped notes to a few characters. The fix had to come from layout discipline (padding, glyph width, type sizes, two-line notes), not from removing information.
  • The verdict card PNG. Rendering the verdict to a shareable canvas image exposed a text-layout bug: a long verdict line wrapped onto the card's footer. It took several measured iterations — checking the actual rendered pixels, not just the code — before the wrapped line cleared the footer with a verified gap in the worst case.
  • Honesty in the demo data. Seeded demo entries make the first open feel alive, but they had to stay obviously erasable and never mix with the user's real book — hence seed entries span only the last six days, are clearly deletable per entry, and "Clear the book" leaves the ledger empty for good.

Accomplishments that we're proud of

  • A finance app people describe back to us in its own language — "my Pava is heavy this month" — which is the entire point of the costume.
  • A complete, working product in three files with zero dependencies: it will run in any modern browser, from a file, offline.
  • A /.kiro trail that actually governed the build: the palette in the shipped CSS is the palette in the steering file, and the hook enforces the steering file's hardest rule on every save.
  • A verdict engine with a real rule table and a named "greatest leak" — judgement with specifics, not a generic score.

What we learned

  • Spec-first development pays for itself most in the design system: when the palette, typography and "never swap Pava/Punya colours" rules are written down as steering, every generated screen arrives already in costume.
  • "Looks right in code" is not "looks right." Rendering at real device widths and reading the screenshots caught defects (truncated notes, the card overlap) that no amount of code review surfaced.
  • Constraints are a feature. Zero dependencies and zero external assets forced every visual idea into CSS, SVG and typography — and the result is faster, more private and more original than a library-assembled UI would have been.

What's next for Chitragupta Ledger

  • Weekly verdicts alongside the monthly one, and a streak-recovery ("penance") entry type for missed days.
  • An optional export/import of the book as a file, so the ledger can move between devices without any server.
  • More courts, more costumes: the same ledger engine re-skinned for other mythologies' accountants — the book is universal; only the court changes.
  • A public launch as a free, installable PWA so anyone can keep their book on their home screen.

Licence: MIT.

Built With

Share this project:

Updates

Submission history