Skip to content

Torrent File Sharing System containing Tracker, and Torrent Search Engine, built in Haskell and ReactJS

Notifications You must be signed in to change notification settings

beaszt-nix/Haskell-Torrent-Tracker-and-Search-Engine

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

26 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

HaskTorrent (B.Tech Minor Project: Aug '20)

Click the image for video demo Click for Video

Introduction

This project implements a Complete P2P Torrent File Distribution System, providing

  • HaskTracker: A Torrent Tracking server, implemented in Haskell as per the BitTorrent Protocol, cross compatible with all commonly available Torrent Clients

  • HaskTorrent: A Torrent MetaInfo Distribution API providing endpoints to upload/download .torrent files, fuzzy text search for torrents, as well as get detailed description of .torrent files. Implemented using Haskell and MongoDB.

  • hask-react: A server-decoupled ReactJS frontend that utilizes the HaskTorrent API.

Module names link to detailed descriptions of each of them.

Installation

Database Setup

Install MongoDB, create a database with authentication. Note the port on which mongo is running.

# In Mongo Shell 
> use torrentDB
> db.createCollection("torrents")
> db.createIndex({ 'ngrams':  'text'})
> db.createIndex({ 'infoHash': 1}, {unique: true})

Add the following environment variables to the ~/.bash_profile and run source ~/.bash_profile

# Any hostname would work, even localhost:port. 
# Necessary to specify port number
export TorrDBHostName="127.0.0.1:27018"  
# Name of the database created with authentication 
export TorrentDB="torrentDB"
# Name of the Collection used by the Libraries, do not change 
export TorrColl="torrents"
# Name of the username with readWrite privileges to $TorrentDB
export TorrDBUserName="user"
# Password for the same
export TorrDBPassWord="password"

HaskTracker

Uses cabal.

cabal v2-build
cabal v2-run hask-tracker

HaskTorrent

Uses Stack.

stack build
stack run

hask-react

yarn install
yarn start

About

Torrent File Sharing System containing Tracker, and Torrent Search Engine, built in Haskell and ReactJS

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published