Proof of concepts for managing your identities and social networking on the SAFE Network.
What this is
Thanks to some prodding from @happybeing, we’ve been investigating the idea of using a Resource Description Framework (RDF) for data on the network.
The principle benefits of this are that with self describing data it can be more easily consumed by other applications, and we believe it gives us the flexibilitiy we need to scale our representations in the future, always with an standard format.
For the impatient that just want to play with the apps, bear with us, we are hoping people can provide feedback not only about the apps themselves but also about the whole concept and approach we are proposing to take here, so we would like to encourage you to read the following sections and try to understand them before playing around with the apps.
WebIds…
To actually make some use of RDFs, we had to figure out some data that would be genuinely useful. Identity seemed to be a good starting point, which brought us (via SOLID) to WebIds.
On the clearnet a WebId is a URL that describes a person, organization, group, device, etc., and you can use this to authenticate on websites (via some complex server/certificate malarky). But as we have authentication and data already baked into the network, a WebId is much simpler on SAFE, just being (as we propose in this POC) a piece of addressable data on the network containing the following information:
name:
nickname:
uri: // a unique safe://uri to locate your identity
website:
image:
To this end we’ve created a webApp that lets you manage your WebID Profiles.
An Updated Peruse
Outwith of a good batch of fixes to Peruse functionality that @hunterlester was able to put in, to actually make WebIds useful a user would need a way to manage them. For this we opted to include a webId switcher, in the browser. This lets a user choose a WebID per tab. The selected webId is then passed into the DOM for a webApp to consume:
console.log( window.currentWebId )
// Returns a webId object if selected.
window.webIdEventEmitter.on( 'update', ( webId ) =>
{
console.log( 'webId from update', webId );
} );
// whenever a webId is changed, the webApp can listen/react to this.
Patter
The final piece of the WebId puzzle was an application to actually use our newfound identity, and then also put some more RDF data (that ideally can be consumed by other applications).
This is how we ended up considering the creation of a social network application we called Patter
, where users can post messages onto other users profile’s wall, using any of the identities the user has created with the WebID Manager.
Patter
allows the user to view other users profile info, and wall’s posts, by searching them thru their WebID URL. It allows you to post messages onto their walls, or your own wall, allowing you to identify yourself with any of the available identities created in your SAFE account by simply using the Peruse WebId switcher.
Getting going with WebIds
Downloading the POC browser
The first thing you’d need to do is download a special version of Peruse which contains the POC code for the webID switcher and new APIs needed by the webapps to manipulate RDFs and WebIDs on the network. Please download the verion that corresponds to your platform:
The WebId Manager webapp
Once you launched the Peruse-WebID-POC version of our browser, either use an existing SAFE account or create a new one, and log in.
You now can start creating your own WebIDs on the SAFE Network by simply launching the WebID Manager from the “WebID-switcher” you will find in the left hand side of the address bar. Alternatively you can open the following URL in a new tab:
Go ahead and create some WebIDs. Depending on the context, you can have an informal profile with a WebID, while you can have a second one which is more a proffesional one you’d share with your colleagues (for example.)
In the list view, clicking your webId url will navigate to an RDF representation (Turtle by default for now) of the raw data on the network (for those outthere who like a bit of raw data on a Friday afternoon!).
Using The Patter social network
Once you’ve created some WebIDs, you can use the social network application by opening the following URL in a new tab:
Share your WebID/s with other people so they can find you using the search box and post some messages in your wall. You can also post messages on users’ walls using any of the identities you created by id-ing yourself with the id-me
button on the top right hand side.
Finally, come drop a note on our walls:
Issues?
Known Issues
With the APIs included in this release, and the addition of a WebId to your account, to continue adding/manging sites you’ll need to use an updated release of the WHM going forwards. You can find this at the peruse release for now..
Due to the above incompatability, you cannot create a webId at an existing publicName (as created in the WHM for eg.)
New Issues
We will appreciate if you can report any issues you encounter with the applications directly on github:
- Issues for WebID Manager app please report them here
- If the issue is related to Patter app, please report them here
- Otherwise, if the issue seems to be with the Peruse browser please report it here and make sure you mention it’s about the WebID-POC version of Peruse
Going Forwards
Also, please use this thread for discussions, help, sharing WebIDs so people can interact with you thru Patter, as well as ideas and feedback you consider nice to share.
We are very happy to be able to share this with all of you, we really hope you like it and help us in this process of understanding how we should evolve our data representations on the network, as well as how identities can benefit users to prevent them from creating dozens of accounts for different applications as it’s needed now on the clearnet.
As mentioned above, this is a simple POC. The APIs are pretty raw (and not so thoroughly tested), and the UI is simplistic at best.
But as it’s a webApp we’re hoping it should be reasonably accessible for web developers to make PRs to improve the functionality for both apps (and we’ll be very excited to receive them!) or anyone could just fork and make their own app using this data on the network !)
For those interested in this deeper data structure stuff, and some expanded explanation on the new APIs and RDF helpers, we’ll be posting a more in depth technical post on the dev forum next week, as well as providing a bit more documentation in the repos themselves!
Happy Friday