Skip to content

1ceit/fetchp2p

FetchP2P - Secure P2P File Transfer

License: GPL v3 Version Next.js Buy Me A Coffee

A privacy-focused, peer-to-peer file transfer utility built with Next.js, WebRTC, and a custom WebSocket signaling server. Files are streamed directly between browsers with zero server-side storage.

Project Structure

public/           # Public Assets (Images, sw.js, etc.)
signaling/        # Server-side scripts (Signaling Server)
src/
├── app/          # Next.js App Router (Routing Wrapper)
├── views/        # Core UI Pages (Home, Send, Receive)
├── components/   # Reusable UI & Atomic Components
├── lib/          # Centralized Shared Utilities
└── context/      # Global State / File Context

Large File Streaming (sw.js)

Unlike many web-based transfer tools, FetchP2P does not buffer files in RAM. We use a Service Worker (sw.js) to intercept incoming data chunks and stream them directly to your disk. This allows for:

  • Unlimited File Sizes: Transfer 100GB+ files without crashing your browser tab.
  • Low Memory Footprint: The app typically uses less than 50MB of RAM, regardless of the file size being transferred.

Getting Started

1. Install Dependencies

npm install

2. Configure Environment

Create a .env.local file:

NEXT_PUBLIC_PEER_HOST=localhost
NEXT_PUBLIC_PEER_PORT=9000
NEXT_PUBLIC_PEER_SECURE=false
NEXT_PUBLIC_PEER_PATH=/

3. Run the Signaling Server

npm run signaling

4. Run the App

npm run dev

Contributing

Contributions are welcome! Please read CONTRIBUTING.md and our Code of Conduct.

License

Distributed under the GPL 3.0 License. See LICENSE for more information.

About

A peer-to-peer file transfer service, built with Next.js.

Resources

License

Code of conduct

Contributing

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors