<?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>Forem: Nowshad Hossain Rahat</title>
    <description>The latest articles on Forem by Nowshad Hossain Rahat (@nhrdev).</description>
    <link>https://forem.com/nhrdev</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%2F3681714%2Fed219ba5-1bbe-4792-a3fc-a6389a710cf1.png</url>
      <title>Forem: Nowshad Hossain Rahat</title>
      <link>https://forem.com/nhrdev</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://forem.com/feed/nhrdev"/>
    <language>en</language>
    <item>
      <title>Why I Chose Svelte and Zero-Knowledge Encryption for My New Chrome Extension</title>
      <dc:creator>Nowshad Hossain Rahat</dc:creator>
      <pubDate>Mon, 26 Jan 2026 03:50:02 +0000</pubDate>
      <link>https://forem.com/nhrdev/why-i-chose-svelte-and-zero-knowledge-encryption-for-my-new-chrome-extension-1oc8</link>
      <guid>https://forem.com/nhrdev/why-i-chose-svelte-and-zero-knowledge-encryption-for-my-new-chrome-extension-1oc8</guid>
      <description>&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fd9pt3wyrxrsg9k0i7cvi.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fd9pt3wyrxrsg9k0i7cvi.png" alt=" " width="800" height="336"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Building a clipboard manager sounds simple until you consider the two biggest constraints in 2026: &lt;strong&gt;Privacy&lt;/strong&gt; and &lt;strong&gt;Browser Performance&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;I just launched the &lt;strong&gt;Encrypted Clipboard Manager&lt;/strong&gt;, and I wanted to share some of the technical decisions I made while building it-specifically why I moved away from common extension patterns in favor of Svelte and E2E encryption.&lt;/p&gt;




&lt;h2&gt;
  
  
  1. Why Svelte for a Chrome Extension?
&lt;/h2&gt;

&lt;p&gt;Most extensions use React or Vue, but for a tool that lives in the &lt;strong&gt;Side Panel&lt;/strong&gt; and interacts with every page you visit, bundle size and "cold-start" time are everything.&lt;/p&gt;

&lt;p&gt;Svelte was a non-negotiable choice for me because:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;No Virtual DOM&lt;/strong&gt;: Svelte compiles to highly optimized vanilla JS. When the Side Panel is opened, it's interactive almost instantly.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Reactive State&lt;/strong&gt;: Managing clipboard history updates across multiple components (Sidebar, Floating Notch, Settings) is incredibly clean with Svelte’s &lt;code&gt;$state&lt;/code&gt; and &lt;code&gt;$effect&lt;/code&gt; signals.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;I used a centralized Svelte store to handle real-time updates from the background service worker, ensuring that the UI always reflects the local IndexedDB state without unnecessary re-renders.&lt;/p&gt;

&lt;h2&gt;
  
  
  2. Implementing Zero-Knowledge Encryption
&lt;/h2&gt;

&lt;p&gt;"Privacy by design" is hard. For this extension, I implemented a &lt;strong&gt;Zero-Knowledge Architecture&lt;/strong&gt; using the &lt;strong&gt;Web Crypto API&lt;/strong&gt;. &lt;/p&gt;

&lt;p&gt;The flow works like this:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt; &lt;strong&gt;Local Encryption&lt;/strong&gt;: Before an item (text or image) is synced to the cloud, it is encrypted locally in the background service worker using a user-defined master password.&lt;/li&gt;
&lt;li&gt; &lt;strong&gt;PBKDF2 Derivation&lt;/strong&gt;: I use PBKDF2 to derive a strong encryption key from the password, combined with a local salt.&lt;/li&gt;
&lt;li&gt; &lt;strong&gt;No Keys on Server&lt;/strong&gt;: The raw password and the derived key &lt;em&gt;never&lt;/em&gt; leave the user's browser. &lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;This ensures that even if my backend was compromised, the data stored in MongoDB is just unreadable blobs.&lt;/p&gt;

&lt;h2&gt;
  
  
  3. Utilizing the Chrome Side Panel API
&lt;/h2&gt;

&lt;p&gt;One of the biggest UX improvements I made was moving away from the traditional "Popup" UI. Popups are ephemeral—they close as soon as you click the page. &lt;/p&gt;

&lt;p&gt;By utilizing the &lt;strong&gt;Side Panel API&lt;/strong&gt;, the extension now has a persistent home.&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="c1"&gt;// Opening the side panel on command&lt;/span&gt;
&lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nx"&gt;chrome&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;sidePanel&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;setOptions&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt;
  &lt;span class="na"&gt;path&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;sidebar/index.html&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="na"&gt;enabled&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;true&lt;/span&gt;
&lt;span class="p"&gt;});&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This allows for a true multitasking workflow where you can drag and drop items from your history directly into your active tabs.&lt;/p&gt;

&lt;h2&gt;
  
  
  4. Performance &amp;amp; Memory Management
&lt;/h2&gt;

&lt;p&gt;Handling images in a clipboard history can quickly bloat memory if not handled correctly. I used &lt;strong&gt;IndexedDB&lt;/strong&gt; for local storage and implemented a proper thumbnail generation service in an &lt;strong&gt;offscreen document&lt;/strong&gt;. &lt;/p&gt;

&lt;p&gt;This keeps the main background script lightweight while offloading the heavy lifting of image processing to a separate thread, preventing browser jank.&lt;/p&gt;




&lt;h2&gt;
  
  
  The Result
&lt;/h2&gt;

&lt;p&gt;The result is a clipboard manager that is:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Fast&lt;/strong&gt;: Svelte-powered and Side-Panel native.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Private&lt;/strong&gt;: Zero-knowledge encryption by default.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Reliable&lt;/strong&gt;: Handles binary data and complex sync logic without breaking a sweat.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;I’d love to hear from other extension devs, how are you handling E2E encryption in your apps? &lt;/p&gt;

&lt;p&gt;Check out the project: &lt;a href="https://encryptedclipboard.app" rel="noopener noreferrer"&gt;EncryptedClipboard.app&lt;/a&gt; &lt;/p&gt;

&lt;p&gt;or upvote us on &lt;a href="https://peerlist.io/nhrdev/project/encrypted-clipboard-manager" rel="noopener noreferrer"&gt;Peerlist&lt;/a&gt;!&lt;/p&gt;

</description>
      <category>javascript</category>
      <category>svelte</category>
      <category>security</category>
      <category>privacy</category>
    </item>
    <item>
      <title>Chrome DevTools is missing these features, so I built them myself</title>
      <dc:creator>Nowshad Hossain Rahat</dc:creator>
      <pubDate>Sat, 27 Dec 2025 18:16:14 +0000</pubDate>
      <link>https://forem.com/nhrdev/chrome-devtools-is-missing-these-features-so-i-built-them-myself-2ea4</link>
      <guid>https://forem.com/nhrdev/chrome-devtools-is-missing-these-features-so-i-built-them-myself-2ea4</guid>
      <description>&lt;h2&gt;
  
  
  The Struggle with Default DevTools 😫
&lt;/h2&gt;

&lt;p&gt;If you are a full-stack or frontend dev, you know the limits of the Chrome "Application" tab.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt; &lt;strong&gt;IndexedDB is a black box.&lt;/strong&gt; You can view data, but creating a new Database, adding a Store, or importing/exporting a full DB? Impossible without writing console scripts.&lt;/li&gt;
&lt;li&gt; &lt;strong&gt;Testing multiple accounts is painful.&lt;/strong&gt; To switch users, you have to clear site data, refresh, and log in again. Or juggle 5 different Incognito windows.&lt;/li&gt;
&lt;li&gt; &lt;strong&gt;Sharing sessions is hard.&lt;/strong&gt; If you want to move your logged-in state from Chrome to Brave, or send a session to a co-worker to reproduce a bug, you're stuck copy-pasting cookies one by one.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;It felt like the tooling was stuck in 2010.&lt;/p&gt;

&lt;h2&gt;
  
  
  So, I Built the Ultimate Solution 🛠️
&lt;/h2&gt;

&lt;p&gt;I created &lt;strong&gt;&lt;a href="https://easylocalstorage.dev" rel="noopener noreferrer"&gt;Easy Local Storage Manager&lt;/a&gt;&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;It started as a simple JSON editor, but it has evolved into a complete &lt;strong&gt;Storage &amp;amp; Session Management Suite&lt;/strong&gt;. It handles LocalStorage, SessionStorage, Cookies, and now &lt;strong&gt;IndexedDB&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;Here is why it’s a game-changer for your workflow:&lt;/p&gt;

&lt;h3&gt;
  
  
  1. Complete IndexedDB Management 🗄️
&lt;/h3&gt;

&lt;p&gt;Most extensions ignore IndexedDB because it's complex. I didn't.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Full Control:&lt;/strong&gt; You can create new Databases and Object Stores directly from the UI.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;CRUD Actions:&lt;/strong&gt; Add, edit, or delete data records easily.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Import/Export:&lt;/strong&gt; You can export an &lt;em&gt;entire&lt;/em&gt; IndexedDB (or just a specific store) and import it back later. This is a lifesaver for debugging offline-first apps (PWA).&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  2. User Profiles (Switch Accounts Instantly) 👥
&lt;/h3&gt;

&lt;p&gt;This is my favorite feature for QA and testing.&lt;br&gt;
You can create isolated &lt;strong&gt;"User Profiles"&lt;/strong&gt; for any host (e.g., &lt;code&gt;localhost:3000&lt;/code&gt; or &lt;code&gt;production.com&lt;/code&gt;).&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;How it works:&lt;/strong&gt; Save your current storage state (Local + Session + Cookies) as "User A". clear it, log in as "User B", and save that.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;The Magic:&lt;/strong&gt; Click "User A", and the extension automatically &lt;strong&gt;wipes the current storage&lt;/strong&gt; and injects User A's data.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Result:&lt;/strong&gt; You switch accounts instantly without logging out/in manually or using Incognito windows.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  3. Cloud Sync as "Access Sharing" ☁️
&lt;/h3&gt;

&lt;p&gt;The Cloud Sync isn't just for backup; it’s for &lt;strong&gt;moving access&lt;/strong&gt;.&lt;br&gt;
You can sync your LocalStorage, SessionStorage, and Cookies to the cloud (End-to-End Encrypted).&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;The Use Case:&lt;/strong&gt; Login to a site on Chrome. Sync it. Open Brave (or another device), hit "Restore", and &lt;strong&gt;boom - you are logged in automatically.&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;em&gt;Note:&lt;/em&gt; It requires &lt;code&gt;webNavigation&lt;/code&gt; permission to apply cookies correctly, but it effectively lets you "teleport" your session across browsers.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  4. The Basics (But Better)
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;JSON Tree Editor:&lt;/strong&gt; Edit storage values as objects, not strings.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;JWT Decoder:&lt;/strong&gt; Built-in decoding/encoding for tokens.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Deep Search:&lt;/strong&gt; Find values nested deep inside JSON objects.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Why use it?
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F636zdgo5cg8m78wzgdsh.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F636zdgo5cg8m78wzgdsh.png" alt=" " width="800" height="446"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;It replaces the need for separate extensions (Cookie Editors, Storage Cleaners, Session Managers) and puts everything into one professional dashboard. It operates on a &lt;strong&gt;Freemium&lt;/strong&gt; model—core features are free, while Cloud Sync and advanced profile management are for power users.&lt;/p&gt;

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

&lt;p&gt;I’d love to hear your feedback, especially on the IndexedDB features!&lt;/p&gt;

&lt;p&gt;👉 &lt;strong&gt;&lt;a href="https://easylocalstorage.dev" rel="noopener noreferrer"&gt;Download Easy Local Storage Manager&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;(Drop a comment if you have specific feature requests!)&lt;/em&gt;&lt;/p&gt;

</description>
      <category>devtools</category>
      <category>webdev</category>
      <category>testing</category>
      <category>productivity</category>
    </item>
  </channel>
</rss>
