Skip to content

Comment on Show HN: Minimal, self-hosted exercise trackerparent

Comments

My application [0] I used daily for 13 years stores the data in localStorage and I had several unpleasant data loss incidents - mostly me cleaning storage of the wrong browser tab. Thankfully, a simple JSON dump/import feature enables a good enough degree of reliability. Thanks to it, I didn't lose any data in 5 years, but now I have a questionable habit where I defensively export data before every major edit or deployment.

Simple localStorage replication has been an interest of mine for many years and I explore available solutions multiple times a year, but none of these ticks all the boxes - no server to maintain; free; optional for users; bring your own storage; the app stays a web page; cross-browser. I wish browsers had a file system API that allowed the app to read/write to specified directory or a file in background, which users may sync with their tool of choice, like Google Drive.

[0] https://github.com/Klaster1/timer-5

It’s Chrome only but the file system access api lets you do this:

https://developer.chrome.com/docs/capabilities/web-apis/file...

Exactly! The number of subscription saas apps that could be replaced by open source if there was a bring your own storage API would be astounding. This might be exactly why browser makers will not add it.

Add your browser data directory to your backup folders list, and restore that folder in case of a localStorage loss, that should do it.

If that works for you - I am glad, however, this approach won't work across different browsers and OSes.

AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.