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

hyperclay.com

630 points by pil0u 3 days ago


BoppreH - 3 days ago

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 automatic versioning and read/write permissioning.

It's a pretty cool project! I'll definitely try for my own personal tools.

Do note that, from my understanding, it's most useful when there's one developer who is also the only content editor. Otherwise you'll have editors overwriting each other's changes, and if there are multiple copies there's no easy for the developer to push a change to all copies.

bflesch - 3 days ago

I appreciate the storytelling and the nice graphics, but after reading 10 screen lengths of this story I still don't understand what technology they are using to achieve this.

Is it a lot of words to talk about localstorage? How exactly are the changes persisted to the HTML file? Is it using FileSystemAPI to overwrite the previous HTML file? How can they implement it seamless for the user without them having to choose the proper file in the "Save As.." dialog?

pavlov - 3 days ago

This is coming close to WWW's original vision because the very first web browser was also an editor. Tim Berners-Lee's application on the NeXT was basically a wrapper for the operating system's built-in rich text editing class named TextView. (It later became NSTextView on Apple's Mac OS X and still powers the TextEdit app on Mac.)

We lost editing for two reasons:

1) The HTTP PUT method didn't exist yet, so edited HTML files could only be saved locally.

2) Mosaic built a cross-platform web browser that defined what the WWW was for 99% of users, and they didn't include editing because that would have been too complex to build from scratch in their multi-platform code base.

codedokode - 3 days ago

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 understand that there is a risk if we allow local HTML files to access anything, but there should be some way - for example, a file or directory might have some suffix that allows access to it.

I do not want to use a web-server because it feels like overengineering and I don't want to open a terminal, navigate to a directory and start a server every time, it takes too much time. I just want to type the URL and have my app running.

mcteamster - 3 days ago

Been doing something similar with save files for my game. Line 1 is "<!DOCTYPE html><html><head><script>const rawData =" and line 2 is all the state.

Then the save button downloads document.documentElement.outerHTML with line 2 replaced by the current state. No server required.

https://github.com/mcteamster/white/blob/main/src/lib/data.t...

zbentley - 3 days ago

TiddlyWiki is another (20+ year old and still being updated!) took in this space. It looks like hyperclay is a bit more oriented towards multitenancy and database-backed persistence than TiddlyWiki (very much trying to be a single-writing-user tool) after a quick read?

https://en.m.wikipedia.org/wiki/TiddlyWiki

clemensnk - 3 days ago

This is really neat! It echoes many of the ideas we've been exploring with the Webstrates project (https://webstrates.net). We've been using the DOM as persistence layer for building malleable collaborative software for smaller groups, whereas hyperclay focuses on using the same mechanisms for traditional webpages. Recently, I have been experimenting with a local-first approach to Webstrates (https://github.com/Webstrates/MyWebstrates). Might be interesting to explore if a Webworker-based approach like in MyWebstrates could be used for offline editing in hyperclay.

heikkilevanto - 3 days ago

Interesting idea. Well put it on the list of things I should try some day.

After a quick look at the site, I like the idea. But I wonder where it's limitations start to get in the way.

How about security, if I can modify the page, who else can? And who controls that?

How much code and logic does it handle before getting difficult to maintain? And how much data?

If I make an useful app with it, say to track beers, can I share the app with other people without so they can track their own beers, without sharing my personal data?

pjmlp - 3 days ago

Someone rediscoved Windows 98 HTA archives.

https://en.wikipedia.org/wiki/HTML_Application

Tepix - 3 days ago

Looks like it's on Github at https://github.com/panphora/hyperclay-local

Sammi - 3 days ago

To take this concept one step further towards perfection, you would want to lose the backend completely and persist directly to a git repo using https://isomorphic-git.org/

nashashmi - 3 days ago

I am trying to figure this out. The writer despairingly says a backend is needed to store changes in state. The writer calls this backend DB and API. The writer then substitutes DB and API with "server" like it is a solution

So now we have a webapp. The webapp connects to a backend. The webapp stores changes in the backend. The webapp loads changes in the backend.

The original problem still persists?! State can be stored in browser with localstorage. Or in device with file access. That is about it. Across devices, you need online storage and access key.

I feel like this was a writeup on the problem with vanilla HTML app development.

Also, can we all agree that calling a webpage an app is an afront to all webpages? We should have two categories: webpages and webapps. A web page can contain a webapp. A web app is anything where the content changes and where it connects to a backend to store or load data. So interactive html stuff is not a webapp, but JS literally changing the data makes it a webapp, even a simple HTML page with a JS clock makes that portion of the page a webapp.

swiftcoder - 3 days ago

Very nice concept!

I've been thinking for a while that the web really suffers from not having a built-in concept of (ideally fairly anonymous) identity. I shouldn't need to maintain a whole authentication system and a database full of PII just to let you see the same data across your laptop and your phone...

netbioserror - 3 days ago

I've built some single-file HTML page tools at work that use newer Web APIs (WebSerial, WebUSB) and essentially utilize the browser as a cross-platform application virtual machine, which is a great way to think about browsers. With WASM compilation, Canvas, and WebSockets, combined with this self-modifying concept where an HTML file is a contained, stateful application that can persist, we've got very interesting possibilities for the future of user-facing applications, both local and fetched remotely. This is probably exactly what some of the visionaries at Google were thinking of when they concepted the Chromebook and Chrome OS.

maelito - 3 days ago

Am I the only one that does not understand what the author wants to explain ?

Do we need a story with illustration to understand how a new framework works ? What's the plain markdown 2 to 3 paragraph that explains the concept ?

Edit : here it is. https://docs.hyperclay.com/docs/docs-tldr-paste-in-llm/#how-...

> Whenever the page changes—or the user explicitly saves the page—we grab all the HTML, make a few modifications, and then POST it to the backend’s “save” endpoint.

Wait, so instead of storing JSON we store HTML with all its verbosity and all its tags that have nothing to do with the user edit (e.g. a small profile description change) ? What about if the webmaster then wants to change the HTML title of the profile description block ? The user's version just diverged from the webmaster's ?

phantomathkg - 3 days ago

At first I thought it is tiddlywiki but it is not.

dogemurder - 3 days ago

I really like this. If you ever plan an AMI with this, deploying hyperclay on maybe a t3 instance, installing Node.js via the package manager (https://docs.aws.amazon.com/sdk-for-javascript/v3/developer-...), and then setting up the Hyperclay server using npm to handle requests, I think a lot of startups could be users. Would it be fair to say that Hyperclay could offer a lean way to rapidly prototype and iterate on MVPs, like landing pages, dashboards, or user-feedback-driven tools, where frontend changes (e.g., A/B testing UI elements) automatically update the underlying HTML source for instant deployment??

If it was marketed to startups to reduce development overhead by eliminating separate build pipelines or servers, allowing small teams to focus on core features rather than infrastructure, definite winner. Not sure how much your into AWS but this made me think of an AWS partner we use HostJane could use Hyperclay to help bundle cost-optimized spot instances for testing (mainly tech startup clients - https://www.hostjane.com), then push out a seamless CI/CD via CodePipeline, global distribution through CloudFront, Hyperclay could enable clients to scale from proof-of-concept to production affordably while maintaining full control over their app's evolution without vendor lock-in. Potentially doing away with complex databases or backend frameworks... amazing, well done!

calebm - 3 days ago

I wrote a simple file encryption app some years ago that is a single self-contained HTML file. When you use it to encrypt files, it outputs another self-contained HTML file with a copy of the encrypted data inside, along with the code to decrypt it (if the correct password is specified): https://hypervault.github.io/

shlomo_z - 3 days ago

What happens if the user has an extension in his browser that modifies a page or adds JS to it? Will it get added to upstream?

Ezhik - 3 days ago

I really want to see more HyperCard-style data persistence, where both the code and the data are one one document, so this is cool to see.

I was actually just playing with a similar concept, except as an Obsidian plugin: https://bsky.app/profile/ezhik.jp/post/3lwoazfypx22j

muspimerol - 3 days ago

How does versioning work? After you fork an HTML app, is there a way to update it and get newer features without manual intervention?

I'm thinking about the Kanban board example I saw in the demo video. It looks like column re-ordering wasn't supported yet. What if I fork the app, put time into creating my Kanban, then I want to update to a new version that supports column re-ordering?

udev4096 - 3 days ago

It's even easier with Go + templ. You can compile a whole site into a single executable file, in the range of 20-30MB. Use sqlite with it and you've built yourself a portable and dynamic site capable of running almost anywhere in an instant. Use nginx load-balancing with a central sqlite if you need to scale

rebeling - 3 days ago

Hyperclay is really cool. I love the idea of making edits persist right in the DOM. I hacked on something in a similar spirit called Dominique https://rebeling.github.io/dominique/?edit=1 no backend/frontend separation, just “one-end.” It’s more about playful editing with AI support (click anywhere and change text/structure instantly), whereas Hyperclay goes deeper with persistence and versioning. Fun to see, thanks for sharing!

rasengan0 - 2 days ago

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" }]

dirkc - 3 days ago

Initiatives like this that makes creating web pages more direct are great!

I've done something similar using IPFS for persistence [1]. The format is different - it's a tutorial starting out with the dev tools that guides you to build an editor + site.

I wish that IPFS was more usable and mature as a general web technology! I've considered trying this with Git as the backend, but I haven't done much research into what the tradeoffs or complications would be?

[1] - https://www.thebacklog.net/projects/agregore-web-apps/

ForHackernews - 3 days ago

> The coolest part? It's just an HTML file. Nothing special. Change it, it serializes its DOM, and sends it to a /save endpoint. Nothing magic about it.

*The tech: Hyperclay is a NodeJS server and frontend JS library*

So... it's not just an HTML file.

baobabKoodaa - 3 days ago

I tried one of the demos and it didn't work; my changes were not persisted when I refreshed the page. I don't know how it's supposed to work, exactly, but a single self-contained HTML isn't it.

brumar - 3 days ago

Very good. I was wondering why nobody did something like that before. At least this was my conclusion from my google searches few months ago. From a design perspective, I don't like storing state in the DOM itself, I would have find much more flexible to have the state in a json as a single source of truth and use reactive patterns such as state change => ui change and not hiting the DOM directly. That sounds like big framework things, but it saved me from acute headaches in a personal similar framework I did for self-contained apps. It was not HTML but I thought I would apply the same logic if I had to do it for html apps too.

daitangio - 3 days ago

Nice… keep in mind there are already very mature tools like https://tiddlywiki.com/ which supports a plugin architecture.

est - 3 days ago

I spent a weekend making a self-host twitter alternative.

source: https://github.com/est/gitweets/

demo: https://f.est.im/ (renders via github API)

Basically it renders its self git repo commit history as a feed timeline.

Never lose your data on microblogging service providers again! Clone the repo anywhere anytime, make tweets by "git commit --allow-empty".

Everything is placed inside a single-html.

tempfile - 3 days ago

I am not sure how this proposal deals with the problem of templating. If you have a bunch of documents (say, blog articles) that should have a consistent layout, you are going to want to create a template for them. But then the document you see isn't the "true" document, and in order to save the content you're going to have to annotate it to "reverse" the templating.

If it does this, then it is very exciting indeed, but I could not see it.

drewchew - 2 days ago

This looks super cool and I'm hyped to try it. Reminds me of Decker https://www.beyondloom.com/decker/index.html which I saw on hacker news ~18 months ago, similar ethos but this seems like it will be more applicable to daily use cases.

dr_kiszonka - 3 days ago

Slightly tangential: a lot of my vibe coding experiments are standalone SPAs because I can't be bothered to set up a secure server (and I am too cheap to pay for it). I love that I can open my "mobile-first" apps directly from my phone's Downloads folder.

I have a feeling that a lot of these little tools people make with low-code vibe AI apps do not require more than a single HTML page with JS imports.

(I also suspect that there is a ton of duplication in what people create, but, of course, I have no data to back it up.)

fowlie - 3 days ago

This is just awesome! But seems like a closed source project, and the pricing page returns HTTP 404.

Are there any open source alternatives like this? First time I hear about this idea. However, I can imagine it wouldn't take much effort to implement the basics. Chromium even has a design mode you can activate by typing `document.designMode='on'` in the console. Then you would just need to write a little javascript that handles auth, a save button, and a backend to persist the altered html.

dazhbog - 3 days ago

Here's a video of the creator explaining more

https://www.youtube.com/watch?v=OUiTBFDxwaM

thunderbong - 3 days ago

Very interesting.

Pricing page returns a 404 as of now, though.

https://www.hyperclay.com/pricing

Spooky_Fusion1 - 2 days ago

Checked out "Hyperclay" which seems to leverage DOM (Digital Object Model) via a virtual DOM. This is cool, but could do with some "Shopify" legalise. My Hacker News "profile", gives some indication of why I think this is cool but needs a legal makeover.

janfoeh - 3 days ago

This is a nice idea; I am just not keen on having to host a nodejs server.

Now I am wondering whether the same thing could be achieved with just nginx & WebDAV?

AuthAuth - 2 days ago

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?

pmarreck - 3 days ago

I too have an odd obsession with keeping everything in 1 file.

I recently (as an experiment) exclusively vibe-coded an Asteroids clone (with a couple of nifty additions), all in a single HTML file, including a unit test suite, which also works on either desktop or mobile: https://github.com/pmarreck/vibesteroids/blob/yolo/docs/inde...

Playable version (deployed via github docs) is here: https://pmarreck.github.io/vibesteroids/ Hit Esc to pause and see instructions (pause should be automatic on mobile; can re-pause by tapping top center area).

Type shift-B (or shake mobile device... you also would have had to approve its ability to sense that on iOS) to activate the "secret" ability (1 per life)

No enemy UFO's to shoot (yet) but the pace does quicken on each level which feels fun.

It doesn't update itself, however... (and I just noticed it has a test fail, and a test rendering bug... LOL, well at least the tests are valid!)

mootoday - 3 days ago

Full disclaimer: I only scanned the article, but based on the title, SvelteKit does that with a single option "inline".

https://svelte.dev/docs/kit/configuration#output

KoolKat23 - 3 days ago

This is great and all (I've been making my own standalone web app htmls), but one issue I've found when sharing with others is iOS (iPhone/iPads) don't support them. Apple ugh.

Any suggestions how to overcome this? I believe it's a security setting, not allowing localstorage to be set.

turnsout - 3 days ago

> 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.

davidcollantes - 3 days ago

Hitting "Request Access" on https://hyperclay.com/request-early-access with an empty field (no email provided) renders "Subscribed!".

criswell - 3 days ago

This is a really cool idea. The use of custom attributes without `data-` before it makes me a little nervous. Is that a concern here? I saw `project` being used on elements and if that's officially used for something eventually can it muddy things up?

mettamage - 3 days ago

The title reminds me of TiddlyWiki.

VagabundoP - 3 days ago

Reading that website was quite enjoyable. Simple scrolling and loved the look.

sydbarrett74 - 3 days ago

I'm getting a 404 for most of the pages. Not confidence inspiring.

keepamovin - 3 days ago

Great name, cool idea and this guy communicates well. Inspiring to see!

tommica - 3 days ago

Very interesting concept.

I've imagined our internal claim cases to be standalone html pages, making them easily versioned for when new regulations come.

Simplicity is a good goal to have, and these guys have it.

meistertigran - 3 days ago

This is really cool. About to try it out!

I build something along those lines as well. My problem was that I couldn't synchronize localStorage data, so I made htmlsync.io.

curtisblaine - 3 days ago

So:

1) it says it’s a vanilla HTML file but it needs a server running

2) it’s just a landing page that collects your email to give you “early access”.

I really wonder what this is doing on the home page.

jerryjappinen - 3 days ago

This seems cool but the web site is not doing it any favors. I thought it's a joke but apparently it's a serious project?

MASNeo - 3 days ago

I have already moved most MVP to single file apps. This gives my intuition much more tools. Thanks for building this!

drykiss - 3 days ago

Is this a closed source project? I don't want to give my email address to get a chance to even try it.

jomoho - 3 days ago

This reminds me of a self contained svg editor running in the browser , that I wrote a few years ago.

4b11b4 - 3 days ago

The drag and drop on you personal dev blog seems very broken, or I'm an idiot

pkilgore - 3 days ago

So you need a server for this to work and that server is closed source?

rbbydotdev - 3 days ago

I really like this idea, I envision something where this would be made possible on browsers now. This could only happen after further consideration about the security implications of localhost html files using secure context apis like indexeddb and localstorage The powers that be would rather turn this concept into a mArKetPlaCe -- Just let us create! Why must we always kneel before the altar of capitalism?

I experimented a bit with the concept to build my resume, I had naively been using gatsby a while back. "Just use a plain html file!" - It was a real "duh!" moment. You just edit the embedded markdown then viola. Want a pdf? Press cmd+P

https://github.com/rbbydotdev/resume

conartist6 - 3 days ago

How did it do safe version control efficiently?

DonnyV - 3 days ago

Looks like your Kanban demo app is broken.

wmertens - 3 days ago

this falls down really quickly once you get past a couple MB worth of data, like trying to add images.

endergen - 3 days ago

I for one, like the fun you had on the page. Ignore the haters. Only critique would be you should just explain how it works near the top. I think most devs myself included want to first understand what it is before the why it’s awesome.

ps. Way back there was a project called tiddlywiki that was a self modifying html file and was pretty popular. I think initially there was no way to save new version but to basically save the file to disk to either fork a file or replace itself.

RS-232 - 2 days ago

So we’re back to PDF?

hammerbrostime - 3 days ago

... I would like to up the anty and have web apps work in a portable vanilla HTML file WITHOUT needing a webserver to run it. E.g., double click and run. CORS be damned!

Webservers are a pain in the ass and a legitimate barrier to entry. Wouldn't it be great it you could literally send around a single file, especially to non-technical users who cant run a web server, to run your apps?

- 3 days ago
[deleted]
sylware - 3 days ago

But depends on the whatng cartel web engines... Nothing to be proud of, mate.

rfarley04 - 3 days ago

Somebody's been reading The Oatmeal recently

(but seriously, very cool)

coneonthefloor - 3 days ago

Wait until they find out about PHP. Mind blown.

tonyhart7 - 3 days ago

no open source???? meh

evrennetwork - 3 days ago

[dead]

silicon5 - 3 days ago

[dead]

pinoy420 - 3 days ago

[dead]

alxgsv - 3 days ago

[dead]

visarga - 3 days ago

If you use Claude to generate apps in the artifact they are very similar - self contained and easy to create and share.

rokob - 3 days ago

Every time I see projects like this what I hear is: “I hate JavaScript, just use html and web standards (oh and a bunch of JavaScript but I hate JavaScript so let’s not talk about it much).”

cetinsert - 3 days ago

I would love to have people try building these on https://RTCode.io

The playground has lots of unique features, CLI agent integration for AI to let you collaborate with Claude Code or Codex CLI, etc. You can deploy straight to https://RTEdge.net

The playground has HTML I ↔ O iframe with mostly reload-free 2-way IO sync, built-in service/edge workers with URL imports of ESM, and a whole lot more. You can see some examples under Code > New…

Here is a recent one for accessible multi-OS keyboard shortcuts: https://kbd.rt.ht/?io