Is there still an appetite for SAFE Network-based website publishing tools?

Maybe, but as soon as users start having to run and configure local services you lose the simplicity which this project is all about.

The safe network at the moment is geared towards techy people, and I’m trying to release tools to create a mass appeal.

Hopefully the network will at some point add distributed code containers, so the network participants themselves could automatically run the blob creation service, but we are a long way from there as of yet.

4 Likes

I’m not sure you need a cron process, but staging makes sense. This sounds similar to my thoughts in the past:

  • a store that allows comments to be submitted by anyone, but doesn’t show comments on the site (but which can be reviewed by the site owner)
  • the site owner is notified when there are new comments, and can choose to approve or reject them, with an option to add the poster to to a blacklist that hides further posts from those IDs.

My suggestion to look at static site plugins was to gather ideas and possibly code that can be adapted, not to use WordPress as a CMS for SAFE. To start it could be used as is, later it could automatically replace WP comments and other dynamic features with SAFE equivalents.

The point of that route is to help people get existing sites onto SAFE, while also allowing them to straddle web and SAFE if they wish (similar to dWeb Blog).

I think there’s a massive opportunity there and that it will naturally deliver a large number of adopters - millions of existing WP sites - to a SAFE based CMS. So it’s a route for somebody to create a very popular product.

PS I’m glad you like Svelte. Check out the Discord chat - always busy and very helpful. Always new components and examples being shared, usually an expert there to help etc.

What impresses me is that even though I’ve almost no experience with frameworks I’m still spending 95% of my time writing the code of my app, and very little trying to understand how to do what I want in Svelte. It’s so easy to learn and just gets out of the way. This makes using Svelte really fun.

5 Likes

Just a note here: You’d have to version your link to the comments code. Linking to an external NRS resource will break versioning (as someone could update the code without the site owner/user knowing). But that means getting a new version of the comment system is opt in for site owners. And can easily be rolled back.

2 Likes

Awesome, that’s actually much better. I like the idea of opt-in only upgrades. That allows people to control backwards compatibility breaks in data for more complex applications where a version update could cause data failures.

2 Likes

I’ve been tinkering on my end. I’ve ran in to some early issues with authentication within the latest SAFE Browser Alpha so I’ve moved off on to UI work.

@happybeing I’m sorry to say that after a few days of coding within a Svelte framework, I’m moving back to Vue. The bundle size is around 35KB bigger (once I realised I don’t need Axios since we’re using the underlying NodeJS libraries, and I don’t need a full router since I’m going with hash based routing, I was able to cut a lot of extra weight out).

I’ve ran in to a lot of issues with Svelte, namely how verbose the preprocessor’s output is for things like CSS class names and there being no easy way to opt out of scoped styles. Then issues with the routers available (the svelte-spa-router uses use:active to automatically add .active classes to anchors, but the Svelte postcss preprocessor doesn’t pick up on this class name (it only sees class names defined within the HTML, not within module javascript like the router uses), so it just outright doesn’t work.

Svelte is really cool, and I think in a year or two I’m going to come back and have a fiddle with it again, it just doesn’t feel ready right now and it’s lacking a lot of the polish which make Vue and React so productive to develop in.

For everyone else: I should have some UI mockups to share with you all before the coming Wednesday. Tonight I went to the effort of mocking the window.Safe calls I’ve used so far (I even added some code in to the mocks to randomly inject exceptions, so I can test the user experience against network failures), so I can develop against mock data until Maidsafe have a chance to investigate some of the issues I’ve raise.

I suppose you could consider this project IN PROGRESS officially as of tonight, with a “watch this space” notice in place while I get reacquainted with my development tools.

10 Likes

Fair enough @Shane, you are a lot more experienced than me. I recognise some of what you’re talking about but I’m very little experienced with routers. It might be worth raising those issues in the Svelte chat - at least so they are aware.

They are pretty switched on so I doubt this will be news to them, although I follow things quite a lot there and don’t recognise the issues you mention being blockers - so just maybe there are solutions to some of this.

Good luck, glad to see you picking things up.

I’ve been struggling with Svelte myself today, found a problem using notifications within my imported JS files. Probably because I don’t understand the subtleties. Lots still to learn, which is what I enjoy doing. I’m keen to see what you create too and will follow with interest - and tempted to have a play with Vue.

3 Likes

By the way, I did some work with the new APIs and had authentication and a few other things working, so if it helps I could see if that’s still working. I moved onto a different project while I waited for the data APIs to be exposed again. The working code is in safenetworkjs (branch fleming-apis). That code is part alpha 2 (no longer working) and part new APIs (was working).

1 Like

Small update, we now have a public repository to track the progress of this project: GitHub - SAFEPublishing/Phantom: A publishing tool enabling users of the SAFE Network to easily manage websites

I’ve committed to making every line of code I ever write for the SAFE network open source, and any projects I create will be found under the SAFEPublishing group in github: SAFE Publishing · GitHub, and making it as simple as people for people to deploy their own versions of the projects I create - so that I don’t have to be a centralised point of trust which could fail in the future.

I’ve made decent progress now that I’m unblocked, I’m working on the interface still. On Wednesday evening I’ll post some screenshots up here but for now expect the code to be updated a few more times between now and then. I’m trying to keep the commit size small (with the exception of switching from Svelte to Vue, not much I can do about having to commit hundreds of lines of postcss / babel / vue config), so it should be reasonably easy for people familiar with Javascript to follow along with what I’m doing.

@happybeing I don’t suppose you ever solved the problem of listing which NRS belong to a given user did you? At the moment the only way I have of testing whether or not a user owns an NRS is publishing a file to the FilesContainer attached to the NRS I’m testing against (similar to how AWS and other hosts have domain owners publish a TXT DNS record to prove ownership of a domain). It would be nice to be able to run a simple GET request against the NodeJS libs which lists a users domains, I even checked against the Rust libs in maidsafe/safe-api/safe-api (because there are some functions in the Rust libs not yet implemented in the NodeJS libs).

…Although now I’m writing this, that sounds privacy invasive so I may have answered my own question as to why it doesn’t seem to exist - if so, just say and I’ll drop it and move on.

Also, I wanted to say a thanks to @bochaco and @joshuef for their help so far in getting me unstuck. SAFE is a ways away from being “developer friendly” due to how unstable the libs are, but these two chaps make it much easier to plough through.

Edit: The next post will probably be in a new thread, announcing the project officially and sharing some visual progress (since code committed and theoretical boundaries crossed don’t really mean much to the majority of this forum’s constituents).

16 Likes

Great news Shane.

You can/will be able to list the NRS names of the current account, but I think you are correct to assume you won’t be able to ask if a given name is owned by an account/user.

The details in this area are likely to change, but I did have some code that used the experimental RDF API to list the NRS names. But that was alpha2 and AFAIK the Fleming API for this is not exposed in the browser yet.

1 Like

@happybeing gotcha, any chance you could point me to the right file? cheers

1 Like

Yes this is correct, and @Shane, the labels feature set is what is being proposed as the way to achieve this moving forward. We used to have “default containers”, for this case it was named _publicNames default container, and we used to keep track of NRS names in there, with labels I imagine you’ll have an API which you can say fetch_index_filtered_by_label("nrs-name"), or even with a URL like safe.fetch("safe:///nrs-name")…we’ll see how everything ends up shaping up but just to give you the context.

4 Likes

I can’t find it quickly, but don’t think it will help. As Gabriel says the API will be different when it becomes available.

Cheers for this, for the moment then, I’ll stick to storing them in localStorage and having the user verify ownership via automatically publishing a test file.

I think that’s what the browser does for the moment due to the same reason, I mean when you create NRS names with the browser.

Where would you prefer issues reported, here or on Issues · SAFEPublishing/Phantom · GitHub ?
Got a path problem when I install.

Straight in Github is fine :slight_smile: That being said: it’s not even close to being ready for users to install at the moment, it’s basically a wrapper Vue app. It’ll be a couple weeks before there’s anything substantial to be worth you fiddling with.

1 Like

I’m sure as it gets closer to being useable, the docs will make it clearer for numpties that having cloned the git repo, you need to

cd Phantom
cd www.phantom
npm install
npm run serve

which gives this …

which is nice :slight_smile:
and I’ll play about with it a bit more once I have read more about Vue.

It’s amazing what RTFMing carefully can do for you :slight_smile:

4 Likes

Glad you got going @shane!

Just to add on to what @bochaco said, you’ll be able to query for the current user eventually (at the mo in the browser we just write to the filesystem; if you want to reuse that list the meantime, it’s stored in the user’s app folder for electron mysites.json), you may be able to find the sites another user decides to make public via querying their safe-id down the line, if they decide to make them public.

So it’s not impossible to find out ‘oh cool, gabriel has these sites he made public’, that’ll probably be pretty easy. But in terms of NRS domain → user, that would also only ever be opt in.

8 Likes

Would it be possible for different SAFE ID’s to publish to a public smart folder, still able to be queried by anyone, without it being owned by any app? If labeled content was indexed under an unowned or immutable public smart folder I imagine that querying it by individual apps or search engines would be easier for content discovery with the major benefit of not being owned by anyone yet accessible to everyone.

5 Likes

I think such things would be possible yep. I believe @david-beinn has touched on this with his search topic.

Have a read over there @Nigel , there’s some interesting ideas!

4 Likes