MWS is ready for more testing and contributions

Well, at long last I think we’re ready for round 2. MWS is ready for people to test the features that are there. It has the basics (wikis, users, permissions). Most of the work I’ve done is under-the-hood, hopefully making the code base more flexible and less prone to errors. It should be very easy to understand, and editors which support typescript should work with ctrl-click and find all references.

The warnings about security are still there. I’m not really worried about data loss at this point, but it could certainly still happen, so for this round I still wouldn’t recommend using it for anything critical. You can always download your wiki from the browser.

I’ve designed it to be as extensible as possible. The primitives are fairly simple. Each concept on its own isn’t hard to understand. For developers, I’d be happy to answer questions here or on tiddlywiki’s discord (there’s an MWS channel). Overall the code base should be self-explanatory once you understand how it’s tied together. I would really love it if more developers want to contribute.

Right now, wikis can’t talk to each other, and they definitely can’t access any of the admin endpoints. That’s because wikis allow users to write JavaScript that other users will run in their browser, which could allow privilege escalation attacks. The eventual solution to this would be something like an oauth consent page which the user would be redirected to to grant permission for a specific action to be carried out. I’ll definitely need help designing this.

At the moment, auth is just normal username and password using secure protocols. The passwords are hashed with a master salt (we use the OPAQUE protocol, to be specific). But there’s a lot of features we could add. Passkeys, third-party login, single-sign-on, etc. If any of you want to pitch in and help design some of these things, that’d be great.

It’s just running on NodeJS. If someone wants to turn it into an Electron app that uses messages instead of a local server, I could see that being a useful addition. Also that weird MacOS container format that applications sometimes use.

Import and export could use some work. I’ve add a feature to the TiddlyWiki syncer to allow batch syncing, instead of one tiddler at a time, and that really speeds up imports. We don’t really support regular file systems, as it seems difficult to handle the edge cases. You can always download your wiki by clicking on the cloud status symbol.

The core code that ties everything together feels a bit complex, but also very flexible. If some one has a different idea, I’m open to suggestions.

The react client implements features and design somewhat inconsistently. I’m exploring the possibility of switching to web components and material design 3. If anyone has suggestions, feel free to let me know your thoughts.

I’m sure there’s a lot of features in the TiddlyWiki ecosystem that could fit well into MWS. I think we’re at a good place to start taking a look at some of those features.

So let me know what your thoughts are. And please, I would be happy to help others get into the code base and implement features. The code design is actually fairly simple, in my opinion, but I tend to be bad at organizing stuff, so it doesn’t always look that way.

Yeah, I know, that’s a lot of “begging” for contributions. :grinning: But it also means that I think I’m done rewriting the entire codebase every other day, so things should be stable enough now to actually contribute to.

Enjoy!

8 Likes

This is exciting news!

Thank you very much. I hope to be able to spend some time with it this weekend.

That’s very exciting @Arlen22 , thanks for the update - I’ve been watching this very closely!

Unfortunately I won’t be able to test it on just NodeJS myself as the machine I have is a corporate, locked down Windows machine. I can however run the Electron apps as you mention so I’m hoping this gets built - I know @oeyoews mentioned possibly extending “TiddlyWiki App” (which I use it everyday and it works great) to work with MWS when it was available. I did spend a whole weekend about a month ago trying to “vibe-code” an electron app over MWS using both Gemini and ChatGPT, but couldn’t get anything to work.

I imagine some of the people who will quickly adopt MWS are the same people that adopted BOB while that was alive. One of the key features there was using Websockets to provide instant updates across tabs / users. For most of my use-cases, the difference between this speed and the normal NodeJS process (typically about a minute) updates is key to how it can be used. Jed even had a “chat / IM” function built-in to underscore the capability. I don’t remember if you’ve confirmed websockets being on the MWS roadmap yet - seems to be an important piece of a multi-user system.

It doesn’t sound like any of the help you need at this point falls within my abilities at the moment, but happy to jump in when things evolve. Thanks again!

giving this a go and immediately ran into issues

nemo@vpr002lamp:/tmp$ npm init @tiddlywiki/mws@latest test-mws
/tmp/test-mws
├─ localhost_certs.sh
├─ package.json
└─ Running npm install...
npm ERR! code ENOENT
npm ERR! syscall open
npm ERR! path /tmp/test-mws/node_modules/@tiddlywiki/mws/prisma/client/package.json
npm ERR! errno -2
npm ERR! enoent ENOENT: no such file or directory, open '/tmp/test-mws/node_modules/@tiddlywiki/mws/prisma/client/package.json'
npm ERR! enoent This is related to npm not being able to find a file.
npm ERR! enoent 

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/nemo/.npm/_logs/2025-09-11T04_26_20_147Z-debug-0.log
254
nemo@vpr002lamp:/tmp$ npm --version
9.2.0
nemo@vpr002lamp:/tmp$ node --version
v18.19.0

This is a debian 12 VM which runs a couple of node TW already.

(for laughs I tried it on a debian11 system (which also has a node TW on it) and it didn’t have this error. It only complained that the version of node was too old!)

(debian13 is on the cards for “soon”. If that turns out to be a pre-requisite, then this will just give me additional incentive I guess!)

image
just a small tip error

1 Like

Will you consider i18n now?

This link points to discord homescreen, not any related TW channel

Weird. The link works for me. Here’s an invite link to the server, in case that helps.

That’s a weird error to get. Could you possibly include the log it mentions (you can DM me if you want)? Did you try it more than once? Can you see if running npm install directly is working properly, either here or elsewhere?

If you want to do the init manually, you can create the following package.json

{
  "name": "@tiddlywiki/mws-instance",
  "private": true,
  "version": "0.1.0",
  "scripts": {
    "start": "mws listen --listener"
  }
}

then run the following install command:

npm install --save-exact tiddlywiki@latest @tiddlywiki/mws@latest

Potentially. This seems like the right time to lay the groundwork for that, but translations would probably come a bit later because a lot of text strings are probably still going to change.

Currently there is a somewhat basic implementation of this which just calls syncFromServer whenever the server sends an event. However, I was running into some issues with it that I don’t really understand yet, so it’s disabled by default. I just now made so you can enable it (per-wiki) by setting the tiddler $:/config/multiwikiclient/use-server-sent-events to yes. If you already installed before I posted this reply, you can update with npm install @tiddlywiki/mws@latest

1 Like

Have DM’d you the log. I got the same on multiple runs.

npm install run from /tmp errors similarly - that there is no /tmp/package.json

However the previous command DID create the package.json you quoted. at the location of /tmp/test-mws/package.json

Running that from /tmp/test-mws however resulted in the same error:

nemo@vpr002lamp:/tmp/test-mws$ npm install --save-exact tiddlywiki@latest @tiddlywiki/mws@latest
npm ERR! code ENOENT
npm ERR! syscall open
npm ERR! path /tmp/test-mws/node_modules/@tiddlywiki/mws/prisma/client/package.json
npm ERR! errno -2
npm ERR! enoent ENOENT: no such file or directory, open '/tmp/test-mws/node_modules/@tiddlywiki/mws/prisma/client/package.json'
npm ERR! enoent This is related to npm not being able to find a file.
npm ERR! enoent 

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/nemo/.npm/_logs/2025-09-11T16_06_15_378Z-debug-0.log

Comparing this new log with the previous (as provided), there are no distinct differences. (Just timing differences and the order of some http fetch GET)

I really don’t have any good ideas. I’d say try changing your npm version, either upgrading, or try the same version as the debian 11 machine has.

You can also run npm cache clean --force to see if that helps.

I’m afraid that’s all I got. Nothing in the log seems to indicate anything else out of the ordinary, and this is only happening on one machine. ChatGPT seems to think that v9.2.0 has a bug with “file:” dependencies, which is what prisma/client is under.