feat(persistence): add backend state persistence to /data/state.json for StartOS backups - #2
Conversation
…for StartOS backups - Implement GET /api/state and POST /api/state in production server (server/serve.cjs) to persist state to /data/state.json - Update Zustand store (src/store/miners.ts) with custom async storage adapter to sync state with backend - Ensure miner configuration and app preferences are included in StartOS volume backups
|
Merged into #1, which is the packaging audit branch — thanks, this is exactly the gap that audit turned up. Two things I fixed on the way in, worth knowing for next time:
The implementation itself looks right: One heads-up on rollout: this is application code baked into the container, and the manifest pins the currently published tag, which predates it. Verified against a live install — Also worth flagging for whenever this goes live: miner API passwords currently live only in the browser. Once state moves to Closing this one since the commits are carried in #1. |
|
One more thing, and it's a single job on your side. Right now this doesn't change anything for StartOS users yet. StartOS installs a prebuilt Blisspoint, and the one it installs today was built before your change — so there's still nowhere for it to save to. We checked it on a real server to be sure. What we need from you: make a new Blisspoint release with this included, then tell us it's out. That's the whole ask. Once it exists we'll:
Thanks for turning this around so quickly — it closes the one real gap the review turned up. |
Summary
GET /api/state,POST /api/state,DELETE /api/state) in production server (server/serve.cjs) to persist state to/data/state.json.src/store/miners.ts) with custom async storage adapter to sync state with backend.Backups.ofVolumes('main')).