Skip to content

A high-performance, secure Peer-to-Peer file sharing system using WebRTC for direct client-to-client transfers and AWS Lambda with Redis for signaling.

Notifications You must be signed in to change notification settings

ajaynegi45/FileShare

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

13 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

FileShare: P2P File Sharing System

A high-performance, secure, and Peer-to-Peer (P2P) file sharing system using WebRTC for direct client-to-client transfers and AWS Lambda with Redis for signaling.

Project Overview

FileShare consists of a modern React/Next.js frontend and a serverless Java-based signaling backend. It allows users to share files by simply sharing a PIN, establishing a peer-to-peer connection for faster and private data transfer.

πŸ—οΈ Architecture

The system follows a WebRTC-based architecture:

  1. Signaling Server (Backend): Handles user registration, PIN generation, and WebRTC handshake (offer/answer/ice candidates).
  2. Sender Client: Initiates the share, generates a PIN, and waits for a receiver.
  3. Receiver Client: Enters the PIN, connects to the sender, and receives the file in chunks.
  4. Data Transfer: Once connected, files are transferred directly between browsers via RTCDataChannel.

πŸ“ Repository Structure

.
β”œβ”€β”€ fileshare-frontend/    # Next.js Frontend (React, TypeScript, TailwindCSS)
β”œβ”€β”€ fileshare-backend/     # AWS Lambda Signaling Server (Java, Spring Boot, Redis)

πŸš€ Getting Started

Prerequisites

  • Node.js (v18 or higher)
  • Java 17+ and Maven (for backend)
  • Redis instance (for backend signaling)

Development Setup

Frontend

  1. Navigate to fileshare-frontend:
    cd fileshare-frontend
    npm install
    npm run dev
  2. Open http://localhost:3000.

Backend

  1. Navigate to fileshare-backend:
    cd fileshare-backend
    mvn install
  2. Deploy as an AWS Lambda or run locally with appropriate environment variables for Redis and API Gateway.

βš–οΈ Features

  • P2P Transfer: Direct browser-to-browser transfer (WebRTC).
  • No File Size Limits: Files are streamed in chunks.
  • PIN-based Pairing: Simple 6-digit PIN for session discovery.
  • Serverless Backend: Scalable signaling using AWS Lambda.
  • Modern UI: Slick dark-themed interface built with Next.js.

For more detailed technical information, see ARCHITECTURE.md.

About

A high-performance, secure Peer-to-Peer file sharing system using WebRTC for direct client-to-client transfers and AWS Lambda with Redis for signaling.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published