diff --git a/website/docs.html b/website/docs.html index 52448f4..3d41207 100644 --- a/website/docs.html +++ b/website/docs.html @@ -493,6 +493,25 @@ docker compose up -d # restart alone does NOT re-read .env ./data/vapid.json, and each browser reports its own timezone. Set VAPID_SUBJECT=mailto:you@example.com if you'd rather push services could reach an inbox than your origin URL.

+

Where it works: any desktop browser, Android Chrome, and on iOS only the app added to + the Home Screen (a Safari tab has no Web Push). The Android APK doesn't use Web Push — + its reminder is a local notification scheduled on the phone. A reminder that was due while + the server was down or restarting is still sent up to 15 minutes late, once; the browser + re-registers its subscription with the server on every signed-in start, so one the server + lost heals itself; and a rest-timer alert belongs to the device that started the rest, so + finishing a rest on the desktop no longer silences the phone.

+ +

Sync between devices

+

Signed in, the profile on the server is the truth. Signing in on a device adopts it + — settings, plan, history — and if that device logged workouts while signed out, one + dialog asks whether to add them to the profile or keep the profile as it is. While the + app is open it asks the server every 30 seconds (and every time it comes back to the + foreground) whether anything changed and fetches only what did, so a session logged on the + phone shows up on the desktop within half a minute. Two devices that both changed + something are merged on the server's revision — every workout, routine and weigh-in from + both sides is kept, settings follow the newer copy — instead of one overwriting the other. + Without a network the app keeps working on the device and says so under the header; the + changes go up when the connection is back.

Fitting it into an existing stack

The defaults assume openGym is alone: a service called api on port 3000, @@ -587,8 +606,9 @@ ALLOW_GUEST=0 # remove "Continue without account"

Worth knowing: the pairing exchanges the code for a bearer token that is the same signed value a session cookie carries — so "sign out everywhere" in the browser revokes paired apps too. Use an HTTPS address if at all possible (the token would otherwise - cross the network in plain text). A connected app needs network access while in use — - no offline mirror, same as the browser PWA. Settings → Disconnect syncs one last + cross the network in plain text). A connected app keeps working without a network on the + last copy it synced — it shows an "Offline" line under the header and pushes your changes + as soon as the connection is back, same as the browser PWA. Settings → Disconnect syncs one last time, then drops the device cleanly back to local mode. (For the curious: it's POST /api/pair/create + /api/pair/redeem in api/server.js.)