Hacker Newsnew | past | comments | ask | show | jobs | submit | meistertigran's commentslogin

I was also heavy on these single-file HTML tools. My problem was not being able to sync the localstorage data between PC and smartphone. I made a paid service which did that automatically. It didn't take off unfortunately, and I am keeping it on maintenance mode because it has some amount of free users that rely on it.

For anyone interested, to achieve synchronization I basically just use the https://github.com/google/diff-match-patch lib and save the patches in a db for each version with a version id. Then there's a generic JS file that I inject to uploaded HTML files that monkey patches the localstorage methods and optimistically updates the localstorage at the same time sending the diff to the server to save to the db.


I wonder if you can hack a LocalStorage sync feature via ATProto PDS, since you can put arbitrary JSON records via /xrpc/com.atproto.repo.putRecord and not just Bluesky posts.

The only drawback I can think of is that all of your commits are broadcast on a megaphone to the network firehose, but encryption can alleviate that somewhat.


I am not familiar with it, but I was thinking about making an open source version of this, but using webRTC, to just directly allow peer-to-peer synchronization without a centralized server.

In this type of scenario there are a lot considerations to be made though, specifically since you can't use CRDT's to handle concurrent updates on the data you have to either 1) not allow offline use of the apps, 2) create a merge conflict resolving interface or 3) just overwrite all changes with the latest one.

Idk if people would be interested in this and I haven't been using my HTML tools for a while now, so it's just an idea, maybe someone else wants to work on.


> My problem was not being able to sync the localstorage data between PC and smartphone

That's what remoteStorage is for.

<https://remotestorage.org/>


I can't get that page to respond. Did you mean <https://remotestorage.io/>?

It's not about speed for me. Reading faster forces me to focus, while my mind wanders off when I read slowly.

I read fast and then stop to think about it.


What I took from this is that you have a really engaging writing style. Was interesting to read from start to finish.


I share your opinion about the quality of vibe coded apps. It's definitely not something you can pull off with 0 programming knowledge at this moment. I don't know how the quality of LLM written code will change in the future, but I do believe a lot of custom apps that basically just store and display data can already be easily one-shotted.

The more complex the app becomes, the harder it will be to maintain it with vibe coding. Personally I have chosen to just create specialed apps, that do one thing well, to avoid that complexity.


You don't get localStorage persistence though.


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.


You can do that with htmlsync.io


Thank you, I'll take a look.


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.


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


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.


Can you share the paper mentioned in the demo video?


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: