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

+32 -26
View File
@@ -1,15 +1,20 @@
# Contributing to openGym
# Contributing to KuentaGYM
Thanks for taking a look! openGym is intentionally small and dependency-light, and the goal is
Thanks for taking a look! KuentaGYM is intentionally small and dependency-light, and the goal is
to keep it that way — easy to read, easy to self-host.
This repository is a modified fork of [openGym](https://gitlab.com/DuarteSantos8/opengym) by
Duarte Santos, under the same AGPL v3.0 (see [NOTICE.md](NOTICE.md)). The canonical repository for
the fork — and the only place issues and pull requests are read — is its Gitea instance,
<https://git.dploy.lol/dsantillan/kuentagym>.
## Project layout
```
frontend/ React + Vite app (src/views, src/components, src/store, src/lib). Builds to static files.
android/ + ios/ are the Capacitor shells for the standalone mobile app (docs/MOBILE.md).
api/ backend — server.js (Node, no framework), one dependency (@simplewebauthn/server).
web/ multi-stage Dockerfile (builds frontend → nginx) + nginx.conf (serves app, proxies /api).
web/ multi-stage Dockerfile (builds frontend → nginx) + nginx.conf.template (serves app, proxies /api).
media/ exercise img/gif (gitignored, fetched at runtime).
docs/ self-hosting guide.
mcp/ optional Model Context Protocol server — read-only stdio bridge for LLM apps
@@ -37,7 +42,7 @@ cd frontend && npm test
State lives in the Zustand store (`src/store`); pure helpers in `src/lib`.
- **Don't commit** the exercise media (`media/`) or `data/` — they're gitignored.
- **Test the flow** you touched — click through the affected screens (and the workout flow) in a
browser before opening a merge request.
browser before opening a pull request.
- **Training logic gets a unit test.** Anything deciding what you lift next, or reading a logged
session back, belongs in a pure helper in `src/lib` with tests beside it (`npm test`). These
rules are easy to get subtly wrong and nearly impossible to verify by clicking — the
@@ -45,23 +50,25 @@ cd frontend && npm test
## What CI does with your pull request
A pull request runs the three test suites (frontend, MCP, api) through GitHub Actions and
builds and boots both api image targets. The APK and the published images come from the CI
on the GitLab mirror, which builds them from `main` after the merge; if your change needs an
APK to be judged, say so in the PR and a maintainer runs that build.
Gitea Actions is the CI here, configured in `.gitea/workflows/`:
Merge requests that are still open on the GitLab mirror keep working as before. Every MR runs the three test suites (frontend, MCP, api), with the results and the coverage
of your diff shown in the MR itself, plus a build of the web image and the api image when you
touched their inputs. The frontend job also prints how much your change adds to the gzipped
bundle compared with main. The APK and the published images are manual jobs there (on
`main` both build on every push).
- **`test.yml`** — the `frontend/` suite (`npm test`) on Node 22, the same version as
`web/Dockerfile` / `api/Dockerfile` (`node:22-alpine`). It runs on every pull request and on
pushes to `main` that touch `frontend/`, `mcp/` or the workflow itself. That is the whole job:
no build, no locale check.
- **`docker-publish.yml`** — builds both images (`api`, i.e. the `default` target, and `web`) for
amd64 and arm64 and pushes them to the Gitea registry, on every push to `main` and again when a
release is published.
One gitlab.com quirk: an MR from a fork runs its pipeline in *your* fork, which usually has
no runners enabled — so it would show "no pipeline" forever. For that reason the project
starts the pipeline on its own runners for you: automatically if you have had an MR merged
here before, otherwise a maintainer presses "Run pipeline" after a first look at the diff
(the MR gets the `ci-approval-needed` label until then). Changes to `.gitlab-ci.yml` or
`scripts/ci/` always go through that manual step.
Two things that follow from that. The `mcp/` and `api/` suites are not run in CI — run `npm test`
in `mcp/` and `node --test test/*.test.js` in `api/` yourself before you push. And nothing else is
automated yet: no job packages the Android APK or the iOS archive, and the marketing site in
`website/` is not deployed.
`.gitlab-ci.yml`, `.gitlab/` and `.github/workflows/` are copies of upstream's pipeline, kept
because they document how upstream builds and releases. They are dormant — no runner executes them
for this fork, so a check only they perform does not gate your pull request, and changing them
changes nothing here.
## Good first issues
@@ -75,17 +82,16 @@ here before, otherwise a maintainer presses "Run pipeline" after a first look at
| You have | Goes to |
| --- | --- |
| A quick question, or you'd rather just chat | [The Discord](https://discord.gg/e62jY6fwVb) |
| A question, or self-hosting that won't behave | [An issue labelled `question`](https://github.com/DuarteSantos8/openGym/issues) |
| An idea you're not sure about yet | [An issue labelled `idea`](https://github.com/DuarteSantos8/openGym/issues) |
| A reproducible bug | [Issues](https://github.com/DuarteSantos8/openGym/issues) |
| A change you've already built | [A pull request](https://github.com/DuarteSantos8/openGym/pulls) |
| A question, or self-hosting that won't behave | [An issue labelled `question`](https://git.dploy.lol/dsantillan/kuentagym/issues) |
| An idea you're not sure about yet | [An issue labelled `idea`](https://git.dploy.lol/dsantillan/kuentagym/issues) |
| A reproducible bug | [Issues](https://git.dploy.lol/dsantillan/kuentagym/issues) |
| A change you've already built | [A pull request](https://git.dploy.lol/dsantillan/kuentagym/pulls) |
Questions and ideas are issues too (one tracker is enough) — just labelled, so nobody
mistakes a question for agreed-on work. An answered question is worth more than the same answer
in a chat log: the next person searching "passkey login fails behind my reverse proxy" finds it.
That is the one thing the Discord can't do, so if an answer there turns out to be worth keeping,
it belongs in an issue afterwards.
Upstream has its own rooms and its own tracker for upstream's code; neither is a channel for this
fork.
## Reporting bugs