beakerbrowser / unwalled.garden

Schemas for a p2p social-media network built on the Dat Web.
MIT License
131 stars 10 forks source link

Websites and restructure #48

Closed pfrazee closed 5 years ago

pfrazee commented 5 years ago

Bad form to group 2 changes into one PR but it's shiptember, I'm on the move

Websites API and Links Schema

The Websites API gives read/write control over the local user's library of Dat Websites. It also gives read access to the public network of Dat Websites (as indexed from followed users).

The "Links" schema is a generic way to store a collection of links. In the /.data/websites.json case it lists the user's published websites.

Files restructure

"Typed dats" are going to feature much more prominently in Beaker than I originally expected -- to the extent that most typed dats will trigger the user's viewer applications rather than running the HTML/CSS/JS within the dat. In the case of the Person type, for instance, the Person Viewer will run. The upsides of this are many, but the biggest upside is that viewer-apps are trusted and so can access the UwG APIs without asking permission. This helps create a UwG Web where you can navigate to data and see the correct interface -- effectively separating content and presentation as the Web first intended.

The Viewer Application is chosen based on the dat type. This means that the dat's data really needs to be understood by the Viewer and putting non unwalled.garden schemas in the dat won't work as well. So: I'm denamespacing the data folders and instead going to use subdats for other types of information.

In effect, this means the folder structure is changing from

/.data/unwalled.garden/statuses
/.data/unwalled.garden/comments
etc

to

/.data/statuses
/.data/comments
etc