🔥🔥 Check out my latest project - diff.blog
Peerdium is a peer to peer publishing platform. The posts are stored as torrents in the browser. Only the people with link to the post can see the content of the post. Peerdium is built using WebTorrent.
Peerdium was featured in the front page of Hacker News. There was a lot of interesting discussions in the comment section and you should defintely check it out.
When the publish button is clicked the browser encrypts the post using a random 15 digit key, creates a torrent and starts seeding the torrent. Each post has a URL in the format https://peerdium.com/#post_id
. The first 40 characters of the post_id is the magnet URI of the torrent and the rest 15 is the key used for encrypting the content of the torrent. When someone open a post for the first time the magnet URI encoded in the link is used for fetching the torrent from other seeders and the key is used for decrypting the torrent.
Click on the heart button If you like a post and want to to access it later. The post would be saved to your browser and you can see the content of the post even if no one else is seeding.
Setting up peerdium development environment is quite easy. There is no backend involved. All you need to do is start a static file server that can serve the index.html and the static assets in /static folder.
Here is how to do this in Linux. Make sure that you have python3 and git installed.
git clone https://github.com/hackerkid/peerdium
cd peerdium
python3 -m http.server
You are all set. Now head over to localhost:8000 in browser and start experimenting.