Question about websites on the SAFE Network

Hi,

So if I were to make a website on the Safe Network, would I always be the only person that has access to make any changes to that website?

Is there a way to open source it and therefore allow it to become a community website that is upgraded with enough consensus? or will open sourcing it only allow people to copy that and create another similar website?

And also is there a way to kind of lock the website, so no one will be able to change anything on the website?

I’m just thinking about all the possibilities of what you could do with a system like this, but kind of need to know what the exact possibilities are to potentially help me think of some website ideas.

I suppose all these questions could apply for apps too?

Hi @sonder

You can be the only person if you want too, but can also add others through multisig.

@bochaco can answer this question the best, he had an idea of upgrading to specific versions of an website. It would also be fun if you can nitpick features that you like in an update.

If you use “immutableData” you can get the job done (that’s data that can’t be changed).

Go here for like minded thinkers https://forum.safedev.org/ (I’m a clueless consumer). The best way to think I suppose is to code and soon enough your a pro learning new SAFE students

:stuck_out_tongue:

2 Likes

Thanks for the feedback.

I’m not a website or app builder, but I am thinking of having a go and learning to code them. At the moment I’m just thinking of some of the ideas of what you can do with the SAFE platform that you couldn’t do with the clear net.

I’m thinking I may start with a basic website just so I can learn some Javascript and whatever else is needed to do that, but I would like to create a list of some bigger long term goals.

Cheers

1 Like

This is about where I’m at too. As my friend who is a web developer keeps telling me, even small projects can be pretty ambitious!

My current tactic is to start with the tutorials on the safe dev hub (I’ve done the web app one, which seems to be working pretty smoothly now.) For me not being familiar with these things even just getting everything in place and finding where to fill in the blanks was really useful learning.

https://hub.safedev.org/start_developing

Now I’m trying to see if I can make something useful out of it! To do this, I think (I’m sure someone will correct me if I’m wrong) this is the tool box, along with some knowledge of Javascript.

https://docs.maidsafe.net/safe_app_nodejs/

For example, the tutorial app makes a new random mutable data each time it is launched, so right now I’m thinking the first step to making something useful would be to use the code from the API to find the location of that mutable data in order to be able to return to it, edit it etc.

(then code something so that the app makes a new random MD when it is first used, but stores and returns to any already created MDs for subsequent instances, in a manner depending on its function…)

Then I guess one can think about permissions etc etc.

I’m quickly learning that to do even the smallest steps that we all take for granted on the clearnet or on our machines, it takes a lot of thinking about the most logical and sensible way to do it, not least from a user’s point of view.

As I said, I don’t really know what I’m talking about so may not be the best person to answer, but just thought I’d respond as it reminded me of where I’m at too…

7 Likes

Great info, thanks.

Have you built anything yet?

If so, I’d like to have a look if that’s ok?

2 Likes

Hey @Sonder , as @19eddyjohn75 suggested I’m also excited about being able to do this type of things in the future. I haven’t thought too much about how to implement it but there are several options that came up to my mind when I started thinking about it:

  • when you visit a website, the browser or other utility app, can give you an option “clone website” which will be cloning the whole website and store it as immutable data that you can always refer too when browsing the same url. A link to that clone could be kept in your account private to you which is used by the browser to detect it every time you visit that url, or maybe it’s just a bookmark added to your list, or…
  • the author of the website publishes the website already as immutable, i.e. all files of the website are stored as ImmutableData with a version attached to it which is also immutable, then when you visit the url the browser can pull up the list of available versions for that website and you choose which version to use. If you use a newer than last time, then that’s basically you accepting an upgrade on the website, whilst other may decide to keep using older versions for some time, or forever. I see how elders struggle when software is upgraded and no choice given to them, they find it hard to keep up with it, and at the end of the day, what we are doing by doing this is excluding them.

I’m sure there are many other options for implementing this, including combinations of them.

Correct, look at the MutableData getNameAndTag function.

Exactly, you should look at storing that either in some of the default containers each account has, or the application’s own container, they are all private MutableData’s so you can deal with them using the MD functions.

I think you are on the right track to learn more about all this, don’t hesitate to post questions in our https://forum.safedev.org.

I also think you are on the right track in thinking about the different things that can be done on SAFE, I think only when you do that is when you can really realise how powerful it is and see why we are here :slight_smile:

9 Likes

BTW, @david-beinn, if you happen to “extend” the app tutorial with any of that, you can freely consider sending PR/s to include it in the tutorial, we will obviously need to help you there but everybody is welcome to do it.

3 Likes

Haha, No!

You would be welcome to look if I had.

On the plus side I am exactly where Bochaco just suggested I should be, looking at getNameAndTag function, but at some point (might be now) I’m aware I’m going to have to go and learn some basic Javascript syntax.

If you’re interested at all, my original plan was to make a list of current SAFE sites (just replicating the list here on the forum but on the network so it’s slightly more user friendly.)

Obviously this could be a static html page, but then why not make it’s so it’s easily updatable, rather than having to upload a new file for every update?

This is where the Mutable Data comes in, thus needing the NodeJS API.

To take it further, why not categorise the list? Now we need a database on the MD.

Why not let people add their own sites to the MD? Now we have issues (if not necessarily problems at this stage) with permissions.

So, instead of all that, why not encourage people to make details of their site available in RDF, (as far as I understand this is the kind of potential RDF has, even if this use case isn’t a very good example) and then use the network itself as the database? Now we’re looking at designing a search engine, and we’re running into issues of trust as to whether people are categorising their sites correctly. So by this stage I’m just trying to design an open source search engine with zero knowledge!

(I’m not really trying to do that)

Just going through my thought process here though cos it seems crazy how quickly one can go from a very simple, easy idea, to something really hard!

6 Likes

Thanks Gabriel,

I’d love to be at that stage, but was just in the process of trying to do something with the getNameAndTag function, so that’s encouraging!

BTW, how does one access the default containers in one’s account? I assume there’s nothing in the GUI yet.

1 Like

No, nothing in any of our apps’ UI yet. For your app, look at getContainer function, you provide the name of the default container you wanna get.

2 Likes

This will sound funny but I used to really love Pinterest and one big issue I always had with it was you’d have this amazing board, named, that has all these nice looking thumbnails, easy to find what you’re looking for BUT… Over time links would be broken, for whatever reason. Sometimes you’d search and find a good thumbnail/description that seems perfect and so you’d swiftly pin it assuming it’d lead to a site but even those can be broken. So these boards that are like your little library of cool internet stuff are actively rotting away. It was one of the first things I thought of when I realized the potential of SAFE.

9 Likes

I don’t know how to do this, but it would be fun, if you could also allow others to create a “service” under your publicID. For example if I got publicID: com
and google would want to create service: google.com (but of course pay me to do so :rofl:)

:nerd_face: regulator: Eddy does this not make this a “security”?
:crazy_face: clueless consumer: Your absolutely right, this makes it privacy, “security” and freedom.

:stuck_out_tongue:

2 Likes

Thanks for the great reply and info @bochaco

1 Like

Hi @bochaco ,

Just a quick question, more of a dev forum thing but just thought I’d put it here as it’s referring to the above conversation…

Having retrieved the address of the random MD created by the app and printed it to the HTML file, am I right in thinking from the forum post below that there is not yet a way to access it?

Thanks,

David

hey @david-beinn, yes you can access it from the xorname you get back when calling getNameAndTag, you just need to use that in a call to newPublic/newPrivate function accordingly if it’s a public or private MD.
That forum post is talking about being able to fetch it though the browser using a URL, or with the webFetch function.

1 Like

Thanks very much! I’ll give that a try

1 Like

@david-beinn
@Sonder

I think I’m on the same level as you two.
I’m currently working on the simplest of webapps that went obsolete around the 2000s, the guestbook.
Can I see what you’ve made?

https://gitlab.com/EuropeanBasics/guestbook

2 Likes

Hi @folaht !

That’s cool that other people are inspired to dive in with the network. I’m certainly way out of my depth, but that’s what makes it fun!

Just having a look at your gitlab it looks like you’ve got a bit more experience than me in putting together apps.

I’ve not made anything as such but I can tell you how to get the address and type tag back from the MD. Bear in mind that I knew zero JS when I started this last week so it probably isn’t strictly efficient (and the SAFE API does it slightly differently with promises,) but I just added the following:

async function getNameAndTag() {
nameAndTag = await md.getNameAndTag();
}

After the md function in the Safenetwork file (from the tutorial.)

then at the top of the Methods in the app.vue file

refreshNameAndTag: async function() {
nameAndTag = await safenetwork.getNameAndTag();
},

then add nameAndTag to the Data at the top of the file.

From there I’m sure you can find a way to print that to the HTML or whatever {{}}.

My next challenge is to store that in a container so that when the app launches it has somewhere to find the address again and use it to return to, assuming that is what is wanted.

I move at a snail’s pace but if I get anything useful done I’ll no doubt post it…

Good luck!

3 Likes