Networking & Distributed Systems • 2024

P2P Network Project

Decentralized peer-to-peer file sharing system with BitTorrent-like architecture

PythonFastAPINext.jsTypeScriptWebSocketsUDP/TCP
P2P Network Project

Project Overview

I implemented this P2P file-sharing system as a decentralized content-sharing network that enables users to download and upload file chunks efficiently from multiple peers. Following a BitTorrent-like architecture, I designed the system with three main components: a tracker for peer discovery, seeders for sharing files, and leechers for downloading.

In my system, I utilized UDP for lightweight tracker communication and TCP for reliable file transfers. Files are split into equal-sized chunks enabling parallel downloads, resilience against failed transfers, and distributed storage across the network. Each chunk is verified using SHA-256 hashing for integrity.

For the technical implementation, I built a Python/FastAPI backend with a modern Next.js/TypeScript frontend that provides real-time progress updates via WebSockets. I also implemented an automatic transition from leecher to seeder after download, strengthening the network.

Key Features

  • Distributed Architecture

    BitTorrent-like peer-to-peer file sharing system

  • File Chunking

    Splits files into chunks for efficient parallel downloading

  • Integrity Verification

    SHA-256 hashing ensures file integrity

  • Auto Seeding

    Automatic transition from leecher to seeder after download

Technologies

PythonFastAPINext.jsTypeScriptWebSocketsUDP/TCP

Project Insights

Category

Networking & Distributed Systems

Year

2024