<?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: Muhammad Ameen Khan</title>
    <description>The latest articles on DEV Community by Muhammad Ameen Khan (@muhammadameenkhan804).</description>
    <link>https://dev.to/muhammadameenkhan804</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%2F4246010%2Fac2f01cd-d2b4-4664-b832-65ba5897b639.jpg</url>
      <title>DEV Community: Muhammad Ameen Khan</title>
      <link>https://dev.to/muhammadameenkhan804</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/muhammadameenkhan804"/>
    <language>en</language>
    <item>
      <title>I Built GIF Tools That Run 100% in the Browser - No Uploads, No Server</title>
      <dc:creator>Muhammad Ameen Khan</dc:creator>
      <pubDate>Mon, 16 Nov 2026 09:20:22 +0000</pubDate>
      <link>https://dev.to/gifcove/i-built-gif-tools-that-run-100-in-the-browser-no-uploads-no-server-4e2</link>
      <guid>https://dev.to/gifcove/i-built-gif-tools-that-run-100-in-the-browser-no-uploads-no-server-4e2</guid>
      <description>&lt;p&gt;Every GIF tool I tried wanted the same three things: upload your file to their server, create an account, and accept a watermark on the way out.&lt;/p&gt;

&lt;p&gt;So I built &lt;a href="https://gifcove.com/" rel="noopener noreferrer"&gt;GIFCove&lt;/a&gt; the opposite way: a small set of GIF tools where &lt;strong&gt;everything happens on the visitor's own device&lt;/strong&gt;. No file ever touches a server - which means no upload wait, no storage cost, and nothing private leaving the user's machine. Here's how the three hardest tools work.&lt;/p&gt;

&lt;h2&gt;
  
  
  1. The Downloader: beating CORS with a fallback chain
&lt;/h2&gt;

&lt;p&gt;The &lt;a href="https://gifcove.com/gif-downloader/" rel="noopener noreferrer"&gt;GIF downloader&lt;/a&gt; takes a link from Giphy, Tenor, Reddit, Tumblr, Pinterest or X and returns the original GIF file. Each platform behaves differently:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Giphy&lt;/strong&gt; is the easy one - the media ID in the URL maps straight to the file.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;The rest block cross-origin fetches&lt;/strong&gt;, so the tool walks a chain of public CORS proxies and uses the first one that answers in time (each gets a hard timeout, ~9 seconds).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Last resort:&lt;/strong&gt; fetch the page's &lt;code&gt;og:image&lt;/code&gt; meta tag, which almost every platform sets to the GIF itself for sharing previews.
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="k"&gt;async&lt;/span&gt; &lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nf"&gt;fetchViaChain&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;url&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;sources&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="n"&gt;makeUrl&lt;/span&gt; &lt;span class="k"&gt;of&lt;/span&gt; &lt;span class="n"&gt;sources&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="k"&gt;try&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
      &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="n"&gt;res&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nf"&gt;fetchWithTimeout&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nf"&gt;makeUrl&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;url&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;9000&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
      &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;res&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;ok&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="n"&gt;res&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;catch&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;e&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="cm"&gt;/* try the next source */&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;
  &lt;span class="k"&gt;throw&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nb"&gt;Error&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;'All sources failed'&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;One honest detail: if a Reddit post turns out to be an MP4 video rather than a GIF, the tool says so plainly instead of handing back a broken "GIF".&lt;/p&gt;

&lt;h2&gt;
  
  
  2. Frame work: decode, draw, re-encode
&lt;/h2&gt;

&lt;p&gt;The combiner and resizer tools share one engine: decode the GIF into individual frames, draw each frame onto a &lt;code&gt;&amp;lt;canvas&amp;gt;&lt;/code&gt; at the right offset (GIF frames are often partial, so disposal methods matter), do the edit, then re-encode - inside a Web Worker, so a 200-frame GIF doesn't freeze the page.&lt;/p&gt;

&lt;h2&gt;
  
  
  3. Background removal: color keying, per frame
&lt;/h2&gt;

&lt;p&gt;The &lt;a href="https://gifcove.com/remove-background-from-gif/" rel="noopener noreferrer"&gt;background remover&lt;/a&gt; works like a tiny green-screen studio:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Sample the corner pixels to auto-detect the background color.&lt;/li&gt;
&lt;li&gt;For every pixel in every frame, measure its color distance from that key color and fade the alpha accordingly.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Despill&lt;/strong&gt; - remove the color fringe the key leaves on edges.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Flood-fill protection&lt;/strong&gt; - if the subject itself touches the key color (a white cat on a white background), protect connected subject regions so the tool doesn't eat the subject.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;And one deliberate limitation: it only accepts &lt;strong&gt;flat white, green or black backgrounds&lt;/strong&gt;. Anything else gets a clear "not supported" message up front. I'd rather refuse a file than return a chewed-up result and pretend it worked.&lt;/p&gt;

&lt;h2&gt;
  
  
  The trade-offs of zero backend
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;The user's CPU does the work&lt;/strong&gt; - a huge GIF on a weak phone is slow. Progress bars and worker-based processing are not optional.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Memory is the ceiling&lt;/strong&gt; - decoded frames are raw bitmaps; a long GIF can eat hundreds of MB.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;In exchange:&lt;/strong&gt; hosting costs almost nothing, there is no upload queue at peak times, and "we never see your files" is not a policy promise - it's an architectural fact.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;If you build browser-side tools: where do you draw the line? At what file size or processing time do you give up and send the work to a server?&lt;/p&gt;

</description>
      <category>showdev</category>
      <category>buildinpublic</category>
      <category>ai</category>
      <category>javascript</category>
    </item>
    <item>
      <title>I Built a Pay Increase Calculator in Vanilla JS - Here's the Math (and the Currency Trick)</title>
      <dc:creator>Muhammad Ameen Khan</dc:creator>
      <pubDate>Sun, 15 Nov 2026 14:08:14 +0000</pubDate>
      <link>https://dev.to/muhammadameenkhan804/i-built-a-pay-increase-calculator-in-vanilla-js-heres-the-math-and-the-currency-trick-4461</link>
      <guid>https://dev.to/muhammadameenkhan804/i-built-a-pay-increase-calculator-in-vanilla-js-heres-the-math-and-the-currency-trick-4461</guid>
      <description>&lt;p&gt;A raise sounds simple until you try to picture what it actually pays. "5%" feels abstract - but &lt;strong&gt;$250 more per month&lt;/strong&gt;, or &lt;strong&gt;$1.44 more per hour&lt;/strong&gt;, is real.&lt;/p&gt;

&lt;p&gt;So I built a free &lt;a href="https://calcversa.com/pay-increase-calculator/" rel="noopener noreferrer"&gt;pay increase calculator&lt;/a&gt; for CalcVersa that turns any raise into the numbers that matter. No framework, no backend — one HTML file with vanilla CSS and JS that runs entirely in the browser. Here's how it works under the hood.&lt;/p&gt;

&lt;h2&gt;
  
  
  The three ways a raise arrives
&lt;/h2&gt;

&lt;p&gt;Employers phrase raises three different ways, so the calculator has three modes:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Percentage&lt;/strong&gt; - "You got a 5% raise." → new pay = current pay × (1 + % ÷ 100)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Flat amount&lt;/strong&gt; - "We're adding $3,000." → percentage worked out backwards&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;New salary&lt;/strong&gt; - an offer letter with a new figure → the raise % is (new − old) ÷ old × 100&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;The trick is normalising everything to &lt;strong&gt;annual pay first&lt;/strong&gt;, whatever the input frequency:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nf"&gt;factor&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;freq&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;hours&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;freq&lt;/span&gt; &lt;span class="o"&gt;===&lt;/span&gt; &lt;span class="s1"&gt;'monthly'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;  &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="mi"&gt;12&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;freq&lt;/span&gt; &lt;span class="o"&gt;===&lt;/span&gt; &lt;span class="s1"&gt;'biweekly'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="mi"&gt;26&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;freq&lt;/span&gt; &lt;span class="o"&gt;===&lt;/span&gt; &lt;span class="s1"&gt;'weekly'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;   &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="mi"&gt;52&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;freq&lt;/span&gt; &lt;span class="o"&gt;===&lt;/span&gt; &lt;span class="s1"&gt;'hourly'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;   &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="n"&gt;hours&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="mi"&gt;52&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="c1"&gt;// annual&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="kd"&gt;var&lt;/span&gt; &lt;span class="n"&gt;annual&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;pay&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="nf"&gt;factor&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;freq&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;hours&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;From one annual number, every output is a division away: monthly = annual ÷ 12, bi-weekly = annual ÷ 26, hourly = annual ÷ (hours × 52). One source of truth, no rounding drift between fields.&lt;/p&gt;

&lt;h2&gt;
  
  
  The feature most calculators skip: the &lt;em&gt;real&lt;/em&gt; raise
&lt;/h2&gt;

&lt;p&gt;A 3% raise in a 4% inflation year is quietly a pay cut. So the tool also shows your raise after inflation:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kd"&gt;var&lt;/span&gt; &lt;span class="n"&gt;realPct&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="n"&gt;pct&lt;/span&gt; &lt;span class="o"&gt;/&lt;/span&gt; &lt;span class="mi"&gt;100&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="mi"&gt;1&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="n"&gt;infl&lt;/span&gt; &lt;span class="o"&gt;/&lt;/span&gt; &lt;span class="mi"&gt;100&lt;/span&gt;&lt;span class="p"&gt;)&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="o"&gt;*&lt;/span&gt; &lt;span class="mi"&gt;100&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;A 5% raise against 3% inflation gives a real raise of &lt;strong&gt;+1.94%&lt;/strong&gt; — genuinely ahead, but by less than the headline number suggests. This one stat is why I built the tool.&lt;/p&gt;

&lt;h2&gt;
  
  
  Live currency conversion with a fallback chain
&lt;/h2&gt;

&lt;p&gt;Users don't all earn in dollars, so the amount fields convert live between 19 currencies. Free exchange-rate APIs go down, so instead of trusting one source, the fetch walks a chain of four public endpoints and uses the first that answers with a complete rate table:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kd"&gt;var&lt;/span&gt; &lt;span class="n"&gt;chain&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nb"&gt;Promise&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;reject&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nb"&gt;Error&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;'start'&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="n"&gt;sources&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;forEach&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;s&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="n"&gt;chain&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;chain&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="k"&gt;catch&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;s&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;If every source fails, the currency symbol still changes and the user is told the amounts were &lt;em&gt;not&lt;/em&gt; converted - an honest error beats a silently wrong number.&lt;/p&gt;

&lt;h2&gt;
  
  
  What I deliberately kept boring
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;No framework.&lt;/strong&gt; The whole tool is one self-contained block, so it can be pasted into any page builder and just work.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Gross figures only&lt;/strong&gt;, clearly labelled - tax depends on country and state, and pretending otherwise would make the numbers lie.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Everything client-side.&lt;/strong&gt; Nothing typed into the calculator ever leaves the browser.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Try it
&lt;/h2&gt;

&lt;p&gt;The calculator is live here: &lt;a href="https://calcversa.com/pay-increase-calculator/" rel="noopener noreferrer"&gt;Pay Increase Calculator&lt;/a&gt; - it sits next to its sibling tools, a &lt;a href="https://calcversa.com/salary-calculator/" rel="noopener noreferrer"&gt;salary calculator&lt;/a&gt; and an overtime calculator, so you can go from "what's my hourly rate?" to "what's my raise worth?" in one place.&lt;/p&gt;

&lt;p&gt;If you build tools like this: what's your rule for when a calculator needs a backend, and when is one static file the better answer?&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>javascript</category>
      <category>buildinpublic</category>
      <category>showdev</category>
    </item>
  </channel>
</rss>
