<?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: syntax Error</title>
    <description>The latest articles on DEV Community by syntax Error (@syntax_error_d761b89966b3).</description>
    <link>https://dev.to/syntax_error_d761b89966b3</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%2F4267558%2F4fe2e585-ab1d-4497-a716-51f5cede99b4.png</url>
      <title>DEV Community: syntax Error</title>
      <link>https://dev.to/syntax_error_d761b89966b3</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/syntax_error_d761b89966b3"/>
    <language>en</language>
    <item>
      <title>How I Built a Zero-Signup Cross-Device File Transfer Tool with WebRTC and an HTTPS Relay</title>
      <dc:creator>syntax Error</dc:creator>
      <pubDate>Thu, 26 Nov 2026 18:54:48 +0000</pubDate>
      <link>https://dev.to/syntax_error_d761b89966b3/how-i-built-a-zero-signup-cross-device-file-transfer-tool-with-webrtc-and-an-https-relay-p7g</link>
      <guid>https://dev.to/syntax_error_d761b89966b3/how-i-built-a-zero-signup-cross-device-file-transfer-tool-with-webrtc-and-an-https-relay-p7g</guid>
      <description>&lt;p&gt;Moving a photo, screen recording, or snippet of text from a phone to a laptop shouldn't require emailing yourself, logging into cloud storage, or hunting for a USB cable.&lt;br&gt;
​To solve this daily friction, I built SendlyShare—a lightweight, browser-based file transfer and live clipboard tool that pairs two devices using a 6-digit code or QR scan, with zero accounts or app installs.&lt;br&gt;
​Here is a look under the hood at the architectural choices and trade-offs I ran into while building it.&lt;br&gt;
​1. Hybrid Transfer Architecture: WebRTC + HTTPS Relay&lt;br&gt;
​Originally, I wanted every file transfer to be 100% peer-to-peer (P2P) using WebRTC DataChannels. On paper, WebRTC is ideal: files stream directly from device A to device B over local Wi-Fi without touching a server.&lt;br&gt;
​In practice, pure P2P breaks more often than users expect:&lt;br&gt;
​Carrier CG-NAT &amp;amp; Strict Firewalls: When one device is on cellular data and the other is on a corporate or restrictive Wi-Fi network, direct ICE/STUN hole-punching frequently fails.&lt;br&gt;
​Browser Background Throttling: Mobile browsers aggressively throttle background tabs, which can drop a P2P handshake mid-transfer if a user switches apps.&lt;br&gt;
​The Solution:&lt;br&gt;
I split transfers into two distinct paths:&lt;br&gt;
​1. Local Drop (P2P): When both devices are on the same network, they establish a direct WebRTC DataChannel for fast, local transfer with no server storage limits.&lt;br&gt;
​2. Remote Relay (HTTPS): When P2P isn't viable or devices are on separate networks, files upload over HTTPS to temporary storage with auto-expiring links (capped at 1GB per transfer).&lt;br&gt;
​2. 6-Digit Pairing Codes vs. Long URLs&lt;br&gt;
​Early prototypes generated a unique shareable URL for every session. While URLs work well for sending files to someone else, they create unnecessary friction when sending a file to yourself (e.g., from your phone to your laptop sitting right in front of you).&lt;br&gt;
​Switching to a 6-digit numeric room code (paired with an optional QR scan) solved this immediately. Typing six digits on a keyboard takes two seconds, requires zero copy-pasting across messaging apps, and still maps cleanly to an underlying signaling session.&lt;br&gt;
​3. Client-Side Encryption in the Browser&lt;br&gt;
​For sensitive documents, I added an optional password lock that encrypts single files (up to 50MB) directly inside the sender's browser before any bytes leave the device.&lt;br&gt;
​Right now, I'm working on upgrading the encryption pipeline from a legacy CryptoJS setup to the native Web Crypto API (AES-GCM + PBKDF2) using a TransformStream and IndexedDB buffer pattern. Using a fresh 12-byte random IV per 1–4MB chunk allows larger files to be encrypted and decrypted in streams without spiking mobile browser RAM.&lt;br&gt;
​4. Adding a Live Synced Notepad&lt;br&gt;
​Half the time, I didn't need to transfer a file—I just needed to move a URL, an OTP, or a snippet of text from my phone to my desktop. Adding a real-time synced scratchpad alongside the file drop turned out to be one of the most-used features in my own daily workflow.&lt;br&gt;
​Try It Out &amp;amp; Share Feedback&lt;br&gt;
​If you want to test the pairing flow or inspect how the transfers behave on your network, you can try it here: &lt;a href="https://www.sendlyshare.com/" rel="noopener noreferrer"&gt;https://www.sendlyshare.com/&lt;/a&gt;&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>javascript</category>
      <category>webrtc</category>
      <category>security</category>
    </item>
  </channel>
</rss>
