Live data from Hacker News

Web apps in a single, portable, self-updating, vanilla HTML file

hyperclay.com

211–220 of 240 posts

Re: Web apps in a single, portable, self-updating, vanilla HTML file

#211
post #196
post #170

Earlier quoted context omitted.

I'm still confused - if it requires a NodeJS server, then it wouldn't be a fully self-contained HTML file would it?

It technically doesn't say "self-contained", but it does say "portable" and "self-updating", which I must agree is misleading.

If you want something actually self contained play with this https://startr.style/modernism/

Re: Web apps in a single, portable, self-updating, vanilla HTML file

#212
i just standardize to TiddlyWiki (2004) https://tiddlywiki.com/#History%20of%20TiddlyWiki format now supporting json to maintain interop with PlainText editors emacs, vim, mobile, or bespoke GenAi DIY vibe code import/export tool, etc and all done!

[{ "title": "HyperClay", "text": "2025-08-18 Experience the Zen of making, hosting, and sharing great software in a single, portable, self-updating, vanilla HTML file\nBuild web apps like you're sculpting clay, not managing infrastructure.\n\nModern web development forces you through layers of abstraction: config files, build steps, magic frameworks, deployment pipelines.\n\nHyperclay returns to a simpler model: your app is a single HTML file you (and your clients) manipulate directly. Edit the file through its visual UI and it persists its own state.\n\nWhat if web apps were as simple to edit as documents? Hyperclay makes it possible: UI, logic, and data live in one self-modifying HTML file. Edit it live. Share it instantly. Download and use it locally.\n\n---via [[Single-file HTML apps | Hyperclay|https://hyperclay.com/]]", "tags": "SelfHost Html TiddlyWiki Spa NodeJs", "type": "text/vnd.tiddlywiki", "created": "20250818000000000", "modified": "20250818000000000" }]

Re: Web apps in a single, portable, self-updating, vanilla HTML file

#213
post #196

Earlier quoted context omitted.

It technically doesn't say "self-contained", but it does say "portable" and "self-updating", which I must agree is misleading.

If you want something actually self contained play with this https://startr.style/modernism/

That was cool! Thanks for sharing.

Re: Web apps in a single, portable, self-updating, vanilla HTML file

#214
post #208

Earlier quoted context omitted.

Turns out, the original TiddlyWiki used a java jar to handle the file persistence. (I remember it being so magically automatic, but recently investigated how it was done)

I don't think that's right - IIRC it used to be possible to write out a file, if loaded from a file:// URL, directly from JavaScript. Then that ability got nobbled because security (justifiable) without properly thinking through a good alternative (not justifiable). I mourn the loss of the ability, TiddlyWiki was in a class of its own and there should have been many more systems inspired by its design. Alas. ETA: Wik…

I used TiddlyWiki a lot to manage my D&D 3.5 campaign back in the day. As I recall, it originally was a true stand-alone HTML document capable of overwriting itself, but once browsers dropped support for this capability, users had to begin using various workarounds, and this remains the status quo today.

TiddlySaver.jar was one such workaround. A check in the Wayback Machine suggests that it was originally required only for Safari, Opera, and Chrome; IE and Firefox needed no such plugin. Nowadays, there are several workarounds, and setting up one is a mandatory installation step: standalone applications, browser extensions, servers, etc. Some are clunky (e.g. you have to keep your wiki in your Downloads directory or the browser can't write to it), and either way, TiddlyWiki is no longer truly a single stand-alone HTML file, at least not for writing purposes. It's still a very versatile tool, though.

Re: Web apps in a single, portable, self-updating, vanilla HTML file

#215
post #185

Earlier quoted context omitted.

Tiddlywiki has two modes of running. In one, you simply save the file as HTML and all your content is saved inside the file. The other mode is with a nodejs server (it's what I'm using). This allows me to access the wiki from all devices.

I see, so you make edits, the Javascript edits the html, therefore File -> Save Page will download an html file with your changes in it that you can open again. I forget that File -> Save is even a thing for websites.

Note: The TiddlyWiki documentation explicitly advises that File -> Save Page does not work.

You have to click a save button in the app, and it will generate a valid copy. However, most users deploy some plugin or software which allows transparent auto-saving.

Re: Web apps in a single, portable, self-updating, vanilla HTML file

#218
I'm a noob web dev and I do not understand what is the value here. If I had a html page and I needed to update things on it couldnt I use JS script blocks? If this is going to use a nodejs server and frontend JS library is it really making anything easier?

Re: Web apps in a single, portable, self-updating, vanilla HTML file

#219
post #170
post #35

For people who are confused: Hyperclay is a NodeJS server and frontend JS library that allows HTML pages to update their DOM and then replace their own .html source with the updated version. Imagine clicking a checkbox, which adds the `checked` attribute to its element, then using Hyperclay to globally persist this version of `document.body.outerHTML`, so that it's there next time someone visits the page. There's aut…

I'm still confused - if it requires a NodeJS server, then it wouldn't be a fully self-contained HTML file would it?

You probably wouldn't fault another piece of software for calling itself single-file even if it requires an operating system to run. It makes more sense to look at from a (build-)artifact POV - ignoring the foundations the artifact rests on if they're not specific to it.

Re: Web apps in a single, portable, self-updating, vanilla HTML file

#220
post #196

Earlier quoted context omitted.

It technically doesn't say "self-contained", but it does say "portable" and "self-updating", which I must agree is misleading.

If you want something actually self contained play with this https://startr.style/modernism/

This thing comes across so pretentiously, but they have some really novel CSS ideas I might try. The idea of making selector based on [style*="--bgc:"] and using that to set background color like style="--bgc: red" is not something that I would have thought of.
Post reply on HN