Thanks to visit codestin.com
Credit goes to github.com

Skip to content

NxtGenLegend/drop

ย 
ย 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

7 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

Drop - Cross-Platform AirDrop Alternative

Rust Next.js TypeScript WebRTC

๐Ÿš€ Overview

Drop is a modern, cross-platform file sharing solution that works seamlessly across any device with a web browser. Inspired by Apple's AirDrop, it eliminates the limitations of platform-specific file sharing by leveraging web technologies for universal compatibility.

โœจ Key Features

  • ๐ŸŒ Universal Compatibility - Works on any device with a browser (Windows, macOS, Linux, iOS, Android)
  • ๐Ÿ”’ End-to-End Encrypted - Secure peer-to-peer file transfers
  • ๐Ÿš€ No File Size Limits - Transfer files of any size
  • ๐Ÿ“ฑ No App Installation Required - Pure web-based solution
  • ๐ŸŽฏ Simple Share Codes - Easy 6-character codes for quick sharing
  • โšก Real-time Progress - Live transfer progress with visual feedback
  • ๐Ÿ”— Direct P2P Transfer - Files transfer directly between devices
  • ๐ŸŽจ Beautiful Modern UI - Intuitive interface with smooth animations

๐Ÿ—๏ธ Architecture

Backend (Rust)

  • WebRTC Signaling Server - Facilitates peer-to-peer connections
  • Session Management - Handles share codes and connection coordination
  • CORS Support - Enables cross-origin requests from frontend
  • High Performance - Rust-powered backend for reliability

Frontend (Next.js)

  • React-based UI - Modern, responsive interface
  • WebRTC Client - Handles peer-to-peer file transfers
  • Real-time Updates - Live connection status and transfer progress
  • File Management - Drag & drop, file selection, and download handling

File Transfer Flow

  1. Sender creates a session and gets a 6-character share code
  2. Receiver enters the code to join the session
  3. WebRTC Connection established through signaling server
  4. Direct P2P Transfer - Files transfer directly between devices
  5. Automatic Download - Received files are automatically downloadable

๐Ÿš€ Quick Start

Prerequisites

  • Rust (1.80+)
  • Node.js (18+)
  • Modern web browser with WebRTC support

Installation & Setup

  1. Clone the repository

    git clone <your-repo-url>
    cd drop
  2. Start the backend server

    cargo run

    Backend will start at http://127.0.0.1:8080

  3. Start the frontend (in a new terminal)

    cd frontend
    npm install
    npm run dev

    Frontend will start at http://localhost:3000

Usage

Sending Files

  1. Open http://localhost:3000 in your browser
  2. Drag & drop files or click "browse" to select files
  3. Click "Create Share Link" to generate a 6-character code
  4. Share the code with the recipient

Receiving Files

  1. Open http://localhost:3000 in any browser
  2. Enter the 6-character share code
  3. Click "Join" to connect
  4. Files will be received automatically and available for download

๐Ÿ”ง Development

Project Structure

drop/
โ”œโ”€โ”€ src/                    # Rust backend
โ”‚   โ”œโ”€โ”€ main.rs            # Server entry point
โ”‚   โ”œโ”€โ”€ lib.rs             # Core library with API endpoints
โ”‚   โ”œโ”€โ”€ webrtc.rs          # WebRTC utilities
โ”‚   โ”œโ”€โ”€ transfer.rs        # File transfer logic
โ”‚   โ”œโ”€โ”€ crypto.rs          # Encryption utilities (future)
โ”‚   โ”œโ”€โ”€ ble.rs             # Bluetooth LE (future)
โ”‚   โ””โ”€โ”€ protocol.rs        # Transfer protocol definitions
โ”œโ”€โ”€ frontend/               # Next.js frontend
โ”‚   โ”œโ”€โ”€ src/app/
โ”‚   โ”‚   โ”œโ”€โ”€ page.tsx       # Main UI component
โ”‚   โ”‚   โ””โ”€โ”€ hooks/
โ”‚   โ”‚       โ””โ”€โ”€ useWebRTC.ts  # WebRTC React hook
โ”‚   โ”œโ”€โ”€ package.json
โ”‚   โ””โ”€โ”€ tailwind.config.js
โ”œโ”€โ”€ Cargo.toml             # Rust dependencies
โ””โ”€โ”€ README.md

Backend API Endpoints

  • POST /api/session/create - Create new sharing session
  • POST /api/session/{id}/signal/send - Send WebRTC signaling message
  • GET /api/session/{id}/signal/receive - Receive WebRTC signaling messages

Frontend Components

  • useWebRTC Hook - Manages WebRTC connections and file transfers
  • File Drop Zone - Handles file selection and drag & drop
  • Transfer Progress - Real-time progress visualization
  • Connection Status - Live connection state updates

๐Ÿ”ฎ Future Enhancements

Phase 1 (Current)

  • โœ… WebRTC-based file transfer
  • โœ… Beautiful modern UI
  • โœ… Cross-platform compatibility
  • โœ… Real-time progress tracking

Phase 2 (Planned)

  • ๐Ÿ”„ QR Code sharing for mobile devices
  • ๐Ÿ”„ End-to-end encryption implementation
  • ๐Ÿ”„ Bluetooth LE discovery
  • ๐Ÿ”„ NFC tap-to-share
  • ๐Ÿ”„ File preview capabilities

Phase 3 (Future)

  • ๐Ÿ”„ Mobile app companions
  • ๐Ÿ”„ Desktop native apps
  • ๐Ÿ”„ Cloud relay for NAT traversal
  • ๐Ÿ”„ Group file sharing
  • ๐Ÿ”„ File history and management

๐Ÿค Contributing

We welcome contributions! Here's how you can help:

  1. Fork the repository
  2. Create a feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

Development Guidelines

  • Follow Rust best practices for backend code
  • Use TypeScript for all frontend code
  • Maintain consistent code formatting
  • Add tests for new features
  • Update documentation as needed

๐Ÿ“ License

This project is licensed under the MIT License - see the LICENSE file for details.

๐Ÿ”’ Security

Drop prioritizes security with:

  • Peer-to-peer transfers - Files never pass through our servers
  • WebRTC encryption - Built-in transport layer security
  • Session-based sharing - Temporary, code-based access
  • No data persistence - Sessions and codes are temporary

๐ŸŒŸ Why Drop?

Unlike traditional file sharing solutions, Drop:

  • Works everywhere - No platform restrictions
  • Requires no installation - Pure web-based
  • Direct transfers - No file size limits or cloud storage
  • Privacy-focused - Files never leave your local network
  • Modern UX - Beautiful, intuitive interface
  • Open source - Transparent and community-driven

๐Ÿ“ž Support


Drop - Making file sharing universal ๐ŸŒ
Built with โค๏ธ using Rust, Next.js, and WebRTC

About

A crossplatform alternative to AirDrop.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • TypeScript 61.6%
  • Rust 36.0%
  • JavaScript 1.4%
  • CSS 1.0%