Live data from Hacker News

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

hyperclay.com

161–170 of 240 posts

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

#161

Earlier quoted context omitted.

To be completely honest, I don't see how this is more useful than adding a sync layer to localStorage. I did make a service that does that at htmlsync.io and am genuinely curious how this solution is better.

Just like with https://tiddlywiki.com/ Your notes are the HTML file! You can keep it in your documents folder, sync it via any service, track it in version control, etc. It’s for folks who know what the filesystem is, don’t know how to host a server (or don’t want to), but want a website-like experience. Works offline, too!

So like, Obsidian, but for HTML?

The file itself provides both the dynamic functionality and data storage, but you need an engine (like obsidian) to make the data persistence and dynamic parts work together. I.e. if there is a button that adds a task to a todo app, your engine modifies the HTML file with the new content.

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

#162
post #11

Earlier quoted context omitted.

You mean HTTP auth?

No, specifically not. I don't want to store your username and passwords in a database (and then deal with account recovery, password rotation, etc) - I want identity . The browser should be able to vend me an (opaque, anonymous) token that identifies you as an individual. If your mobile and desktop browser vend the same token, then the website sees you as having the same identity on both platforms.

Could you put a token in a http auth username? Leave the password blank?

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

#163

Earlier quoted context omitted.

To be completely honest, I don't see how this is more useful than adding a sync layer to localStorage. I did make a service that does that at htmlsync.io and am genuinely curious how this solution is better.

Just like with https://tiddlywiki.com/ Your notes are the HTML file! You can keep it in your documents folder, sync it via any service, track it in version control, etc. It’s for folks who know what the filesystem is, don’t know how to host a server (or don’t want to), but want a website-like experience. Works offline, too!

I finally also recalled this project (tiddlywiki), but CMIIW, the statefulness of the hyperclay is only for developers, the end user will get the same conventional html. Without some kind of common solution/protocol/standard on the browser side that would allow persistence it's not so exciting. Theoretically there might be some kind of simple protocol that would save html file versions on the server based on the cookie, but there are so many ways this can go wrong

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

#165
post #73

Earlier quoted context omitted.

I added this word-for-word to the home page. Thank you! Note: we are working on a way for a developer to push "DOM-based schema migrations" to all forked apps.

I'm flattered you liked my description so much! It's a really special project, thanks for sharing it.

I love this, I think this brings "block editing" capabilities to the masses, which is a big selling point for WordPress. In recent months, I've been looking at micro-sites and I concluded that Carrd is king for this type of landing pages/microsites. So this looks very promising for this respect. Either of you care to share or dispel security concerns or describe attack surface? For the past 6 months I've been looking at HUGO sites and the simplest deployment approach I found was alpine/sqlite/hugo containers at 5-10mb in size. Is there a way to delegate control/editing of sections/pages? I think the world needs a simple platform to build sites and delegates sections to respective departments/units. The only platform which seems solid for this is drupal, but it's kind of overkill for SMB orgs.

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

#166
post #122

Earlier quoted context omitted.

This is quite similar to what I was trying to explore with [1] & [2] yesterday. Currently, the only option I found is to use localStorage and give the user the option to manually export and import. Hyperclay has given me some ideas. What I want is something like [3] but that the user only needs to install once. One electron app that can load our mini-apps. [1] - https://news.ycombinator.com/item?id=44930814 [2] - htt…

I had the same problem, regarding localStorage synchronization. For that I made htmlsync.io, but only really worth it for people who have many local apps like that and really need the localStorage sync.

This is pretty cool! What kind of users are you targeting? Technical folks or those dipping their toes into dev with vibe coding?

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

#167

I would like web standards have better support for pages stored in a local file (opened using file:// protocol). Sometimes I write simple HTML/Vue based mini-apps for myself and every time something doesn't work and I need workarounds, for example: - local HTML file cannot import local JS modules, so I have to use legacy writing style - local HTML file cannot open other local files (for example, audio files) I unders…

I was annoyed too when they started to close off HTML as a local platform.

But! it is still very open (you complain about audio and javascript but they both work) also I've figured that it isn't really much of a problem to start a python/node webserver for the things I'm not allowed to do. Literally a fraction of a second. Just set up a "webserver_here" command in your terminal, or keep one running constantly. Also I'm starting to fear local HTML more and more, I'd actually be happier with a much stricter boundary.

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

#168
post #166

Earlier quoted context omitted.

I had the same problem, regarding localStorage synchronization. For that I made htmlsync.io, but only really worth it for people who have many local apps like that and really need the localStorage sync.

This is pretty cool! What kind of users are you targeting? Technical folks or those dipping their toes into dev with vibe coding?

Thanks! Pretty much, yes. Also if you are a dev and just don't want to spin up a server for every simple app you vibe code, you could find this useful.

To be honest, I wanted this for myself and felt guilty not making something more serious out of it since I liked the idea.

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

#169
> The first thing you should reach for is jQuery

And I'm out!

Honestly I was nodding along with the landing page. But including a dependency to an old timey JS library which is now largely unnecessary given new native web APIs? That seems contrary to the spirit of this project.

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

#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?
Post reply on HN