Rebrand to KuentaGYM, and start a new profile in pounds and Spanish

The app is now KuentaGYM everywhere a user can see it, and a fresh profile no
longer starts on upstream's English/kg defaults. Both are this fork's decisions,
so both are pinned by tests rather than left to a find-and-replace.

Rename (1,270 references, 149 files)

- Visible surfaces: the Login/Home/mobile-onboarding wordmark, the Settings
  version line, the printed plan, the PWA title + manifest, and the 17 branded
  strings across all 14 locale packs.
- Infrastructure: repo links, the container images and the release endpoints now
  name git.dploy.lol/dsantillan/kuentagym; .gitea/workflows/docker-publish.yml
  publishes to this forge's registry instead of gitea.com.
- The Android/iOS application id stays ch.duartesantos.opengym on purpose:
  changing it would make the mobile app a different app that could never update
  an installed copy.

Three things the mechanical pass would have broken, fixed here

- The update check asked gitlab.com for upstream's releases and would have
  installed upstream's APK, putting the old name back on the phone. It now reads
  this fork's Gitea releases API (the assets shape differs), with the tests
  rewritten to the payload Gitea actually returns.
- Renaming the mobile state/pairing files (opengym-state.json,
  opengym-remote.json) would lose the on-device copy of a history whose WebView
  storage may have been evicted, and silently unpair the device. Both are read
  under their old names and written forward under the new ones.
- Renaming the exported plan-file marker (openGym_plan) rejected every plan
  shared before the rename as "not a plan file". Both markers are accepted.

Defaults: pounds and Spanish

- DEF.unit = 'lb', DEF.lang = 'es', plus every fallback that independently
  assumed en/kg (the <html lang> attribute, the Settings pickers, the Store, the
  MCP, the Coach payload).
- Server-generated push copy existed only in English and pt-BR, so a Spanish
  profile would have been notified in English; Spanish added.
- The demo seed states unit: 'kg' — its seeded numbers are kilograms, and
  inheriting the new default would have introduced an 82.4 lb lifter benching 60.
- The module-level language in i18n-core stays English: it is the only language
  whose strings need no pack, so `t()`, dates, numbers and lists agree before a
  pack loads. Starting there on 'es' formats a Spanish-shaped UI with English
  strings.

Also
- api/package.json's test glob missed push-messages.test.js and
  verify-error.test.js, which sat beside the modules they cover and never ran.
- README, docs/, website/ and the issue templates no longer describe upstream's
  GitLab/GitHub pipeline, Discord, sponsorship or public demo as if they were
  this fork's; upstream history and attribution are preserved (NOTICE.md).
This commit is contained in:
dsantillan committed 2026-09-21 14:29:54 -04:00
1 parent f91cde15a1
commit 87bfd6d4c4
152 files changed
+1784 -1604

No files matched your search

+31 -48
View File
@@ -1,6 +1,6 @@
# Building the mobile app (iOS / Android)
openGym ships in two flavors from the same codebase:
KuentaGYM ships in two flavors from the same codebase:
| | **Self-hosted** (this repo's default) | **Mobile app** (`VITE_MOBILE=1`) |
|---|---|---|
@@ -11,7 +11,7 @@ openGym ships in two flavors from the same codebase:
| Exercise media | served by your server (`img/`, `gif/`) | loaded from the jsDelivr CDN |
The mobile flavor never talks to a backend by default: no sign-in screen, no sync, no
telemetry. State is mirrored from `localStorage` into `opengym-state.json` in the app's
telemetry. State is mirrored from `localStorage` into `kuentagym-state.json` in the app's
private data directory on every change (iOS is allowed to evict WebView storage under
pressure — the file mirror is the durable copy and is restored on launch). Backups go out
through the OS share sheet instead of a browser download.
@@ -19,7 +19,7 @@ through the OS share sheet instead of a browser download.
### Connecting the app to your own server
On first launch the app asks how you want to use it. Alongside the fully local mode above,
you can instead **connect it to a self-hosted openGym server** — your data then lives there,
you can instead **connect it to a self-hosted KuentaGYM server** — your data then lives there,
synced the same way the browser PWA does, instead of only on the phone. This is a mode of the
same app, not a different build or download.
@@ -46,7 +46,7 @@ or Settings → **"Connect to my server"** later) to finish. Notes:
- **Android:** Android Studio (bundles the SDK). Java 21 for Gradle.
- **iOS:** a Mac with Xcode 15+ and CocoaPods (`brew install cocoapods`). A free Apple ID
is enough to run the app on your own iPhone (see below); paid membership is only needed
for App Store distribution, which openGym doesn't do.
for App Store distribution, which KuentaGYM doesn't do.
## Build & run
@@ -80,35 +80,20 @@ npx @capacitor/assets generate --iconBackgroundColor '#0c0e12' --splashBackgroun
## Distribution — deliberately no app stores
openGym's mobile app is not on the Play Store or App Store, and that's a choice: no store
KuentaGYM's mobile app is not on the Play Store or App Store, and that's a choice: no store
accounts, no store rules, no yearly fees between you and an open-source app.
### Android — sideload the APK
### Android — build and sideload the APK yourself
The official signed APK is in four places, all the same file:
**This fork publishes no APK.** There is no download page, no package in a registry and no release
asset to point at, and no CI job that builds one: the `build:apk` job upstream uses lives in the
dormant `.gitlab-ci.yml`, which no host runs for this fork. The in-app update check reads this
repository's releases on Gitea and will find nothing until a release carries a signed APK and its
`.sha256` (see *Release notes for maintainers* below). Until then the APK you run is the one you
build and sign yourself, with your own key.
- **[opengym.duarte-santos.ch](https://opengym.duarte-santos.ch)** — the download page.
- **[GitLab's package registry](https://gitlab.com/DuarteSantos8/opengym/-/packages)** — every
build under `opengym-android/<version>/`, with a `.sha256` beside it. Direct link, no login:
`https://gitlab.com/api/v4/projects/85678327/packages/generic/opengym-android/<version>/openGym-<version>.apk`
- **[The GitHub release](https://github.com/DuarteSantos8/openGym/releases)** for that version,
with the APK and its `.sha256` attached as release assets.
- **[The GitLab release](https://gitlab.com/DuarteSantos8/opengym/-/releases)** on the mirror,
where the file is built; it links to the package registry above.
Android asks you to allow installs from the browser the first time — that's standard for any
app outside the Play Store. Check the `.sha256` if you got the file from anywhere else.
Both come out of CI: the `build:apk` job in [`.gitlab-ci.yml`](../.gitlab-ci.yml) runs
`npm run build:mobile` and `./gradlew assembleRelease`, then `zipalign`s and signs the result
with the release key. The job runs on every push to `main` too, so the newest unreleased
build is always one click away (signed with the same key, installs over a release):
`https://gitlab.com/DuarteSantos8/opengym/-/jobs/artifacts/main/browse?job=build:apk`
— a 30-day job artifact, not a package, and not what the in-app updater offers. The key lives in *protected* CI variables (`ANDROID_KEYSTORE_B64`,
`ANDROID_KEYSTORE_PASSWORD`, `ANDROID_KEY_ALIAS`), so it only exists on `main` and on `v*`
tags — a merge request from a fork can build an APK, but gets an unsigned one and never sees
the key. On a `v*` tag the signed APK is also pushed to the generic package registry, which is
what the release links to.
Android asks you to allow installs from the browser the first time — standard for any app outside the
Play Store, and no different for a build you made yourself.
To build and sign your own:
@@ -118,11 +103,11 @@ cd android && ./gradlew assembleRelease # → app/build/outputs/apk/r
# one-time: create a keystore. KEEP IT — updates must be signed with the same key,
# or Android refuses to install the new version over the old one.
keytool -genkeypair -keystore my.keystore -alias opengym -keyalg RSA -validity 10950
keytool -genkeypair -keystore my.keystore -alias kuentagym -keyalg RSA -validity 10950
# align + sign (zipalign/apksigner ship with the Android SDK build-tools)
zipalign -f -p 4 app-release-unsigned.apk aligned.apk
apksigner sign --ks my.keystore --ks-key-alias opengym --out openGym.apk aligned.apk
apksigner sign --ks my.keystore --ks-key-alias kuentagym --out KuentaGYM.apk aligned.apk
```
### iPhone — what's actually possible
@@ -136,28 +121,26 @@ that would simply install. Your free options:
onto your own iPhone. Apple expires the signature after 7 days; re-run from Xcode to renew.
- **AltStore:** automates that 7-day re-signing over Wi-Fi via a Mac companion app.
There is a `build:ios` job in [`.gitlab-ci.yml`](../.gitlab-ci.yml) for exactly that path: the
same mobile bundle, `xcodebuild archive` without a signing identity, and an *unsigned* `.ipa`
(plus `.sha256`) as job artifact — on a tag also under `opengym-ios/<version>/` in the package
registry — for AltStore/Sideloadly users to sign with their own Apple ID. It needs a Mac: Xcode
does not run on the Linux project runner, and gitlab.com's hosted macOS runners are not on the
free tier. To switch it on, register a Mac as a project runner (shell executor; Xcode, CocoaPods
and Node installed; give it a tag such as `macos`) and set the CI/CD variable `IOS_RUNNER_TAG`
to that tag — the job then appears in every `main` and tag pipeline. Until that variable exists
the job is not part of any pipeline, and it has not run yet, so expect a first round of fixes.
A signed build (TestFlight, App Store) would additionally need an Apple Developer Program
membership, the distribution certificate and profile as protected file variables, and an
`-exportArchive` step — none of that is set up.
Upstream's pipeline has a `build:ios` job for exactly that path — the same mobile bundle,
`xcodebuild archive` without a signing identity, and an *unsigned* `.ipa` (plus `.sha256`) for
AltStore/Sideloadly users to sign with their own Apple ID. It needs a Mac, and it lives in the
dormant `.gitlab-ci.yml`: no host runs it for this fork, so there is no `.ipa` job, no runner to
register and no `IOS_RUNNER_TAG` variable to set. An unsigned `.ipa` is a manual `xcodebuild` run on
a Mac and nothing more; nobody here does it for you. A signed build (TestFlight, App Store) would
additionally need an Apple Developer Program membership, the distribution certificate and profile,
and an `-exportArchive` step — none of that is set up.
### Release notes for maintainers
- Bump `versionName`/`versionCode` in `android/app/build.gradle` per release; keep them in
step with `frontend/package.json`. `versionCode` must strictly increase or updates won't
install over an existing APK. The APK is *named* from `frontend/package.json` (the CI job
reads `version` out of it), so the two drifting apart shows up as a misnamed file.
- Tagging `vX.Y.Z` is what ships everything: images, APK, release notes. Don't push a version
tag you don't mean to release — `v*` tags are protected for that reason.
- **License:** openGym is AGPL-3.0, which by itself sits badly with app-store terms of
install over an existing APK. Upstream names the APK from `frontend/package.json`; your own
build is named whatever you pass to `apksigner`.
- A push to `main` and a **published Gitea release** are what build and push the two container
images (`.gitea/workflows/docker-publish.yml`). Nothing packages an APK or writes release notes
for you: if you publish a release, attach the signed APK and its `.sha256` by hand — that asset
is also what the Android build's in-app update check looks for.
- **License:** KuentaGYM is AGPL-3.0, which by itself sits badly with app-store terms of
service. `NOTICE.md` carries an app-store exception (an additional permission under
AGPL §7) granted by the copyright holder — relevant only if store distribution ever happens.
- The app requests notification permission only when the workout-day reminder is switched