Transaction: qjuWQTIQwnbwgSegBBnbf5O7kPv-ne8nYCqw4TZPDpE

HashBlockUserFee
qjuWQTIQwnbwgSegBBnbf5O7kPv-ne8nYCqw4TZPDpETX0IK3IOv9zneokqVN8kYxQQh7vVBshEUKscTZFBvIqRYfQIXojy0LEVRTtuZBCiReHwmj_8s6PjiWXc3XN1oY2n5JD80SYFvlrCRPy5X5E0.000105 AR
Data:

# FEEDweave, or how to build a decentralized social media platform

_By: _[_@Iiterature_](https://twitter.com/iiterature)

FEEDweave is a decentralized social media application built on top of the [Arweave](https://www.arweave.org/) blockchain.

It is a demonstration of how a completely decentralized, yet performant and scalable social media application can be built and deployed in production today.

If you're not already reading this post on FEEDweave, you can see it and try it out here: [https://feedweave.co/](https://feedweave.co/)

![](https://i.imgur.com/VJVrm64.png)

FEEDweave does not use centralized infrastructure to persist its data. The user accounts, posts, and social graph live on the Arweave blockchain. Because Arweave is a protocol, users and developers have strong guarantees of access rights, ownership, and integrity of the infrastructure. Users control their data, identity, and social graph.

Developers can invest in building on top of the infrastructure with confidence, without risk of being deplatformed.

## How protocols keep ecosystems in check

In the early days of the web, checks and balances on the power of service providers were enforced by open protocols like DNS. If a web host or email provider was mistreating a user, the user could fire the provider and point their domain name to a new provider, without losing their website or email account. Protocols established clear, incorruptible rules for using a computer network. Trust in the stability of Web protocols let developers invest in building on them without worry of deplatforming. This kicked off an explosion of experiments and innovation on the web.

Although Web 2.0 applications were built on top of these early web protocols, they implemented advanced functionality using centralized architectures. This resulted in revolutionary and popular products like search engines and social networks, but neutralized the checks on power enforced by protocols.

Unlike protocols, the new platforms didn’t make enforceable guarantees or commitments to their users or developers. It came as no surprise when the platforms took advantage of their market dominance to arbitrarily change the rules, deplatform users and developers, and aggressively monetize their applications. Users lost the ability to fire their provider and stay in control of important new data like their social graph and identity. Because of unpredictable rules and platform risk, developers stopped building on top of their centralized APIs .

The departure from trustworthy, open, and decentralized protocols marked the end of vibrant creativity and innovation of the early Web and the rise of an oligopoly of centralized applications.

## Building advanced applications with blockchain-based protocols

What if there was a way to implement the advanced functionality of Web 2.0 applications, but with decentralized protocols? The solution is blockchain-based protocols.

Blockchain-based protocols enable the hallmark features of Web 2.0 apps—managing accounts, manipulating data, and building social graphs—using open and neutral protocols instead of proprietary, closed backends.

They bring the best of Web 1 and 2 together:

* _Trust guarantees of protocols_. Users have ownership of their data and choice over providers. Developers have the confidence to build applications and businesses on top of the infrastructure.

* _Advanced functionality of state management._ Multiple users can read and write to a single, shared database. Developers can build applications as complex as today’s social networks without creating centralized choke points.

## How FEEDweave works

Decentralized applications use an architecture where the data layer (the blockchain protocol) is independent from the view layer (the user interface).

Arweave (the data layer) persists the raw data records and encodes their structure and relationships in metadata.

The FEEDweave UI (the view layer) presents a visual representation of the application’s raw data from the blockchain to the user.

Views can be implemented as web, mobile, or desktop applications. There can be many competing views for users to choose from. Anyone can build their own custom view to any data on Arweave. Developers are free to implement different features, interface designs, or ways of hosting the app.

**This is why blockchains as datastores are so powerful. Centralized platforms can arbitrarily change access rules to their APIs or limit developer capabilities. Arweave guarantees an always-open, accessible backend that is reusable and extendable. Anyone can build applications on top of the data without permission.**

Because developers don’t have to build or maintain a backend, decentralized applications are also easier and cheaper to deploy than centralized ones.

To offer a performant user experience on par with existing social media applications, the FEEDweave UI is hosted on [Netlify](https://www.netlify.com/) and communicates with a custom [Arweave gateway](https://github.com/denisnazarov/arweave-gateway). The gateway ingests and caches data from Arweave, exposes an HTTP API, and allows for dynamic queries. Technically, the gateway is also a kind of view meant to be consumed programmatically by a user interface. Just like anyone can build their own UI, anyone can run their own gateway.

To have a consumer-grade user experience, not every element of the application needs to be decentralized. It is important to decentralize layers that may create lock-in and eventually disenfranchise users and developers. This way it is possible to have the best of both worlds: performant, user-friendly applications on top of open, decentralized data stores.

_(The Arweave community also maintains _[_openly accessible_](https://docs.arweave.org/developers/server/http-api)_ gateways for developers to build on. Developers can host their own by running a full Arweave _[_node_](https://github.com/ArweaveTeam/arweave)_.)_

### What is Arweave?

Arweave is a blockchain-based storage network that enables permanently hosting arbitrary data.

To host a file, users pay a one-time fee proportional to the file's size and denominated in AR tokens. They then submit a transaction that permanently hosts the file on the Arweave network. Anyone can later retrieve the data by querying the network.

Arweave allows tagging its transactions with arbitrary key-value pairs. Tags enable organizing records in Arweave similar to how tables organize records in a relational database. This lets Arweave be used as an open, neutral, decentralized, and autonomous backend for Internet-scale social applications.

_You can read about how Arweave works in detail in the _[_whitepaper_](https://www.arweave.org/files/arweave-lightpaper.pdf)_._

### How do Arweave apps work?

In order to distinguish one application's data from another, Arweave apps tag their transactions with a common `App-Name`.

FEEDweave uses the `App-Name: FEEDweave` tag to distinguish its posts from other data on Arweave. It also versions the posts, using a version tag in the form of `App-Version: 0.0.1`. Versioning lets developers update schemas without breaking old versions of views.

[Arweave Board](https://bkxqaor2dlei.arweave.net/pvmiu4SZKQGWAYjrLWzE_mI70u1-v8zIzQ8WaxIYURk), a decentralized forum, is another example of an application built on Arweave. It tags all of its transactions with `App-Name: ArBoard`, along with other proprietary tags. Since its data model is more complex, tags allow it to create a hierarchy between transactions, organizing them by `Categories`, `Posts`, and `Replies`.

![Stack diagram](https://i.imgur.com/gfQujQl.png)

Anyone can query the data stored in Arweave by `App-Name` and retrieve all data belonging to a specific application. You can explore the data from different apps on [Arweave App Explorer](https://explorer.arweave.co/), which is itself an app that queries Arweave by `App-Name`.

Transactions grouped by `App-Name` are like rows or records in a classic database backing a centralized internet service. Records organized by `App-Name` can be further organized and filtered using more specific tags, letting developers emulate database primitives like tables and relationships.

Traditional databases that power centralized applications have important drawbacks in comparison to Arweave. They are disconnected silos, meaning developers cannot reuse or extend their functionality across apps. In Arweave, all the application data shares a single, universally accessible datastore, enabling composability and extensibility.

### Why does composability matter?

Composability lets developers build complex software using off-the-shelf building blocks instead of needing to start from scratch. Composability is predicated on open access and a culture of sharing components. Open software ecosystems that encourage and reward composability have time and again demonstrated compounding innovation at breakneck pace.

The early Web gave developers powerful building blocks with open protocols. HTTP could be built on top of TCP/IP because of its open nature. Countless applications were then built on top of HTTP.

Web 2.0 applications also once promised unprecedented composability through the use of APIs. APIs weren’t just communication protocols or snippets of code, they were a powerful way for one long-running program to interact with another. This meant one internet service could access the data and computation of another over the Internet, a capability that didn’t previously exist. Developers invested in combining and building on top of these APIs in what was known as the [mashup era](https://en.wikipedia.org/wiki/Mashup_%28web_application_hybrid)), but quickly learned that it wasn’t safe to do so. API operators saw downstream developers as a threat and quickly limited or revoked their access, often destroying entire businesses of developers in the process. Operators could change the rules because APIs weren’t true protocols—there was no enforcement or guarantees of rules. Developers stopped building on APIs because of a compromise of trust, and the mashup era was over.

Blockchains are a new architecture that enables complex composability: the ability for one program to access the data and computation of another, with the guarantees of a true protocol.

Composability in blockchain applications was first popularized in the DeFi (decentralized finance) ecosystem on the Ethereum blockchain. Because of the open nature of programs (also known as smart contracts) running on Ethereum, developers can reuse [existing components](https://lindajxie.com/2019/09/25/interoperability-and-composability-within-ethereum/) instead of rebuilding their own. Developers confidently rely on upstream components continuing to exist and remaining accessible because of the guarantees of the Ethereum blockchain as a computation environment. Ethereum is seeing a compounding explosion of applications built using this new class of reusable building blocks.

Because Ethereum’s architecture optimizes for the highest degree of trust required for financial applications, Ethereum isn’t ideal for building content-heavy applications like social media platforms.

Intensive data storage is where Arweave shines.

Arweave apps have their own flavor of emergent composable behavior. FEEDweave was easier to build with the help of existing building blocks. While posts are stored in `App-Name: FEEDweave`, the app taps into an existing identity system for human-readable names called `App-Name: arweave-id` (see the ArweaveID app [here](https://alz4bdsrvmoz.arweave.net/fGUdNmXFmflBMGI2f9vD7KzsrAc1s1USQgQLgAVT0W0) and its data [here](https://explorer.arweave.co/app/arweave-id)). To integrate a social graph, FEEDweave makes use of `App-Name: social-graph`, a social graph shared among multiple applications. FEEDweave also allows users to link their Twitter account to their Arweave address using `App-Name: identity-link`.

You can explore the raw data for these applications in [Arweave App Explorer](https://explorer.arweave.co/). Anyone can build a UI for any of these applications, remixing them as necessary. You can try composing a raw transaction for multiple applications with [Arweave Publisher](https://publisher.arweave.co/).

Arweave apps are also extensible. Third-party developers don't need to ask creators of applications for permission to add functionality. For example, if someone wanted to add the ability to post comments or create threads to FEEDweave, they could create a comment transaction tagged `App-Name: post-comments`. They would then fork the FEEDweave UI and add functionality to read and post comments. Of course, it would be up to the new developer to convince users to use their new interface, or to have their code merged with the original application, for the functionality to gain traction. Since the addition of commenting is superset of functionality of the original FEEDweave app, it wouldn't disrupt the original user experience of the application. Users have the choice to use it, only if they want to.

## Further work

Today, FEEDweave is only an MVP, intended to serve as a proof of concept of building decentralized social applications. In order to be truly useful and have feature-parity with popular social media platforms, it needs more work. Feedback, ideas, and pull requests are greatly encouraged!

This is a preliminary list of features that could greatly improve the FEEDwave experience.

* **User-friendly login:** Currently, users log in by loading an Arweave JSON wallet into the FEEDweave UI. While this was easy to build, it is not the most secure or user friendly way to onboard mainstream users. Easy to use log in has been under development in other blockchain ecosystems for years and can likely be leveraged here

* **Pagination:** The gateway currently doesn’t support pagination. Pagination will help provide a better UX and prevent performance degradation when there are lots of posts on FEEDweave.

* **Comments and threads:** There is no comment support or ability to thread posts, a hallmark conversational feature of social network. Supporting conversations will help increase engagement and make FEEDweave more fun to use.

## Further reading

You can see the constellation of GitHub repos that were built to enable and ideate on FEEDweave here:

* [https://github.com/denisnazarov/arweave-gateway](https://github.com/denisnazarov/arweave-gateway)

* [https://github.com/denisnazarov/feedweave-ui](https://github.com/denisnazarov/feedweave-ui)

* [https://github.com/denisnazarov/arweave-explorer](https://github.com/denisnazarov/arweave-explorer)

* [https://github.com/denisnazarov/arweave-composer](https://github.com/denisnazarov/arweave-composer)

Follow FEEDweave updates on Twitter (for now) here:

* [https://twitter.com/FEEDweave_](https://twitter.com/FEEDweave_)

Learn more about Arweave:

* [https://www.arweave.org/files/arweave-lightpaper.pdf](https://www.arweave.org/files/arweave-lightpaper.pdf)

* [https://www.arweave.org/yellow-paper.pdf](https://www.arweave.org/yellow-paper.pdf)

A well researched article on today’s problems with social media, the history of protocols, and thoughts on how new protocols may fix things:

* [https://knightcolumbia.org/content/protocols-not-platforms-a-technological-approach-to-free-speech](https://knightcolumbia.org/content/protocols-not-platforms-a-technological-approach-to-free-speech)

Tags:
App-Name:FEEDweave
App-Version:0.0.1