Remix.run Logo
meistertigran 10 hours ago

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.

cxr 4 hours ago | parent | next [-]

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

That's what remoteStorage is for.

<https://remotestorage.org/>

aag 21 minutes ago | parent [-]

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

dansjots 8 hours ago | parent | prev [-]

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.