gnolang / hackerspace

Tinker, build, explore Gno - without the monorepo!
11 stars 8 forks source link

Idea: Own your social network's data #100

Open ajnavarro opened 3 days ago

ajnavarro commented 3 days ago

Introduction

This issue describes an idea for creating a decentralized social network on gno.land where users fully own and control their data. We can get a ton of ideas from the AT Protocol.

This approach ensures users can manage, verify, and delete their data whenever they want.

These notes are here to share with the team and as a reminder for future development. The goal is to design a system where Realms interact using simple, standard interfaces.

User realm with data

The core concept is to store each user’s data in their own Realm, giving them complete control over it. For instance, in a Twitter-like social network, we could define a basic interface such as:


type UserData interface {
    Posts(from, to time.Time) (PostIterator, error)

    // TODO: Add methods for likes, follows, and other actions
}

Any Realm that implements this interface can participate in the social network. Once a user’s Realm is connected, the social network can fetch the data and display it as needed, without storing it directly. Users retain full control over their data and can delete it at any time, as they are the ones hosting it.

To ensure data integrity, Merkle trees can be used. These allow us to verify that any shared or referenced data has not been altered. Additionally, the design takes inspiration from the AT Protocol and adjusts it to fit Gno.land’s Web3 contract-based environment.

Social Network Realm

The Social Network Realm acts as a coordinator and metadata manager instead of a storage hub. It does not store user data directly but keeps metadata about the Realms of users who choose to participate.

When a user registers, they provide a Realm that complies with the required interface, like UserData. This allows their Realm to interact seamlessly with the social network. For users who prefer simplicity, pre-designed templates can be offered to create basic Realms with minimal effort.

Instead of holding user data, the Social Network Realm queries the user’s Realm to fetch and render data as needed.

Thoughts?

thehowl commented 3 days ago

i'm also very interested in the AT protocol's approach, but I'm not sure how this could translate exactly onto gno.land, or whether it makes sense :)

But I'll keep it buzzing in my head.