Skip to main content

Peer Drop

πŸ“€ Secure peer-to-peer file and text transfer tool

Status: 🟒 Live
Link: https://peer-drop.real-tech.online/
Tech: Next.js, PeerJS, WebRTC, Tailwind CSS


Background​

Frequently need to transfer files between my phone and computer, or share files with family members. Existing solutions either require uploading to cloud services (privacy concerns), need account registration, or have file size limits.

Problem​

Common file transfer pain points:

  • Cloud services: Files uploaded to third-party servers, privacy risk
  • Email/WeChat: File size limits (usually 20-100MB)
  • USB cable: Inconvenient, requires physical connection
  • AirDrop: Only works within Apple ecosystem
  • Account registration: Most services require sign-up

What I needed: A simple way to transfer files directly between devices without intermediaries.

Solution​

Built a browser-based P2P transfer tool using WebRTC:

  • Direct connection: Device-to-device, no server storage
  • QR code pairing: Scan to connect, no manual ID entry
  • No installation: Works in browser, no app needed
  • No size limits: Transfer files of any size
  • Real-time chat: Text messages alongside file transfers

Key Technology:

  • PeerJS for simplified WebRTC implementation
  • STUN servers (Google's public STUN) for NAT traversal
  • File chunking for reliable large file transfers
  • Next.js for modern React framework

Result​

What Works:

  • βœ… Successfully transfers files directly between devices
  • βœ… No file size limits (tested up to 5GB+)
  • βœ… Fast transfer speeds on local network (50-100MB/s)
  • βœ… Simple QR code pairing - scan and go
  • βœ… Works across platforms (iOS, Android, Windows, Mac)
  • βœ… Real-time text chat during transfer

Limitations:

  • ❌ Both devices must be online simultaneously (no async transfer)
  • ❌ Requires modern browser with WebRTC support
  • ❌ Connection can fail on corporate networks with strict firewalls
  • ❌ No transfer resume if connection drops
  • ❌ Slower speeds across different networks (depends on internet speed)

Real Usage Stats (from my own use):

  • Used 50+ times for phone-to-computer transfers
  • Largest file transferred: 8GB video file
  • Most common use: Transferring photos from phone (20-50MB each)

Conclusion​

Key Learning: P2P is perfect for real-time, privacy-sensitive transfers but not suitable for async file sharing. The trade-off between convenience and privacy is worth it for personal/family use.

Technical Insight: WebRTC's biggest challenge isn't the API itself, but handling various network environments. STUN servers solve most cases, but corporate networks still need TURN relay.

If I Were to Do It Again:

  1. Add TURN server fallback for difficult networks (relay encrypted data)
  2. Implement file chunking with resume capability
  3. Add transfer history (metadata only, not files)
  4. Support multiple file selection and folder transfer

Practice Records​