I love the idea of this type of app, but feel like local storage is too fragile to be the system of record. Any way to backup to disk or cloud storage?
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.
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.
This made me think - is there a simple way to sync localStorage with my Firefox profile? If not, it doesn't sound like a WebExtension too difficult to create.
I actually implemented an export/restore function at one point and ended up taking it out.
I waffled heavily on that feature but in the end only losing the last recorded weight for each exercise didn’t feel like enough of a loss to warrant the cluttering up of the interface or reliance on external services.
As you kinda note in the readme, that does mean that you can't migrate between browsers/machines, though since it can only save a week of data that's less impactful. Not my style, but the design decisions do work together.
Comments
I love the idea of this type of app, but feel like local storage is too fragile to be the system of record. Any way to backup to disk or cloud storage?
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.
This made me think - is there a simple way to sync localStorage with my Firefox profile? If not, it doesn't sound like a WebExtension too difficult to create.
In case someone is interested, I started working on it here: https://github.com/bjesus/notsolocalstorage/
I actually implemented an export/restore function at one point and ended up taking it out.
I waffled heavily on that feature but in the end only losing the last recorded weight for each exercise didn’t feel like enough of a loss to warrant the cluttering up of the interface or reliance on external services.
As you kinda note in the readme, that does mean that you can't migrate between browsers/machines, though since it can only save a week of data that's less impactful. Not my style, but the design decisions do work together.