<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Raj Kumar</title>
    <description>The latest articles on DEV Community by Raj Kumar (@raj_kumar_f9644c96a5da002).</description>
    <link>https://dev.to/raj_kumar_f9644c96a5da002</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F1608822%2Ff2ce9fc2-0a85-4051-8684-0fe0683bba9c.jpg</url>
      <title>DEV Community: Raj Kumar</title>
      <link>https://dev.to/raj_kumar_f9644c96a5da002</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/raj_kumar_f9644c96a5da002"/>
    <language>en</language>
    <item>
      <title>What I learned parsing Indian mutual fund statements in the browser</title>
      <dc:creator>Raj Kumar</dc:creator>
      <pubDate>Tue, 17 Nov 2026 19:57:21 +0000</pubDate>
      <link>https://dev.to/raj_kumar_f9644c96a5da002/what-i-learned-parsing-indian-mutual-fund-statements-in-the-browser-3e6p</link>
      <guid>https://dev.to/raj_kumar_f9644c96a5da002/what-i-learned-parsing-indian-mutual-fund-statements-in-the-browser-3e6p</guid>
      <description>&lt;p&gt;Every Indian mutual fund investor can get a CAS: a PDF from CAMS or KFintech listing every folio and every transaction, locked with a password you choose when you ask for it. I wanted a portfolio view built from it, and I didn't want the PDF to touch a server. Mine or anyone's. I built &lt;a href="https://sachfolio.com/app/?sample" rel="noopener noreferrer"&gt;Sachfolio&lt;/a&gt; to do that, and this is the stuff I didn't expect.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;A CAS isn't a table.&lt;/strong&gt; It's text placed at x/y positions. pdf.js gives you runs of text with coordinates, and you rebuild lines yourself. KFintech statements sometimes draw the same text twice, slightly offset, so you have to drop the twin without dropping a real repeated value. Some pages come out rotated if the user rotated them in a viewer and saved. Nothing in the PDF tells you it's a CAMS detailed statement rather than a KFintech summary; you find out from headers and markers on the first pages.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;I use the legacy pdf.js build on purpose.&lt;/strong&gt; The modern build leans on very new JavaScript. A lot of phones in India run older Android WebViews, and the people with those phones are exactly the people who'd want this.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Floats are out.&lt;/strong&gt; Statements print units to three or four decimals and money to two. Every number goes from its printed string straight into big.js and keeps its printed scale, because the scale tells you how much rounding the registrar did:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="cm"&gt;/** Half a unit in the last printed place: the rounding a printed value can hide. */&lt;/span&gt;
&lt;span class="k"&gt;export&lt;/span&gt; &lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nf"&gt;halfUlp&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;n&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nc"&gt;Num&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nc"&gt;Big&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nc"&gt;Big&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;5&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;times&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nc"&gt;Big&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;10&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;pow&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;n&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;scale&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Checks only allow the rounding the digits allow.&lt;/strong&gt; Units × NAV never equals the printed value exactly. A percentage tolerance would hide real misreads, so the allowed gap is built from the half-units of the three printed numbers. Opening units plus every transaction has to land on the closing units exactly. When a scheme fails, it's shown as printed, marked, and left out of the totals. I'd rather show you a gap than a confident wrong number.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Privacy is a test, not a sentence on the home page.&lt;/strong&gt; The CSP is deny-by-default with &lt;code&gt;connect-src 'self'&lt;/code&gt; and Trusted Types; the pdf.js worker can't connect anywhere. A Playwright suite records every request across page, worker and service worker, and fails the build if anything goes to another origin, if a request changes depending on which PDF was opened, or if anything new happens after "Clear everything".&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Where it stops.&lt;/strong&gt; MF Central statements and scans fail with a clear error. For NSDL and CDSL statements I read mutual fund units and ETFs and list shares and bonds as not read. Tax output is capital gains per lot with the rule that made it short or long term, and the Schedule 112A figures. No tax amount, nothing about what to sell.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;If you're a developer:&lt;/strong&gt; the same reader is on npm as &lt;code&gt;@sachfolio/cas-reader&lt;/code&gt; (BUSL-1.1, beta), with output shaped like &lt;a href="https://github.com/codereverser/casparser" rel="noopener noreferrer"&gt;casparser&lt;/a&gt;, the Python library I cross-check against. There's a sandbox you can hit without a key:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;curl https://api.sachfolio.com/v1/samples/dev-sample
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;If your statement fails, the error code helps me. The PDF itself, please keep.&lt;/p&gt;

</description>
      <category>javascript</category>
      <category>webdev</category>
      <category>privacy</category>
      <category>pdf</category>
    </item>
    <item>
      <title>I built 30 financial decision engines in a week. Google indexed one.</title>
      <dc:creator>Raj Kumar</dc:creator>
      <pubDate>Tue, 14 Apr 2026 16:13:46 +0000</pubDate>
      <link>https://dev.to/raj_kumar_f9644c96a5da002/i-built-30-financial-decision-engines-in-a-week-google-indexed-one-102</link>
      <guid>https://dev.to/raj_kumar_f9644c96a5da002/i-built-30-financial-decision-engines-in-a-week-google-indexed-one-102</guid>
      <description>&lt;p&gt;Last month, I spent two hours trying to decide whether to prepay ₹5L on my home&lt;br&gt;
loan or leave it in a Nifty 50 index fund. I have a math background. I write&lt;br&gt;
software for a living. It should not take two hours.&lt;/p&gt;

&lt;p&gt;Every Indian personal-finance calculator I opened was either asking for my&lt;br&gt;
email before showing a result, quietly funnelling me toward a loan partner, or&lt;br&gt;
running on US tax assumptions. I ended up asking Claude. Claude gave me a&lt;br&gt;
plausible answer. I asked it again the next day to check. It gave me a&lt;br&gt;
different plausible answer. Not wildly different — but different enough that&lt;br&gt;
I didn't trust either.&lt;/p&gt;

&lt;p&gt;So I opened a new Next.js repo that night.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://arthaengine.com" rel="noopener noreferrer"&gt;arthaengine.com&lt;/a&gt; is what fell out of that week.&lt;br&gt;
30+ financial tools — EMI, SIP, rent vs buy, the full Indian tax regime&lt;br&gt;
comparison, a job offer comparator, retirement corpus, HRA, gratuity, EPF,&lt;br&gt;
home-ownership cost, a debt-payoff planner. No signup. No ads. No lead&lt;br&gt;
capture. Every number runs in your browser and dies there.&lt;/p&gt;

&lt;p&gt;This post is about three things I didn't expect to learn while building it:&lt;br&gt;
Why Indian fintech calculators are structurally broken, why "calculator" is&lt;br&gt;
the wrong word, and why Google has indexed exactly one of my forty-nine pages.&lt;/p&gt;

&lt;h2&gt;
  
  
  The incumbents aren't trying to help you
&lt;/h2&gt;

&lt;p&gt;Open any Indian finance calculator from a bank, an AMC, or a tax-filing&lt;br&gt;
platform. The math is usually right. That isn't where they fail you.&lt;/p&gt;

&lt;p&gt;They fail at the &lt;strong&gt;defaults&lt;/strong&gt; and the &lt;strong&gt;next step&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;A home-loan EMI calculator from a bank will happily show you your EMI for a&lt;br&gt;
₹50L loan at 8.5% over 20 years. It will not compare that against a 15-year&lt;br&gt;
tenure. It will not run a prepayment scenario. It will not tell you that at&lt;br&gt;
your income, renting for five more years and investing the down payment&lt;br&gt;
likely beats buying.&lt;/p&gt;

&lt;p&gt;Because the bank's calculator is a lead-capture form with arithmetic attached.&lt;br&gt;
Of course, it isn't going to tell you not to take a home loan.&lt;/p&gt;

&lt;p&gt;The same is true of every "free" calculator from an AMC (routes you to their website)&lt;br&gt;
SIP), an insurance aggregator (sells you term), or a tax-filing platform&lt;br&gt;
(upsells Premium). The math serves the funnel.&lt;/p&gt;

&lt;p&gt;This isn't a conspiracy; it's incentives. But once you see it, you can't&lt;br&gt;
unsee it, and you realise the entire category is structurally broken for the&lt;br&gt;
thing a user actually wants: &lt;strong&gt;an honest, comparative answer.&lt;/strong&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Why I stopped calling them calculators
&lt;/h2&gt;

&lt;p&gt;A calculator takes inputs and returns a number.&lt;/p&gt;

&lt;p&gt;Loan: ₹50,00,000&lt;br&gt;
Rate: 8.5%&lt;br&gt;
Tenure: 20 years&lt;br&gt;
——————————————&lt;br&gt;
EMI: ₹43,391&lt;/p&gt;

&lt;p&gt;Useful. Now what?&lt;/p&gt;

&lt;p&gt;The real question was never "what's my EMI." It was "can I afford this house,&lt;br&gt;
and if I can, should I buy it, and if I should, is this the right tenure,&lt;br&gt;
and is prepaying better than investing the difference?" Five decisions&lt;br&gt;
nested inside a number.&lt;/p&gt;

&lt;p&gt;A decision engine takes inputs and helps you choose between paths. Every&lt;br&gt;
page on the site defaults to &lt;strong&gt;two-sided comparison&lt;/strong&gt;:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Not "your EMI" — buying vs renting + investing the difference over 10
years, with the breakeven year highlighted&lt;/li&gt;
&lt;li&gt;Not "your take-home" — Offer A and Offer B side-by-side, both under the
new and old tax regimes, NPV'd over 5 years&lt;/li&gt;
&lt;li&gt;Not "your interest saved by prepaying" — prepayment at your loan's
effective rate vs the same EMI invested at historical equity CAGR,
broken out year by year&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This reframing changed the entire UI. Every page has two columns, not one.&lt;br&gt;
The primary CTA is "compare", not "calculate." There's no "submit" button —&lt;br&gt;
Inputs update results live, because the whole point is to play with&lt;br&gt;
scenarios, not to request an answer.&lt;/p&gt;

&lt;p&gt;Small design shift, large product implication: the tool stops pretending it&lt;br&gt;
has an answer. It shows you the math and gets out of the way.&lt;/p&gt;

&lt;h2&gt;
  
  
  The technical problem nobody talks about: Indian tax
&lt;/h2&gt;

&lt;p&gt;I'll spare you the Next.js / Tailwind / Vercel paragraph. You've read a&lt;br&gt;
hundred of them. The interesting engineering problem wasn't the stack.&lt;/p&gt;

&lt;p&gt;The interesting problem was the Indian income tax.&lt;/p&gt;

&lt;p&gt;Most calculators online handle Indian tax as if it were three if-statements:&lt;br&gt;
Apply slab, subtract deductions, done. That is not how the system works, and&lt;br&gt;
the difference is ₹20,000-80,000 a year for a typical salaried professional.&lt;/p&gt;

&lt;p&gt;Here's what a correct calculation actually has to handle:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Two regimes.&lt;/strong&gt; The new regime (default from 2023) has different slabs,
no HRA, no 80C, but a higher standard deduction and a higher rebate
threshold.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;87A rebate.&lt;/strong&gt; Full tax rebate up to ₹7L taxable income under new
regime, ₹5L under old. This creates a &lt;strong&gt;cliff&lt;/strong&gt; — at ₹7,00,001, tax
doesn't jump from zero to a few hundred, it jumps to ₹25,000+. Miss this
, and you're wrong for anyone within ₹25K of the threshold.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Marginal relief&lt;/strong&gt; — a specific provision that exists &lt;em&gt;because&lt;/em&gt; of the
87A cliff, softening the jump. Most calculators don't implement it.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Surcharge tiers&lt;/strong&gt; at ₹50L / ₹1Cr / ₹2Cr / ₹5Cr. Each adds a percentage
on top of tax. The tiers differ between regimes.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Surcharge marginal relief&lt;/strong&gt; — the surcharge jumps also have marginal
relief. I've yet to find a competitor that handles this right.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;4% health &amp;amp; education cess&lt;/strong&gt; on top of everything.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;HRA exemption&lt;/strong&gt; — least of three: HRA received, 50%/40% of basic
(metro/non-metro), rent paid minus 10% of the basic.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Standard deduction&lt;/strong&gt; — ₹50K (old) or ₹75K (new, post-Budget 2024).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;80C ceiling&lt;/strong&gt; at ₹1.5L, &lt;strong&gt;but&lt;/strong&gt; 80CCD(1B) NPS (₹50K) is separate and
80CCD(2) employer NPS is uncapped.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Skip any of these, and the calculator is quietly wrong. Most competitors I&lt;br&gt;
tested got 4-5 right. A few got 7. None of the ones I found handled surcharge marginal&lt;br&gt;
relief correctly.&lt;/p&gt;

&lt;p&gt;Writing this was the single largest chunk of the week. I ended up building&lt;br&gt;
a pure-function tax module with 40+ test cases lifted from actual Income&lt;br&gt;
Tax Department examples, because the only way to trust the output is to&lt;br&gt;
Prove it against the authoritative source.&lt;/p&gt;

&lt;p&gt;Not glamorous work. But it's the work that makes the difference between a&lt;br&gt;
calculator that &lt;em&gt;looks&lt;/em&gt; right and one that &lt;em&gt;is&lt;/em&gt; right.&lt;/p&gt;

&lt;h2&gt;
  
  
  Google has indexed one page out of forty-nine
&lt;/h2&gt;

&lt;p&gt;Here's the part that's been eating me this week.&lt;/p&gt;

&lt;p&gt;I shipped the site with what I thought was a clean SEO foundation — proper&lt;br&gt;
sitemap, per-page canonicals, Open Graph tags, JSON-LD &lt;code&gt;SoftwareApplication&lt;/code&gt;&lt;br&gt;
schema on every calculator, strict robots.txt allowing everything except&lt;br&gt;
auth routes. Google Search Console accepted the sitemap on day one and&lt;br&gt;
discovered all 49 URLs.&lt;/p&gt;

&lt;p&gt;A week later, Search Console shows:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Indexed: 1&lt;/strong&gt; (the homepage)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Not indexed: 48&lt;/strong&gt; — reason: &lt;code&gt;Discovered – currently not indexed&lt;/code&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;I spent an afternoon convinced I'd broken something. Canonicals wrong? No.&lt;br&gt;
Pages blocked? No. JavaScript-rendered content Google can't see? No — I&lt;br&gt;
checked with URL Inspection, full HTML renders server-side via React Server&lt;br&gt;
Components.&lt;/p&gt;

&lt;p&gt;The issue isn't technical. Google doesn't crawl new domains aggressively.&lt;br&gt;
You can do everything right and still sit in the discovery queue because&lt;br&gt;
the domain has no authority signals yet — no backlinks, no engagement, no&lt;br&gt;
reason for Google to spend crawl budget on your sitemap.&lt;/p&gt;

&lt;p&gt;This is the most important lesson of the week, and it has nothing to do&lt;br&gt;
with code: &lt;strong&gt;technical SEO is necessary but not sufficient.&lt;/strong&gt; What unblocks&lt;br&gt;
indexing is external signals — other sites linking to yours, real users&lt;br&gt;
visiting, real time-on-page — not a cleaner canonical tag.&lt;/p&gt;

&lt;p&gt;Which is partly why I'm writing this. If you read this far and the site is&lt;br&gt;
worth five minutes of your time, that's what breaks the logjam. Not an ego&lt;br&gt;
thing — a literal "Google has to see this domain exists in the wider web"&lt;br&gt;
thing.&lt;/p&gt;

&lt;h2&gt;
  
  
  What I won't pretend
&lt;/h2&gt;

&lt;p&gt;A few honest things I won't dress up:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;The UI is rough in places.&lt;/strong&gt; Large-number inputs on mobile are painful.
I know. It's on the list.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;There's no business model.&lt;/strong&gt; I don't want one. The moment I add an
affiliate link, I become the thing that annoyed me into building this.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Some of the "advanced" engines simplify.&lt;/strong&gt; The FIRE planner and
retirement corpus calculator assume constant real returns — fine for
directional thinking, not sufficient for financial planning. There's a
methodology note on each page. Read it before making a real decision.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Three to try
&lt;/h2&gt;

&lt;p&gt;If you've got a few minutes:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;a href="https://arthaengine.com/job-offer-comparator" rel="noopener noreferrer"&gt;Job Offer Comparator&lt;/a&gt; —
Paste two offers, get a full CTC-to-in-hand breakdown under both tax
regimes, side-by-side&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://arthaengine.com/rent-vs-buy-calculator" rel="noopener noreferrer"&gt;Rent vs Buy&lt;/a&gt; — 10-year
simulation with breakeven year&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://arthaengine.com/salary-tax-calculator" rel="noopener noreferrer"&gt;Salary Tax&lt;/a&gt; — both
regimes, with every deduction plus the surcharge/cess/rebate/
marginal-relief logic that most others skip&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;If you hit a bug or disagree with the math, tell me. I'd rather fix a&lt;br&gt;
Wrong answer, then ship a new feature.&lt;/p&gt;




&lt;p&gt;&lt;em&gt;Rajkumar Anguluri. Software developer. Built this solo over a week.&lt;br&gt;
Not monetising, not taking leads, not building a funnel.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>nextjs</category>
      <category>showdev</category>
      <category>india</category>
    </item>
  </channel>
</rss>
