From 0c18a808cecaecfbdb2231d02563c8885341e137 Mon Sep 17 00:00:00 2001 From: Duarte Santos Date: Fri, 11 Sep 2026 11:58:39 +0200 Subject: [PATCH] Site: GitHub is home again, GitLab a mirror Nav, footer, the Elsewhere pads and every deep link point at github.com; GitLab keeps a pad and a footer link as the mirror whose CI signs the APK. Stars, forks, issues and the About timeline come from api.github.com again (new cache keys so a warm GitLab-era entry is not misread). The dead-pad rules from the suspension weeks are gone. Cache-bust 17. --- scripts/build-api-docs.mjs | 13 +++++----- website/about.html | 19 ++++++++------- website/api.html | 13 +++++----- website/docs.html | 46 ++++++++++++++++++----------------- website/index.html | 41 +++++++++++++++++++------------ website/site.js | 49 ++++++++++++++++---------------------- website/styles.css | 7 +----- 7 files changed, 95 insertions(+), 93 deletions(-) diff --git a/scripts/build-api-docs.mjs b/scripts/build-api-docs.mjs index a77b6c1..9ca67d4 100644 --- a/scripts/build-api-docs.mjs +++ b/scripts/build-api-docs.mjs @@ -480,7 +480,7 @@ const html = ` - + @@ -500,7 +500,7 @@ const html = ` Docs API About - GitLab + GitHub Discord Buy me a coffee! Download @@ -521,7 +521,7 @@ const html = ` Docs API About - GitLab + GitHub Discord Buy me a coffee! @@ -556,7 +556,7 @@ ${railTags}

Every route the openGym backend serves — passkey auth, state sync, push, pairing, admin — as one hand-written OpenAPI spec. The same file lives - in the repository + in the repository at api/openapi.yaml, next to the one server file it documents.

@@ -602,13 +602,14 @@ ${schemaCards}
- + diff --git a/website/about.html b/website/about.html index 64f0387..7c78e18 100644 --- a/website/about.html +++ b/website/about.html @@ -19,7 +19,7 @@ - + @@ -38,7 +38,7 @@ Docs API About - GitLab + GitHub Discord Buy me a coffee! Download @@ -59,7 +59,7 @@ Docs API About - GitLab + GitHub Discord Buy me a coffee! @@ -80,7 +80,7 @@

On this page

- MilestonesEvery release, straight from GitLab + MilestonesEvery release, straight from GitHub PrinciplesThe rules that don't move

More

HomeThe tour, the demo, the download @@ -124,7 +124,7 @@

Milestones

Principles

@@ -150,7 +150,7 @@
Get openGym - Star it on GitLab + Star it on GitHub
@@ -159,12 +159,13 @@ - + diff --git a/website/api.html b/website/api.html index 34c19b5..febc884 100644 --- a/website/api.html +++ b/website/api.html @@ -22,7 +22,7 @@ - + @@ -161,7 +161,7 @@ main.api-main .lead { color: var(--fg-2); max-width: 58ch; margin: 14px 0 0; fon Docs API About - GitLab + GitHub Discord Buy me a coffee! Download @@ -182,7 +182,7 @@ main.api-main .lead { color: var(--fg-2); max-width: 58ch; margin: 14px 0 0; fon Docs API About - GitLab + GitHub Discord Buy me a coffee! @@ -223,7 +223,7 @@ main.api-main .lead { color: var(--fg-2); max-width: 58ch; margin: 14px 0 0; fon

Every route the openGym backend serves — passkey auth, state sync, push, pairing, admin — as one hand-written OpenAPI spec. The same file lives - in the repository + in the repository at api/openapi.yaml, next to the one server file it documents.

@@ -2201,13 +2201,14 @@ main.api-main .lead { color: var(--fg-2); max-width: 58ch; margin: 14px 0 0; fon
- + @@ -41,7 +41,7 @@ Docs API About - GitLab + GitHub Discord Buy me a coffee! Download @@ -62,7 +62,7 @@ Docs API About - GitLab + GitHub Discord Buy me a coffee! @@ -178,7 +178,7 @@

Docs

The complete reference — every feature, every setting, every way to run openGym. The same documents live - in the repository, + in the repository, next to the code they describe.

@@ -221,7 +221,7 @@
  • GitLab's package registry — every version under opengym-android/<version>/, with a .sha256 checksum beside it.
  • -
  • The GitLab release for that version, which links to both.
  • +
  • The GitHub release for that version, with the APK and its .sha256 attached.
  • Got the file from anywhere else? Verify it against the registry's .sha256 before installing. Updates come to you: when a newer release exists, Settings → Data @@ -245,7 +245,7 @@

  • Build it onto your own iPhone: with a Mac and Xcode 15+, the native Capacitor app runs on your device with a free Apple ID (Apple expires the signature after 7 days; re-run from Xcode to renew — AltStore can automate that re-signing over - Wi-Fi). See docs/MOBILE.md.
  • + Wi-Fi). See docs/MOBILE.md.
  • Just looking? Try the in-browser demo — the real app with example data, no account and nothing to install.
  • @@ -432,7 +432,7 @@

    The self-hosted flavor is two small containers (web + API) and a folder of your data. You need Docker with Compose:

    -
    git clone https://gitlab.com/DuarteSantos8/opengym
    +  
    git clone https://github.com/DuarteSantos8/openGym
     cd openGym
     cp .env.example .env
     docker compose pull    # prebuilt images (amd64 + arm64) — skip to build from source
    @@ -481,7 +481,7 @@ docker compose up -d   # restart alone does NOT re-read .env
    people join.

    Want a valid certificate without exposing anything to the internet — HTTPS on a LAN-only address? That works too (wildcard cert via a DNS challenge, Caddy in front): - docs/SELF_HOSTING_HTTPS.md. + docs/SELF_HOSTING_HTTPS.md. A VPN or an auth proxy (Authelia, Cloudflare Access…) in front composes with all of this.

    @@ -508,10 +508,11 @@ docker compose pull # (or: docker compose up -d --build, if building from docker compose up -d

    Your ./data and the downloaded media are untouched; the app shell is versioned so clients pick up changes on next load. Releases are announced on - GitLab + GitHub and Discord; container images (amd64 + arm64) are published to GitLab's registry + and mirrored to GHCR on every release.

    Every setting

    @@ -680,7 +681,7 @@ ALLOW_GUEST=0 # remove "Continue without account" COACH_DISABLED=1 in the environment switches the feature off harder than any toggle. The Coach is not a doctor or a physiotherapist — if something hurts, ask a professional. Full details, including exactly what is sent and how credentials are stored: - docs/AI_COACH.md.

    + docs/AI_COACH.md.

    Ask an AI about your training (MCP)

    openGym ships an optional MCP server: a small read-only bridge that lets a client @@ -704,7 +705,7 @@ ALLOW_GUEST=0 # remove "Continue without account" isn't there. No new auth (the filesystem is the boundary), no telemetry, no network; the LLM never sees passkeys or session secrets. Setup is cd mcp && npm install plus a few lines of client config: - mcp/README.md.

    + mcp/README.md.

    Import your training history

    Coming from another tracker? Settings → Data → Import from another app reads a @@ -746,7 +747,7 @@ Leg Day,Leg Press,2026-08-21,200,1 time (duration), set type, note (comment(s), notes, workout notes). The full table lives in - docs/DATA_IMPORTS.md.

    + docs/DATA_IMPORTS.md.

    Importing plans

    Routines travel as their own small JSON file (Share a plan exports every current routine; importing merges). Don't want to share everything? Edit the JSON, or use the @@ -789,8 +790,8 @@ Leg Day,Leg Press,2026-08-21,200,1

    The training logic — progression rules, 1RM estimation, how a logged session is read back — lives in pure functions under frontend/src/lib/ with tests next to - them; the MCP server and the mobile app import the very same functions. CI on GitLab - runs the full suites (frontend, api, mcp) on every commit, builds the amd64+arm64 + them; the MCP server and the mobile app import the very same functions. CI on the GitLab + mirror runs the full suites (frontend, api, mcp) on every commit, builds the amd64+arm64 images, signs the APK, and publishes releases — tagging vX.Y.Z is what ships everything.

    The exercise database comes from @@ -808,12 +809,12 @@ Leg Day,Leg Press,2026-08-21,200,1

  • Android APK: npm run build:mobile in frontend/, then Gradle + zipalign + apksigner with your own keystore (keep it — updates must carry the same signature). Step-by-step: - docs/MOBILE.md.
  • + docs/MOBILE.md.
  • iOS app: the Capacitor project in frontend/ios — open in Xcode, set your (free) team, run on your device. Same doc.
  • Development: Node 20+; npm test in frontend/, api/ and mcp/ runs the suites. Contributions welcome — - CONTRIBUTING.md.
  • + CONTRIBUTING.md.

    Troubleshooting

    @@ -852,7 +853,7 @@ Leg Day,Leg Press,2026-08-21,200,1

    Still stuck? The Discord is the quickest way to get an answer; - issues are + issues are better for anything the next person should find by searching.

    Privacy — the complete list

    @@ -894,9 +895,9 @@ Leg Day,Leg Press,2026-08-21,200,1

    What's on the roadmap?

    Rough and community-driven: percentage/training-max programming (5/3/1-style) on top of the progression engine, more starter plans, body measurements alongside weight, - per-exercise notes and a plate calculator, more instruction languages. Ideas and merge + per-exercise notes and a plate calculator, more instruction languages. Ideas and pull requests welcome — the up-to-date list is in the - README.

    + README.

    Where does the exercise database come from?

    From hasaneyldrm/exercises-dataset: 1,324 exercises with animations and instructions, localized in 12 of openGym's 14 UI @@ -911,7 +912,7 @@ Leg Day,Leg Press,2026-08-21,200,1 source on first run. If you want to reuse it yourself, commercially or otherwise, clear it with the rights holder first. Full third-party notices, including the body-diagram geometry, are in - NOTICE.md.

    + NOTICE.md.

    What does the AGPL mean for me?

    You can self-host, use, modify and share openGym freely. If you run a modified version as a network service, you must offer that version's source under the same @@ -925,12 +926,13 @@ Leg Day,Leg Press,2026-08-21,200,1

    - + diff --git a/website/index.html b/website/index.html index 1a6d78d..f26de07 100644 --- a/website/index.html +++ b/website/index.html @@ -19,7 +19,7 @@ - + @@ -89,7 +89,7 @@ try { Docs API About - GitLab + GitHub Discord Buy me a coffee! Download @@ -110,7 +110,7 @@ try { Docs API About - GitLab + GitHub Discord Buy me a coffee! @@ -137,7 +137,7 @@ try { DownloadAndroid APK or self-hosted The storyOne user, zero ambitions Open sourceAGPL-3.0, and staying that way - ElsewhereGitLab, Discord, support + ElsewhereGitHub, Discord, support

    More

    DocsInstall, self-host, import APIEvery route, as an OpenAPI spec @@ -407,7 +407,7 @@ try {

    v1.3.5 · 27.7 MB · Android 6.0+ · signed APK. Your browser will ask before installing; that is normal outside the Play Store.

    Every release is also built and signed by CI and attached to the - GitLab + GitHub releases page, checksums and all.

    On iPhone? Apple does not allow installs outside the App Store. Use the self-hosted version as a home-screen app instead, or see @@ -468,9 +468,9 @@ try {

    - openGym on GitLab ★ - Contributing - Changelog + openGym on GitHub ★ + Contributing + Changelog
    @@ -484,14 +484,24 @@ try {
    + + + + GitHub + The code, the issues, the pull requests and the releases. + Home of the project; every release is published here with its APK and checksum. + + Open the repo + + - GitLab - The code, the issues and the releases. - The CI here builds the container images and signs every APK. + GitLab mirror + The same repository, kept in sync automatically. + Its CI builds the container images and signs every APK — nothing is merged here. - Open the repo + Open the mirror @@ -525,12 +535,13 @@ try {
    - + diff --git a/website/site.js b/website/site.js index 458ae09..db2964d 100644 --- a/website/site.js +++ b/website/site.js @@ -1,9 +1,9 @@ // Behaviour for the openGym site: the header's navigation sheet, the contents // drawer and its scrollspy, the scroll reveals, the demo frame, and the two things -// that come from the GitLab API (repo counts, release timeline). +// that come from the GitHub API (repo counts, release timeline). // Every one of them fails soft — the page is complete without any of this running. -const GL_PROJECT = 'https://gitlab.com/api/v4/projects/DuarteSantos8%2Fopengym' +const GH_REPO = 'https://api.github.com/repos/DuarteSantos8/openGym' // Discord publishes an invite's guild counts to anyone who asks for the invite with // ?with_counts=1 — no bot token, no widget to enable, and the API reflects the caller's @@ -226,33 +226,26 @@ function panel({ opener, panelEl, flag, closeBtn }) { })() /* ------------------------------------------------------- repo counts (nav + specs) - Points at gitlab.com while the GitHub account is suspended; switch the two API URLs - back to api.github.com once it is restored. + Back on api.github.com since 2026-09-11 — GitHub is the home of the project again and + GitLab only mirrors it. Unauthenticated, 60 requests an hour per IP, which the + sessionStorage cache keeps us well under. - The cache keys carry a _gl suffix: a visitor with a still-warm sessionStorage entry - from the gitea era would otherwise be read with the old field names and show NaN. */ + The cache keys carry a _gh2 suffix: a visitor with a still-warm entry from the GitLab + weeks would otherwise be read with the old field names and show NaN. */ ;(async () => { const set = (id, v) => document.querySelectorAll('[data-gh="' + id + '"]').forEach(el => { el.textContent = v }) try { let d = null - const cached = sessionStorage.getItem('repo_meta_gl') + const cached = sessionStorage.getItem('repo_meta_gh2') if (cached) d = JSON.parse(cached) else { - const r = await fetch(GL_PROJECT) + const r = await fetch(GH_REPO) if (!r.ok) return const j = await r.json() - // An unauthenticated project response carries star_count and forks_count and nothing - // else countable — open_issues_count is only there for a logged-in caller, so reading - // it here printed "undefined" on the live site. The issues endpoint answers it in the - // X-Total header instead, and GitLab lists that header in Access-Control-Expose-Headers, - // so the browser is allowed to read it. per_page=1 keeps the body to a single issue. - let issues = '' - try { - const ri = await fetch(GL_PROJECT + '/issues?state=opened&per_page=1') - if (ri.ok) issues = ri.headers.get('X-Total') || '' - } catch (e) { /* count stays blank rather than wrong */ } - d = { stars_count: j.star_count, forks_count: j.forks_count, open_issues_count: issues } - sessionStorage.setItem('repo_meta_gl', JSON.stringify(d)) + // open_issues_count counts open pull requests too — GitHub's own repo header does the + // same, so the number matches what a visitor sees over there. + d = { stars_count: j.stargazers_count, forks_count: j.forks_count, open_issues_count: j.open_issues_count } + sessionStorage.setItem('repo_meta_gh2', JSON.stringify(d)) } set('stars', '★ ' + d.stars_count) set('stars-n', d.stars_count) @@ -288,26 +281,24 @@ function panel({ opener, panelEl, flag, closeBtn }) { })() /* -------------------------------------------------------------- about timeline - Built from the published GitLab releases, so the page updates itself with every + Built from the published GitHub releases, so the page updates itself with every release. The static entries marked data-fallback stay in place when the API is unreachable; the hand-written first entry is always kept. - GitLab's release objects differ from Gitea's: the notes are `description` (not `body`), - the date is `released_at` (not `published_at`), the web link sits in `_links.self`, and - there is no draft/prerelease pair — a not-yet-released one is `upcoming_release`. */ + Drafts and pre-releases are skipped; the notes are `body`, the date `published_at`. */ ;(async () => { const tl = document.getElementById('milestones') if (!tl) return try { let rel = null - const cached = sessionStorage.getItem('repo_releases_gl') + const cached = sessionStorage.getItem('repo_releases_gh2') if (cached) rel = JSON.parse(cached) else { - const r = await fetch(GL_PROJECT + '/releases?per_page=100') + const r = await fetch(GH_REPO + '/releases?per_page=100') if (!r.ok) return - rel = (await r.json()).filter(x => !x.upcoming_release) - .map(x => ({ tag: x.tag_name, name: x.name, at: x.released_at, body: x.description || '', url: (x._links && x._links.self) || ('https://gitlab.com/DuarteSantos8/opengym/-/releases/' + x.tag_name) })) - sessionStorage.setItem('repo_releases_gl', JSON.stringify(rel)) + rel = (await r.json()).filter(x => !x.draft && !x.prerelease) + .map(x => ({ tag: x.tag_name, name: x.name || x.tag_name, at: x.published_at, body: x.body || '', url: x.html_url })) + sessionStorage.setItem('repo_releases_gh2', JSON.stringify(rel)) } if (!rel.length) return const fmt = d => new Date(d).toLocaleDateString('en-GB', { year: 'numeric', month: 'long', day: 'numeric' }) diff --git a/website/styles.css b/website/styles.css index 27ad6e1..c6bf4d1 100644 --- a/website/styles.css +++ b/website/styles.css @@ -669,15 +669,10 @@ section { padding: var(--sec) 0 0; } } .pad:hover .pad-go::after { transform: rotate(-45deg) translate(2px, 2px); } +.pad.github { --brand: var(--fg); } .pad.gitlab { --brand: #fc6d26; } .pad.bmc { --brand: #ffdd00; } .pad.discord { --brand: #5865f2; } - -/* The suspended repo. It stays linked because half the internet still points at it, - but nothing about this pad should promise that the link works. */ -.pad.dead { --brand: #8e8e93; } -.pad.dead .pad-body b, .pad.dead .pad-ic svg { opacity: .8; } -.pad.dead .pad-go { color: var(--fg-3); } .pad.dead .pad-go::after { display: none; } .pad-body .tag { display: inline-block; padding: 2px 7px; border-radius: 6px;