<?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: Levi</title>
    <description>The latest articles on DEV Community by Levi (@levi_625bf34e7a585cbefb03).</description>
    <link>https://dev.to/levi_625bf34e7a585cbefb03</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%2F3930027%2F53562e80-988e-453e-9d4b-4089ac22054f.png</url>
      <title>DEV Community: Levi</title>
      <link>https://dev.to/levi_625bf34e7a585cbefb03</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/levi_625bf34e7a585cbefb03"/>
    <language>en</language>
    <item>
      <title>Show HN: How I Built a Zero-Cost, True End-to-End Encrypted Chat App using Node.js &amp; Web Crypto API</title>
      <dc:creator>Levi</dc:creator>
      <pubDate>Wed, 13 May 2026 20:01:32 +0000</pubDate>
      <link>https://dev.to/levi_625bf34e7a585cbefb03/show-hn-how-i-built-a-zero-cost-true-end-to-end-encrypted-chat-app-using-nodejs-web-crypto-api-1e30</link>
      <guid>https://dev.to/levi_625bf34e7a585cbefb03/show-hn-how-i-built-a-zero-cost-true-end-to-end-encrypted-chat-app-using-nodejs-web-crypto-api-1e30</guid>
      <description>&lt;p&gt;Hi everyone, I’m Levi.&lt;/p&gt;

&lt;p&gt;I am a complete beginner when it comes to advanced software engineering, but I have a deep passion for coding and building things from scratch. I’ve been learning bit by bit, taking my time to understand how the web actually works under the hood.&lt;/p&gt;

&lt;p&gt;Recently, I started exploring the concept of "Vibe Coding"—the process of building software by guiding AI with natural language, focusing on the logic, architecture, and "vibe" of the app while learning the actual syntax along the way.&lt;/p&gt;

&lt;p&gt;Today, I want to share the very first platform I built using this approach: A zero-cost, true end-to-end encrypted (E2EE) chat application.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The Goal&lt;/strong&gt;&lt;br&gt;
I wanted to build a chat room where two people could talk without anyone—not even me as the server owner—being able to read the messages. And because I am just starting out, my budget was exactly $0.&lt;/p&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%2F4idh7p5eadkqhh7qkxwd.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%2F4idh7p5eadkqhh7qkxwd.png" alt=" " width="500" height="677"&gt;&lt;/a&gt;&lt;/p&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%2Fscej1sk3bv1ex0a5hine.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%2Fscej1sk3bv1ex0a5hine.png" alt=" " width="437" height="643"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The Tech Stack&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Frontend: Vanilla HTML, CSS, JavaScript&lt;/li&gt;
&lt;li&gt;Backend: Node.js, Express, Socket.io&lt;/li&gt;
&lt;li&gt;Security: Native browser window.crypto.subtle (Web Crypto API)&lt;/li&gt;
&lt;li&gt;Hosting: Render (Free Tier) &amp;amp; GitHub&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;How I Built the Encryption (The Fun Part!)&lt;br&gt;
Instead of relying on heavy third-party libraries, I wanted to learn how true cryptography works directly in the browser.&lt;/p&gt;

&lt;p&gt;Key Generation: When a user opens the app, the browser instantly generates an ECDH (Elliptic-Curve Diffie-Hellman) public/private key pair.&lt;/p&gt;

&lt;p&gt;The Handshake: Users join a room using a simple code or a shareable link. Once both are in, they exchange their public keys via Socket.io.&lt;/p&gt;

&lt;p&gt;The Shared Secret: Using their own private key and the friend's public key, both browsers derive a matching 256-bit AES-GCM shared secret.&lt;/p&gt;

&lt;p&gt;Total Privacy: Every message typed is encrypted locally in the browser into unreadable ciphertext before it ever hits the network. The Node.js server only routes the ciphertext. It has no database, no logs, and no idea what the users are saying.&lt;/p&gt;

&lt;p&gt;The "Self-Destruct" Feature&lt;br&gt;
Because I don't use a database, there is zero persistent storage. To take privacy a step further, I added a self-destruct mechanism. The moment one user closes their browser tab or disconnects, the server emits a signal that forces the other user's browser to wipe all local memory, clear the chat UI, and refresh the page. No trace is left behind.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The Vibe Coding Experience&lt;/strong&gt;&lt;br&gt;
As a beginner, tackling WebSockets and Elliptic-Curve Cryptography sounded terrifying. But by using the vibe coding method, I was able to break the problem down into simple human logic: "How do two people agree on a secret password in a crowded room without anyone else hearing it?" Translating that logic into code piece-by-step made the learning curve incredibly rewarding.&lt;/p&gt;

&lt;p&gt;Try It Out!&lt;br&gt;
I would absolutely love for this community to try it, break it, and give me feedback. What security flaws did I miss? How can I write cleaner code? I am here to learn.&lt;/p&gt;

&lt;p&gt;🔗 Live App: &lt;a href="https://hidechat-levi.onrender.com" rel="noopener noreferrer"&gt;https://hidechat-levi.onrender.com&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;If you like what I’ve built as my first project, any tips, code reviews, or even a virtual coffee would mean the world to me. Thanks for reading!&lt;/p&gt;

</description>
      <category>beginners</category>
      <category>node</category>
      <category>security</category>
      <category>hidechat</category>
    </item>
  </channel>
</rss>
