Peerlink
An offline, peer-to-peer file sharing app
Created on 11th October 2025
•
Peerlink
An offline, peer-to-peer file sharing app
The problem Peerlink solves
Connectivity Barrier : Sharing files in areas with poor or no Wi-Fi, such as classrooms, remote locations, or crowded events, is often impossible. Relying on mobile data is expensive and not always an option.
Privacy Concerns : When you upload a file to a cloud service or send it via a messaging app, your data passes through third-party servers. This poses a significant privacy risk for sensitive documents, personal photos, and confidential work files.
Speed and Inconvenience : Transferring large files over slow internet connections is a frustratingly slow process. Legacy methods like Bluetooth are unreliable for large files, and using USB cables is cumbersome and requires physical contact.
PeerLink eliminates these barriers by creating a direct, private, and high-speed bridge between nearby devices, requiring no internet connection or mobile data for the transfer itself.
How PeerLink Helps: Your Solution for Seamless Offline Sharing
PeerLink empowers users to share files with anyone nearby, effortlessly and securely. It's designed to make digital collaboration faster, safer, and more accessible for everyone.
What can people use it for?
⚡ Instant, Offline Sharing:
Students in a lecture hall can instantly share notes and project files. Colleagues in a meeting can securely exchange presentations and reports. Friends on a trip can share high-resolution photos and videos—all without searching for a Wi-Fi password or burning through their mobile data plans.
🔐 Enhanced Privacy & Security:
Because PeerLink creates a direct peer-to-peer connection, your files travel from your device straight to the recipient's, without ever being uploaded to an intermediary server. This makes it the ideal tool for sharing sensitive information, such as legal documents, financial records, or personal data, with complete peace of mind.
Integrated PDF Viewer & Annotator: PeerLink includes a powerful in-app PDF viewer. Users can instantly open, read, highlight, and annotate documents without leaving the app. Changes are saved directly to the file, streamlining review cycles and making collaboration seamless.(no need of 3rd party apps)
Challenges we ran into
-
Edge cases of connection and disconnection logic
-did frequent and numerous tests , to know the timing and position of problem occuring . -
Multi-user data leakage bug
- During testing, we discovered that if User A logged in, received some files, and then logged out, a new user (User B) logging in on the same device would see all of User A's private files in their library. User B could open, manage, and even delete them. This was a major security flaw that completely undermined user trust
we solved it by -
User-Specific Storage: we modified the storage key to be unique for each user by appending their Firebase UID. This ensured that each user had their own private, sandboxed space for their file list.
- Receiving File of unknown size
- The nearby_connections library is incredibly powerful for sending raw data, but it sends the file payload (the bytes) without any associated metadata. When a user started receiving a file, our UI could only show a generic name like _nearby_12345.tmp and couldn't display a proper progress bar because it didn't know the total file size.
we solved it by -
A Two-Phase Transfer Protocol:
Phase 1: Before sending the large file, the sender's device first transmits a tiny BYTES payload. This payload contains a small JSON object with all the essential information: the original fileName, the fileSize, and a unique payloadId.
Phase 2: Send the Actual File: Immediately after sending the metadata, the sender transmits the actual FILE payload.
Technologies used
