/TheDistributedBay

An open source distributed implementation of the open bay

Primary LanguageGo

TheDistributedBay

The Distributed Bay is a peer-to-peer rewrite of the Open Bay/Pirate Bay. It uses a completely distributed protocol to share entries between numerous nodes, this makes it nearly impossible to take down by seizure of servers. Each node contains a complete copy and any changes are propagate through the network.

Screen Shots

Running with Docker

On Ubuntu 14.10:

sudo apt-get install docker.io
sudo docker run thedistributedbay/thedistributedbay

Docker is a container deploying environment that provides automated container images from git.

The Distributed Bay Registry page: https://registry.hub.docker.com/u/thedistributedbay/thedistributedbay/

Running Manually

Assuming you have Go and the GOPATH correctly configured all you have to do is run:

go get github.com/TheDistributedBay/TheDistributedBay
go install github.com/TheDistributedBay/TheDistributedBay

$GOPATH/bin/TheDistributedBay

Development

Backend/Core

The Distributed Bay is primarily written in Go.

GoDoc

To get the source code install Go, configure the GOPATH and then run:

go get github.com/TheDistributedBay/TheDistributedBay

The source code will be available in $GOPATH/src/github.com/TheDistributedBay/TheDistributedBay.

Frontend

The frontend is written in AngularJS and located in frontend/angular/app.

The compiled frontend assets are checked into Git. This is done so the backend developers don't need to worry about the frontend and to make deployments easier.

To edit the frontend you'll need to first install Node.js or io.js.

You'll also need to install Ruby and the gem compass.

Once done, navigate into the frontend/angular folder and install the dependencies.

cd frontend/angular
npm install
npm install -g bower grunt-cli
bower install
gem install compass

Grunt is used to handle compilation of the frontend. To tell Grunt to automatically recompile the SCSS files run:

grunt serve

You'll also need to tell the backend to serve the development assets from frontend/angular/app instead of the production ones in frontend/angular/dist. You can do this by running:

go run main -devassets=true