A secure, peer-to-peer file sharing application built with React, TypeScript, and WebRTC.
- 🔒 Secure P2P file transfer using WebRTC
- 💨 Fast direct transfers between peers
- 🎯 No server storage - files transfer directly between browsers
- 🔍 File preview before download
- 📱 Responsive design with Tailwind CSS
- Node.js 16.x or higher
- npm 7.x or higher
# Clone the repository
git clone https://github.com/ompathak2004/PeerDrop.git
# Navigate to project directory
cd PeerDrop
# Install dependencies
npm install# Start development server
npm run devVisit http://localhost:5173 in your browser.
-
Start a Session
- Click "Start Session" to get your unique peer ID
- Your ID will be in format:
adjective-noun-number(e.g.,swift-phoenix-123)
-
Connect with Peers
- Share your ID with other users
- Enter another user's ID to connect
- Connected peers will appear in the "Connected Peers" list
-
Sending Files
- Choose a connected peer from the list
- Click "Send" to initiate transfer
-
Receiving Files
- When someone sends you files, you'll see a confirmation dialog
- Preview file details before accepting
- Choose to accept or reject the transfer
- Files download automatically after accepting
- Frontend: React + TypeScript
- State Management: Redux Toolkit
- Styling: Tailwind CSS + Ant Design
- P2P: PeerJS (WebRTC)
- Build Tool: Vite
- Supported file types: All
# Start development server
npm run dev
# Build for production
npm run build
# Preview production build
npm run preview
# Lint code
npm run lintfileSharing/
├── src/
│ ├── helpers/ # Utility functions and hooks
│ ├── store/ # Redux store configuration
│ │ ├── peer/ # Peer connection state
│ │ └── connection/ # Connection management
│ ├── App.tsx # Main application component
│ └── main.tsx # Application entry point
└── package.json
- Fork the repository
- Create your feature branch (
git checkout -b feature/AmazingFeature) - Commit your changes (
git commit -m 'Add some AmazingFeature') - Push to the branch (
git push origin feature/AmazingFeature) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
- PeerJS for WebRTC implementation
- Tailwind CSS for styling
- Ant Design for UI components