Rebrand to KuentaGYM + pounds/Spanish defaults + fix the build-at-deploy stack #1

Merged
dsantillan merged 3 commits from rebrand-kuentagym into main 2026-09-21 18:39:38 +00:00
Owner

Rebrand to KuentaGYM, default a new profile to pounds and Spanish, and fix the
build-from-source deployment path.

Three commits:

  • Rebrand + defaults — 1,270 references across 149 files: the visible name
    (Login/Home/mobile-onboarding wordmark, Settings, the printed plan, the PWA
    title and manifest, 17 strings x 14 locale packs), the infrastructure links and
    container names, and DEF.unit/DEF.lang plus every fallback that assumed en/kg.
    Spanish push-notification copy added; the Android/iOS application id is left on
    ch.duartesantos.opengym on purpose so an installed app can still update.

    Three things a find-and-replace would have broken and this fixes: the update
    check asked gitlab.com for upstream's releases and would have installed
    upstream's APK; renaming the mobile state/pairing files would lose the on-device
    copy of a history and silently unpair the device; renaming the exported
    plan-file marker rejected every previously shared plan.

  • scripts/build-images.sh — build both images and publish them to the Gitea
    registry in one command, for a host that pulls rather than builds.

  • deploy/compose-build-at-deploy.yml — the build-at-deploy stack, with the
    three requirements nothing stated: web-build must copy the whole repository
    (the frontend imports api/coach/core from outside frontend/, so a frontend-only
    build stage fails with nine UNRESOLVED_IMPORT errors), the volumes must be
    pinned with name: or a restyled stack creates empty ones, and nginx needs
    client_max_body_size (its 1 MB default rejects the state PUT once a history
    passes it).

Verified: 1597 frontend + 200 api + 58 mcp tests pass, 14 locale packs in sync,
frontend builds clean.

Rebrand to KuentaGYM, default a new profile to pounds and Spanish, and fix the build-from-source deployment path. Three commits: - **Rebrand + defaults** — 1,270 references across 149 files: the visible name (Login/Home/mobile-onboarding wordmark, Settings, the printed plan, the PWA title and manifest, 17 strings x 14 locale packs), the infrastructure links and container names, and DEF.unit/DEF.lang plus every fallback that assumed en/kg. Spanish push-notification copy added; the Android/iOS application id is left on ch.duartesantos.opengym on purpose so an installed app can still update. Three things a find-and-replace would have broken and this fixes: the update check asked gitlab.com for upstream's releases and would have installed upstream's APK; renaming the mobile state/pairing files would lose the on-device copy of a history and silently unpair the device; renaming the exported plan-file marker rejected every previously shared plan. - **scripts/build-images.sh** — build both images and publish them to the Gitea registry in one command, for a host that pulls rather than builds. - **deploy/compose-build-at-deploy.yml** — the build-at-deploy stack, with the three requirements nothing stated: web-build must copy the whole repository (the frontend imports api/coach/core from outside frontend/, so a frontend-only build stage fails with nine UNRESOLVED_IMPORT errors), the volumes must be pinned with `name:` or a restyled stack creates empty ones, and nginx needs client_max_body_size (its 1 MB default rejects the state PUT once a history passes it). Verified: 1597 frontend + 200 api + 58 mcp tests pass, 14 locale packs in sync, frontend builds clean.
dsantillan added 3 commits 2026-09-21 18:39:23 +00:00
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).
The images docker-compose.yml pulls are normally built by
.gitea/workflows/docker-publish.yml, which needs a registered Actions runner
and a PACKAGES_TOKEN secret. Neither exists on this instance's forge yet, so a
host that pulls rather than builds has nothing to pull — and the two builds are
easy to get wrong by hand: api builds from ./api, web from the repository root,
because the web image compiles frontend/ inside its first stage. A wrong context
produces an image that builds fine and then fails at runtime.

One command now does both and pushes them:

    GITEA_TOKEN=<token with write:package> ./scripts/build-images.sh

TAG, REGISTRY, OWNER, PLATFORM, PUSH and API_TARGET (default vs coach) are all
overridable, and the tags default to exactly what docker-compose.yml asks for.
The instance at gym.dploy.lol runs a five-service stack that clones the source
and builds it on every deploy, rather than pulling the images
docker-compose.yml names. That shape has three requirements nothing in the
repository stated, and getting any of them wrong costs a deploy:

- web-build has to copy the whole repository and build from frontend/. The
  frontend imports the Coach's core from ../../../api/coach/core/, so a build
  stage holding only frontend/ fails with nine UNRESOLVED_IMPORT errors — the
  reason web/Dockerfile copies api/coach/core/ into its build stage.
- The volume names have to be pinned with `name:`. Unpinned, a restyled stack
  silently creates empty volumes and the profiles and training history look
  gone.
- nginx needs client_max_body_size. Its default request limit is 1 MB while the
  app PUTs the whole profile to /api/data and the API accepts 5 MB — the sync
  starts failing with a 413 the UI cannot explain once a history grows past 1 MB.
  web/nginx.conf.template already sets 5m; this matches it.

The file is the shape that instance runs, with its volume names filled in.
dsantillan merged commit 1c201ab6f9 into main 2026-09-21 18:39:38 +00:00
Sign in to join this conversation.
No Reviewers
No labels
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: dsantillan/kuentagym#1