<?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: Anurag Kashyap</title>
    <description>The latest articles on DEV Community by Anurag Kashyap (@kanurag4).</description>
    <link>https://dev.to/kanurag4</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.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F3893999%2F30f6a467-e5ab-4151-be5d-58a5b95f2460.jpg</url>
      <title>DEV Community: Anurag Kashyap</title>
      <link>https://dev.to/kanurag4</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/kanurag4"/>
    <language>en</language>
    <item>
      <title>I Built a Suite of 6 Financial Tools in My Browser Stack — Here's the Architecture</title>
      <dc:creator>Anurag Kashyap</dc:creator>
      <pubDate>Sun, 26 Apr 2026 10:53:59 +0000</pubDate>
      <link>https://dev.to/kanurag4/i-built-a-suite-of-6-financial-tools-in-my-browser-stack-heres-the-architecture-2jme</link>
      <guid>https://dev.to/kanurag4/i-built-a-suite-of-6-financial-tools-in-my-browser-stack-heres-the-architecture-2jme</guid>
      <description>&lt;h1&gt;
  
  
  I Built a Suite of 6 Financial Tools in My Browser Stack — Here's the Architecture
&lt;/h1&gt;

&lt;p&gt;&lt;strong&gt;KashVector is live.&lt;/strong&gt; Six free, client-side financial tools at &lt;a href="https://kashvector.com" rel="noopener noreferrer"&gt;kashvector.com&lt;/a&gt;. No login, no backend database, no data leaving your device. Everything runs in the browser.&lt;/p&gt;

&lt;p&gt;I came back to coding after 15 years away — last time I wrote software was mobile apps before the iPhone. I used Claude Code as my development partner throughout. This is a writeup of the architecture, the key decisions, and the AI-assisted workflow I built around it.&lt;/p&gt;




&lt;h2&gt;
  
  
  The Tools
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Stock Evaluator&lt;/strong&gt; — scores any ticker against Buffett, Dalio, and Graham frameworks using live Yahoo Finance data&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Budget Planner&lt;/strong&gt; — six-step wizard with payslip parsing, waterfall spending chart, and savings benchmarks&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Debt Recycling / Investment Property Calculator&lt;/strong&gt; — models converting home loan debt to tax-deductible investment debt&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Portfolio Health Check&lt;/strong&gt; — concentration risk analysis across sector, region, and individual stocks&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;FIRE Calculator&lt;/strong&gt; — Financial Independence number, time-to-retire, and Coast FIRE target&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Mortgage Calculator&lt;/strong&gt; — repayments, total interest, and offset/extra repayment impact modelling&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  Architecture: Deliberately Boring
&lt;/h2&gt;

&lt;p&gt;The hosting stack is as simple as it gets:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;GitHub → Cloudflare Pages (auto-deploy on push)
         ↑
         Cloudflare Worker (Yahoo Finance proxy only)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Cloudflare Pages&lt;/strong&gt; serves all static assets. Every &lt;code&gt;git push&lt;/code&gt; triggers an automatic redeploy — no dashboard clicks, no manual steps.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;One Cloudflare Worker&lt;/strong&gt; handles the only piece that couldn't be client-side: Yahoo Finance data. Yahoo requires a valid cookie and &lt;code&gt;crumb&lt;/code&gt; authentication token on every request — you can't call it directly from a browser due to CORS and the auth handshake. The Worker (~150 lines of JavaScript) manages that handshake, fetches the financial data, and returns clean JSON with the right CORS headers. Every other tool — Budget Planner, Debt Recycling, Portfolio Health Check, FIRE, Mortgage — fetches zero external data. They compute entirely from what you type in.&lt;/p&gt;




&lt;h2&gt;
  
  
  The One Architecture Decision That Paid Off Twice
&lt;/h2&gt;

&lt;p&gt;During planning for the Stock Evaluator, we made a rule: &lt;strong&gt;all financial logic must be pure functions with no browser dependencies.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;No &lt;code&gt;document&lt;/code&gt;, no &lt;code&gt;window&lt;/code&gt;, no DOM manipulation inside calculation code. Scoring functions take numbers in, return numbers out. At the time it felt like unnecessary discipline for a browser app.&lt;/p&gt;

&lt;p&gt;It paid off in two ways:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;1. Android in a weekend.&lt;/strong&gt; Capacitor wraps a web app in a native Android WebView. Because the calculation logic had zero browser coupling, &lt;code&gt;npx cap sync&lt;/code&gt; pulled the web code into the Android project cleanly. No Kotlin. No Java. No rewrite. The same JavaScript that runs in Chrome runs inside the native app. Android Studio handled the signing keystore and AAB generation — the actual build-and-sign cycle took an afternoon to learn and became routine quickly.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;2. Consistent logic across the suite.&lt;/strong&gt; As I added more tools, the same discipline applied. Every calculator's core logic is independently testable and portable.&lt;/p&gt;




&lt;h2&gt;
  
  
  The Budget Planner: A Different Beast
&lt;/h2&gt;

&lt;p&gt;Five of the six tools are vanilla JavaScript — single HTML files or minimal multi-file setups. The Budget Planner is the outlier: &lt;strong&gt;React + Vite + Tailwind&lt;/strong&gt;, a full build pipeline.&lt;/p&gt;

&lt;p&gt;That complexity was earned. The tool has:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;A six-step wizard with conditional branching based on income type (gross vs net, PAYG vs self-employed)&lt;/li&gt;
&lt;li&gt;Australian superannuation calculated separately from take-home pay&lt;/li&gt;
&lt;li&gt;A waterfall chart (Chart.js) showing exactly where money goes&lt;/li&gt;
&lt;li&gt;Savings rate benchmarked against Australian demographic data by age bracket&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The feature I'm most proud of is &lt;strong&gt;drag-and-drop payslip parsing&lt;/strong&gt;. Drop a PDF, Excel, or CSV payslip onto the income step and it auto-fills your income and pay frequency. Everything runs in the browser using &lt;code&gt;pdf-parse&lt;/code&gt; and &lt;code&gt;xlsx&lt;/code&gt; — the file is never uploaded anywhere.&lt;/p&gt;

&lt;p&gt;Getting parsing right required handling a surprising variety of real payslip formats:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Fields in reversed order ("$4,200.00 — TOTAL NET PAY")&lt;/li&gt;
&lt;li&gt;Labels like "TOTAL NET PAY - Bank Credit" as a single string&lt;/li&gt;
&lt;li&gt;Date ranges written as "1 March – 31 March" for frequency detection instead of numbers&lt;/li&gt;
&lt;li&gt;Superannuation listed as a deduction rather than a separate line&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  Key Bugs Worth Documenting
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Dividend double-counting (Debt Recycling Calculator).&lt;/strong&gt; The total loan balance wasn't decreasing year-over-year — it stayed nearly flat. The bug: dividends were being added to the investment portfolio value &lt;em&gt;and&lt;/em&gt; counted in the cash flow used to pay down debt. Money was being recycled twice. The fix was a one-line deletion once I understood the mechanic, but diagnosing it required tracing the cash flow model step by step.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Chart.js resize loop (Debt Recycling Calculator).&lt;/strong&gt; Charts were resizing every time the user expanded the year-by-year breakdown table, because Chart.js was recalculating dimensions after each layout shift. Fix: pin the Y-axis width via &lt;code&gt;afterFit&lt;/code&gt; callback and call &lt;code&gt;chart.resize()&lt;/code&gt; explicitly on the table toggle event.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;CSS grid blowout (Budget Planner).&lt;/strong&gt; The expense breakdown table was blowing past its container on narrow screens. Root cause: CSS grid columns default to &lt;code&gt;min-width: auto&lt;/code&gt;, which means a long text string expands the column indefinitely. Fix: &lt;code&gt;min-width: 0&lt;/code&gt; on the column definition.&lt;/p&gt;




&lt;h2&gt;
  
  
  The AI Workflow I Built Around Claude
&lt;/h2&gt;

&lt;p&gt;Using Claude Code as a coding partner is table stakes now. The more interesting thing is the &lt;strong&gt;structured workflow&lt;/strong&gt; I built around it.&lt;/p&gt;

&lt;h3&gt;
  
  
  Superpowers Plugin
&lt;/h3&gt;

&lt;p&gt;A set of workflow skills that enforce a sequence before any feature starts:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;brainstorm → plan → implement → verify
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The planning phase is where the pure-functions decision came from. Having a structured moment to think about architecture — before writing any code — consistently surfaces decisions that would be painful to retrofit later.&lt;/p&gt;

&lt;h3&gt;
  
  
  Peer-Review Sub-Agent (I Built This)
&lt;/h3&gt;

&lt;p&gt;After finishing a feature, I trigger an isolated Claude agent that has &lt;strong&gt;zero context&lt;/strong&gt; of how the code was written. It receives only the output — the files, the diff, the feature description. It reviews cold, like a senior engineer picking up someone else's PR.&lt;/p&gt;

&lt;p&gt;It returns a prioritised issue list ranked by criticality:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Breaking bugs&lt;/li&gt;
&lt;li&gt;Logic errors&lt;/li&gt;
&lt;li&gt;Edge cases&lt;/li&gt;
&lt;li&gt;Style / code quality&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;No anchoring to my decisions. No "we did it this way because." Just an independent read. It catches things I miss — usually edge cases around input validation and boundary conditions.&lt;/p&gt;

&lt;h3&gt;
  
  
  Lessons Learned File
&lt;/h3&gt;

&lt;p&gt;After every project, Claude updates a running markdown file with things worth remembering. Before starting anything new, Claude reads it. This is how I stopped making the same debugging mistakes twice. The dividend double-counting bug went into that file. So did the Chart.js resize behaviour. Compounding knowledge across projects, not just within them.&lt;/p&gt;




&lt;h2&gt;
  
  
  What's Next
&lt;/h2&gt;

&lt;p&gt;The stock evaluator Android app goes public once the Play Store closed testing completes (Google requires 12 testers for 14 consecutive days for new personal accounts before production access). More tools are planned — retirement modelling, property vs rent comparison.&lt;/p&gt;

&lt;p&gt;All tools are free at &lt;a href="https://kashvector.com" rel="noopener noreferrer"&gt;kashvector.com&lt;/a&gt;. No sign-up, no tracking, no subscriptions.&lt;/p&gt;

</description>
      <category>architecture</category>
      <category>showdev</category>
      <category>sideprojects</category>
      <category>webdev</category>
    </item>
  </channel>
</rss>
