WebContainers run Node.js natively in your browser. Could it be usefull for tiddlywiki?

As the title says, the stackblitz team has launched WebContainers, a WebAssembly-based operating system powerful enough to run Node.js.

Could this tech be used to turn a tiddlywiki into a PWA (progressive web app) ?

2 Likes

I am no expert in this

I think it could allow tiddlywiki node servers to be a PWA and Tiddlywiki on top of that.

I am not sure tiddlywiki single file is not itself very close to a PWA already.

If we can make tiddlywikis into installable PWAs by passing all the saver issues it will be a new dawn. If we could get the file uploads plugin working with this to support media rich content we would be close to a full application platform.

Thanks for sharing

1 Like

My prior reply was based on my key objective of making tiddlywiki transparently deployable and the use of the term PWA is possibly a “trigger for me”, I tend to use node implementations only for “serving tiddlywiki’s on my desktop/LAN” myself, although I understand a lot of the developer’s use it for other reasons.

I am not sure but I expect the implementation is not necessarily going to allow TiddlyWiki’s to be published to the internet for others to access at the same time, although perhaps the WebContainers part will allow this?

So the native “Node.js in your browser possibilities”, may support the “personal” use of “Node and Tiddlywiki” in the browser, which a section of our community are likely to embrace wholeheartedly, and promises to allow some powerful possibilities.

However if we can use this to Publish as well, and allowing us to incorporate additional services from within node and NPM this could be very interesting.

Very cool! You can click this link to get your own Node.js instance in your browser: Node.js (forked) - StackBlitz

In the console on the bottom, you can install TiddlyWiki, create a new TiddlyWiki, and listen on port 8080. TiddlyWiki opens on the right.

It doesn’t save any changes to the “disk”, though (wherever that is!). Maybe that can be figured out.

3 Likes

Update:

It seems the AJAX calls to save changes get regular HTML containing an <iframe> back from the server, so that part doesn’t work.

I can open the TiddlyWiki in another browser window with the URL https://node-isctwu--8080.local.webcontainer.io (which is the id of my temporary WebContainer).

Maybe this can be debugged if installed locally instead.

2 Likes

This is very cool. Reminds me of docker but in the browser.

You need to include plugins/tiddlyweb and plugins/filesystem to make that sync chain work on vanilla node.js. Try passing those as “=” arguments or including them in the tiddlywiki.info file.

I created the TiddlyWiki instance with tiddlywiki mynewwiki --init server, and confirmed that those plugins you mention are installed.

Interesting. Docker reminds me of how browsers work. :smiley: But yeah, WebAssembly makes browsers so much more capable, and I’m sure there’ll be many more interesting projects like this in the future.

could be browser specific there was a mention of Firefox not allowing local directory interaction? Haven’t had time to play yet.

Hi everyone! I’ve encountered this discussion by coincidence but I’m happy I did!
My name is Sylwia Vargas and I’m a Developer Advocate at StackBlitz. Feel free to reach out to me if there’s anything you’d like to explore or get clarity on!

3 Likes

Welcome @Sylwia_Vargas

Thanks for your offer. Certainly if we can make use of StackBlitz for easy in browser install, saving and hosting of tiddlywiki on node it would be very useful.

  • There is the bob plugin that allows multi-user tiddlywiki so it we could publish this on the internet it would be a revolution.