How to host a website using Maidsafe?

Newbie question:

I want to develop a content site on a p2p internet platform. Maidsafe has caught by eye. But I don’t see how exactly I would do that.

A) Is Maidsafe viable currently for a content site?
B) Where/how do I get started?
C) Can anyone in the know comment on advantages of Maidsafe over say Freenet in their current development state?

Thanks

10 Likes

Welcome @Emily,

You can’t do this at the moment although quite a few of us have done so on earlier test networks. The easiest way is to build a static HTML site using your favourite framework and upload it using the Safe CLI.

You can do this yourself from scratch by creating an index.html file, or by using one of the many static web frameworks available. My favourite is Svelte (a few are listed on the Dev forum in Static website frameworks for SAFE Network - General - Safe Dev Forum).

One of the sites I built earlier is dWeb Blog (https://dWeb.happybeing.com) which uses React Static. This demonstrates how you can deploy on the web or on Safe (or both) with a single script command.

I don’t know freenet well enough to compare but maybe someone else can help, or you might find some topics using the forum search. You’ll also find more on building websites and many questions answered on both forums, but don’t hesitate to ask. Hope that helps.

17 Likes

You can try to create a static website like @happybeing says and upload it for learning purposes to the new test network.

See simple upload with this old tutorial, note that some commands might have changed!

Next step would be to learn to create a Single Page Application with React, Angular or Vuejs and have the user write/fetch data to/from the SafeNetwork using GitHub - maidsafe/sn_nodejs.

Check out this tutorial for interacting with the SafeNetwork using the sn_nodejs liberary, bit hard to follow if you are not good at developing and might also have gone through some changes (github repo updated 4 days ago).

11 Likes

I have not heard from @hunterlester for a while, what a nice fella he is and always eager to help others. Miss that energy he had and always ready with a smile. Hope he is back soon.

14 Likes

@hunterlester if you’re listening, I still think about you brother! Hope you’re doing well.

12 Likes

This is a great question which I had been asking myself the last few days more clearly for the first time, thanks @Emily for throwing it out there.

The structure being described here is: something like Svelte, or React, or Vue, to combine your HTML, CSS and Javascript, you use the Network CLI to structure your files in a Safe Network readable sort of way, and/or to publish the site to the Network, or something like that (I haven’t watched the above videos yet, will watch soon)… and then you’re done.

Then my question is, Rust plus Webassembly, could be used all by itself without knowing any of that and you could also make websites? They’re two distinct approaches, if I’m understanding correctly?

I read that Rust/WASM can be made to play nicely with websites made using JS frameworks, because there are APIs for making them play nicely together. But I suppose I’m asking - quickest way to make sites would be .html files, possibly using a nice JS framework to make it a bit fancier and interactive, and an even more fancy complicated site could be put together with Rust and Web Assembly, and in these three scenarios, the CLI is where you structure your thing and put it onto the network. Am I putting these words in an order that makes a little bit of sense?

To use WASM in a website you will still need an index.html file and some JavaScript to bootstrap the Web Assembly. After that you can indeed access the browser DOM and create and modify HTML elements etc, which you would normally do in JavaScript.

But that doesn’t make it a good idea! In most applications it will be much easier and give better results to use WASM for the parts you want to be fast, or to compile down very small, and a conventional approach for the front-end.

4 Likes

Oh if you haven’t you should check out this tutorial.
https://hub.safedev.org/platform/web/

2 Likes

Are there any tutorials on building a basic website? Any tutorials that I come across are dated several years ago and either mentions an invite or using the Safe Browser which is no longer supported. Concept sounds great, just need to know how to get started. Also, does anyone know if there will be a docker image available? Thanks

2 Likes

It will reappear “soon”

Right now the team is working on a rock solid command line version to provide a stable platform on which to run the browser and and other graphical apps.
Basically the pace of development was too fast to keep the browser up to date and resources were shifted to working on a stable release.

AFAIK the browser is more or less complete and it should be a fairly quick process to put it in place when the underlying code stops moving under it.
We were shown very enticing mockups of the GUI from @JimCollinson a few months back and we all look forward to seeing further work soon.

There have been various community efforts to provide docker images and I expect to see more soon.
I am certain there will be an official docker version eventually but like the browser, finishing the CLI release comes first.

4 Likes