free your darlings

Published: 2022-08-10

Is it time for us all to switch to decentralized social media?

My PoC suggests it could work

I usually don't share code. Mostly to avoid getting stuck in discussion about code and frameworks instead of actual problem solving. I will make an exception in this case. Not to show off my code. This is not even a finished product. It is a PoC/MVP. But I really like the idea and hope this PoC can inspire someone to create something useful to circumvent social media blocking and spread censored information in places like Russia. Maybe it is too late for this conflict but why not be prepared for next time?

A friend got in touch about creating a decentralised Internet community using blockchain technology and what not. At first, it sounded like just buzzwords from some fuzzy startup pitch, but as always my brain got carried away and came up with a "simple" way of creating this. A solution that could solve a lot of the problems users experience with other social media. It works just like your usual web community but with no central hosting or storage. Instances of the community are hosted on different web servers. Each instance keeps track of connected friends, followers, groups, etc, and communicates directly with other instances of the community on the web server where they are located.

When I wrote about Portals earlier I got some feedback saying there are similar projects out there already, but they seem very security focused and not very easy to use or set up. For a distributed community to catch on it needs to be portable and easy to set up.

My PoC (currently named Portals) is based on just a few json and php files. No database. A profile and its data can easily be zipped and moved from one server to another. To set it up just drop the folder containing the files on a php/https web server and visit the location with your browser. You can have as many folders/instances as you like on one server. So that you can host your family and friends. All instances are separate and not dependent on each other.

Overview of typical content requests for online communities. All user data is stored in the same location and ...

Overview of typical content requests for online communities. All user data is stored in the same location and served over the same URL which makes it easy for the community to manipulate what users get and it is easy for someone to block the whole community.

A simplified view of a Portals content request. Instances of Portals are spread out on several servers and the...

A simplified view of a Portals content request. Instances of Portals are spread out on several servers and the content is assembled in real time as it is viewed by a user

That was my PoC. The community is in fact just the agreed protocol and API communicating between users. What happens in the sending or receiving end is totally up to the users. Clients could be IOT-devices, websites, apps or anything that can communicate json over https.

A good way to spread the community would be to offer something like a WordPress installation, not as bloated of course, for users to run on their web server. Still with some sort of flexible system where designers and developers can create themes and modules. For users without their own web server, why not set up Portal hosts where you can host your profile.

There are of course a lot of technical and logical issues associated with a distributed social network. But if we focus on the positives there are a lot of things that can be made better than in Facebook and other communities:

1. Your feed
Filters and setting options can either be downloaded in the form of ready-made modules or coded exactly as you want to customize the feed. No corporations or governments can interfere. You can also add data from other APIs to really tailor your own portal.

2. Design
You can make your community look any way you like. Whether you are nostalgic and want to emulate MySpace, or if you are a typical web designer who thinks what others do is ugly, just apply your own CSS and move the content around as you like. Resources that are downloaded can contain preferred styling of course, but as the recipient you can choose to ignore that as well.

3. Anonymous
With your own hosting and without any central point, there is no central entity that will track you using cookies etc. Only those you connect with and possibly someone along the way even know that you are using Portals.

4. Child friendly
By removing the possibility of connecting with others, it is possible to create a child-friendly environment for children where they can only communicate with preselected people. Slap on a Peppa Pig or Harry Styles design and you are ready to go.

5. Portable
If you are not happy with your host, or if your host is being blocked, just pack up your files and upload them on another server and you are good to go again. Ideal if you are a critic of the regime or Donald Trump who keeps being shut down. It is the followers and friends who choose who should be ignored. I had an idea about a blockchain-blob to keep track of connections and ensure that those who change hosts are reunited with their connections. I got a lot of feedback about this and about using blockchain for storing “personal data”. Maybe there is a way around this encrypting or obscuring data so that only one person can read it? Someone smarter than me can have a look into this. It is not in my PoC.

6. Hard to block
It will be very difficult for authorities and regimes to close down a community that has no fixed address and where every instance is a proxy. Another idea I had was to further complicate the identification of Portals communication by letting all parameters and requests be unique for each connection between two users. Everything just becomes asymmetric gibberish in various web requests until they reach the end user where they are translated into something useful.

7. Publishing,
Since your published material is published in and loaded from your instance it cannot be filtered. This means you decide what may be published, not an algorithm based on commercial and political pressure. If you want to unpublish something, just delete the files in your instance.

8. Integrations
As long as you follow the API “protocol” the opportunities to integrate are endless. IOT devices, web shops, apps, etc can all communicate and create completely new community-connected products.

Developers who are passionate about code or open source projects can participate and contribute modules etc. Or setup Portal hotels and get paid. By choosing to pay with money instead of data users can also contribute to building something robust that cannot be taken away too easily by panicking politicians.

Feel free to download my PoC in this zip-file. Not guaranteeing that it will work out of the box. Hopefully it does, and hopefully it will get you started on creating a decentralised social network that will make the world a more informed and better place.

https://mufab.se/portals/portals.zip

My Portals address is: https://mufab.se/portals/mico/
If you want to connect once you are up and running.

Screen shots from testing the PoC with a friend. Testing messages, the wall and managing connections

Screen shots from testing the PoC with a friend. Testing messages, the wall and managing connections

This is actually a re-post. I originally posted on Linkedin which is the worst when it comes to exposure if you have created something yourself. Your article will have a lifespan of a day or two, showing up in your friends feeds but after that it is hidden away somewhere where even you as the author cannot find it. But if you re-post some made up quotes by Elon Musk there is no end to it. The post will haunt all your friends for months. That’s my perception of Linkedin anyway. Might just be that my posts are uninteresting. Publishing here as well will be a great way to compare.

Project

5% Done
  • Present the idea
  • Come up with a good name
  • Setup a forum to discuss Portals
  • Design API based on forum discussions
  • Code a proper first wordpress style client (php)
  • Code client NodeJs
  • Code client Dot.Net

Budget

  • Forum discussions, open for anyone to have ideas and opinions $0
  • Design API based on forum discussions $11 000
  • Development PHP-bundle $66 000
  • Development NodeJs-bundle $66 000
  • Development Dot.Net-bundle $66 000
  • Total $209 000