DEV Community

Hassan Khan
Hassan Khan

Posted on

I built a free AirDrop alternative in one HTML file with WebRTC and PeerJS

I kept emailing screenshots to myself to move them from my laptop to my phone, so I built this. Open it on two devices, scan the QR code (or type the 6-character code), and drop files or text. Data goes directly between browsers over WebRTC. PeerJS's free public server is used only for pairing. Everything is in one HTML file, MIT licensed: https://github.com/theinsidecoder/beamdrop
Known limits: pairing depends on the free PeerJS server, received files are held in memory until saved, and anyone with the code can connect while the tab is open (I plan to add a device-approval prompt). I'd appreciate feedback on pairing reliability on different networks.

Top comments (2)

Collapse
 
hasssaaan profile image
Hassan Khan •

I kept emailing screenshots to myself to move them from my laptop to my phone, so I built this. Open it on two devices, scan the QR code (or type the 6-character code), and drop files or text. Data goes directly between browsers over WebRTC. PeerJS's free public server is used only for pairing. Everything is in one HTML file, MIT licensed: github.com/theinsidecoder/beamdrop
Known limits: pairing depends on the free PeerJS server, received files are held in memory until saved, and anyone with the code can connect while the tab is open (I plan to add a device-approval prompt). I'd appreciate feedback on pairing reliability on different networks.

Collapse
 
hasssaaan profile image
Hassan Khan •

I kept emailing screenshots to myself to move them from my laptop to my phone, so I built this. Open it on two devices, scan the QR code (or type the 6-character code), and drop files or text. Data goes directly between browsers over WebRTC. PeerJS's free public server is used only for pairing. Everything is in one HTML file, MIT licensed: github.com/theinsidecoder/
Known limits: pairing depends on the free PeerJS server, received files are held in memory until saved, and anyone with the code can connect while the tab is open (I plan to add a device-approval prompt). I'd appreciate feedback on pairing reliability on different networks.