<?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: Știuriuc Sorin-Marian</title>
    <description>The latest articles on DEV Community by Știuriuc Sorin-Marian (@sorin_stiuriuc).</description>
    <link>https://dev.to/sorin_stiuriuc</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%2F3942973%2F039666fd-da2a-4038-a866-9d0924925532.jpg</url>
      <title>DEV Community: Știuriuc Sorin-Marian</title>
      <link>https://dev.to/sorin_stiuriuc</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/sorin_stiuriuc"/>
    <language>en</language>
    <item>
      <title>Modeling Romania's salary taxes in TypeScript: lessons from building salariile.ro</title>
      <dc:creator>Știuriuc Sorin-Marian</dc:creator>
      <pubDate>Fri, 12 Jun 2026 18:36:15 +0000</pubDate>
      <link>https://dev.to/sorin_stiuriuc/modeling-romanias-salary-taxes-in-typescript-lessons-from-building-salariilero-20o</link>
      <guid>https://dev.to/sorin_stiuriuc/modeling-romanias-salary-taxes-in-typescript-lessons-from-building-salariilero-20o</guid>
      <description>&lt;p&gt;I spent the last few weeks building &lt;a href="https://salariile.ro" rel="noopener noreferrer"&gt;salariile.ro&lt;/a&gt;, a salary calculator for Romania. It sounds like a weekend project: take the gross salary, subtract three percentages, show the net. It was not. Here is what made it interesting, and what I would tell anyone who needs to model payroll or tax rules in code.&lt;/p&gt;

&lt;h2&gt;
  
  
  The domain is the hard part
&lt;/h2&gt;

&lt;p&gt;Romanian salary math in 2026 looks simple on paper: 25% pension contribution (CAS), 10% health insurance (CASS), 10% income tax after deductions, plus 2.25% paid by the employer on top (CAM). The complexity hides in the details:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;The personal deduction is not a constant. It is a curve that depends on income and the number of dependents, and it phases out completely above a threshold.&lt;/li&gt;
&lt;li&gt;Meal vouchers are taxed differently from cash. CASS and income tax apply to their value, but the tax money is withheld from your cash salary while the full nominal value lands on the card. Many calculators get this subtly wrong, and people then wonder why the payslip does not match the estimate.&lt;/li&gt;
&lt;li&gt;Sector rules (construction, agriculture) and the minimum wage facility change the formula depending on contract details.&lt;/li&gt;
&lt;li&gt;The rules change constantly. The minimum wage changes again on July 1, 2026, and several thresholds are indexed to it.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;My main takeaway: encode rules as data, not as ifs. Every fiscal period is a config object with rates, thresholds, deduction tables and links to the legal source. The calculation engine is a pure function from (config, input) to a payslip breakdown. When the July 2026 rules land, that will be a new config entry plus a set of tests, not a refactor.&lt;/p&gt;

&lt;h2&gt;
  
  
  Test against official examples
&lt;/h2&gt;

&lt;p&gt;The Romanian tax authority publishes norms for Declaration 112 with worked examples. Every rule I implement gets a test case traced back to an official source, and where two sources disagree, a comment links the exact article of law I followed. For a YMYL topic this is the only thing that keeps the project honest.&lt;/p&gt;

&lt;h2&gt;
  
  
  The web part: boring on purpose
&lt;/h2&gt;

&lt;p&gt;Next.js 16 App Router, React 19, TypeScript, deployed on Vercel. Server Components everywhere, with the calculator as the only real client component. No cookies, no ads, no tracking scripts. For search visibility the unglamorous things mattered most: correct JSON-LD (Person, FAQPage), a sitemap that actually updates, llms.txt for AI crawlers, and pages that each answer one question instead of one page trying to answer everything.&lt;/p&gt;

&lt;h2&gt;
  
  
  What surprised me
&lt;/h2&gt;

&lt;p&gt;While researching the niche I found that the sites ranking top 3 for "calculator salariu" include one with almost zero backlink authority and another still showing rules that expired in 2024. In this niche, search engines seem to reward being current and precise more than raw link mass. Encouraging, if you are building something accurate.&lt;/p&gt;

&lt;p&gt;The calculator is live at &lt;a href="https://salariile.ro" rel="noopener noreferrer"&gt;salariile.ro&lt;/a&gt; and I am happy to answer questions about modeling tax rules in TypeScript. It is a surprisingly fun domain once you accept the chaos.&lt;/p&gt;

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