Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
c2e41937cb | ||
|
|
6dfb36c46a | ||
|
|
c588d219ba | ||
|
|
f94fa7c0e3 | ||
|
|
4b25a80356 | ||
|
|
19a441d93e | ||
|
|
e69673d3cd | ||
|
|
5de5147c5e |
No files matched your search
@@ -0,0 +1,60 @@
|
||||
name: Bug report
|
||||
description: Something in openGym is broken or not working as expected
|
||||
labels: ["bug"]
|
||||
body:
|
||||
- type: textarea
|
||||
id: what-happened
|
||||
attributes:
|
||||
label: What did you do?
|
||||
description: Steps to reproduce, as precisely as you can.
|
||||
placeholder: |
|
||||
1. Go to '...'
|
||||
2. Click on '...'
|
||||
3. See error
|
||||
validations:
|
||||
required: true
|
||||
|
||||
- type: textarea
|
||||
id: expected
|
||||
attributes:
|
||||
label: What did you expect to happen?
|
||||
validations:
|
||||
required: true
|
||||
|
||||
- type: textarea
|
||||
id: actual
|
||||
attributes:
|
||||
label: What happened instead?
|
||||
description: Include error messages, console output, or screenshots if you have them.
|
||||
validations:
|
||||
required: true
|
||||
|
||||
- type: dropdown
|
||||
id: setup
|
||||
attributes:
|
||||
label: How are you running openGym?
|
||||
options:
|
||||
- Self-hosted (docker compose)
|
||||
- Frontend dev server (npm run dev)
|
||||
- Other / not sure
|
||||
validations:
|
||||
required: true
|
||||
|
||||
- type: input
|
||||
id: environment
|
||||
attributes:
|
||||
label: Browser & OS
|
||||
placeholder: e.g. Safari 17 on iOS 18, Chrome 126 on Android
|
||||
validations:
|
||||
required: true
|
||||
|
||||
- type: checkboxes
|
||||
id: passkey
|
||||
attributes:
|
||||
label: Is this about login / passkeys?
|
||||
description: >
|
||||
Most login issues are an `RP_ID`/`ORIGIN` mismatch — check your `.env` against the
|
||||
domain you're accessing openGym from before reporting. See the
|
||||
[self-hosting guide](../../docs/SELF_HOSTING.md).
|
||||
options:
|
||||
- label: Yes, this is a login/passkey issue and I've already checked RP_ID/ORIGIN
|
||||
@@ -0,0 +1,14 @@
|
||||
# gitea.com has no Discussions, so questions and ideas are issues here — labelled, so they
|
||||
# are not mistaken for agreed-on work. Blank issues stay off: the forms ask for the two
|
||||
# things that otherwise cost a round-trip every time (how it is running, and RP_ID/ORIGIN).
|
||||
blank_issues_enabled: false
|
||||
contact_links:
|
||||
- name: Self-hosting guide
|
||||
url: https://gitea.com/DuarteSantos/openGym/src/branch/main/docs/SELF_HOSTING.md
|
||||
about: Passkey login failing, reverse proxies, HTTPS, Docker — most login trouble is an RP_ID/ORIGIN mismatch and is answered here.
|
||||
- name: Contributing guide
|
||||
url: https://gitea.com/DuarteSantos/openGym/src/branch/main/CONTRIBUTING.md
|
||||
about: Project layout, dev setup and guidelines before you open a PR.
|
||||
- name: Changelog
|
||||
url: https://gitea.com/DuarteSantos/openGym/src/branch/main/CHANGELOG.md
|
||||
about: What changed in each release, newest first.
|
||||
@@ -0,0 +1,29 @@
|
||||
name: Feature request
|
||||
description: Suggest an idea or improvement for openGym
|
||||
labels: ["enhancement"]
|
||||
body:
|
||||
- type: textarea
|
||||
id: problem
|
||||
attributes:
|
||||
label: What problem does this solve?
|
||||
description: What are you trying to do that openGym doesn't support today?
|
||||
validations:
|
||||
required: true
|
||||
|
||||
- type: textarea
|
||||
id: proposal
|
||||
attributes:
|
||||
label: Proposed approach
|
||||
description: How would you like it to work? Rough ideas are fine.
|
||||
validations:
|
||||
required: true
|
||||
|
||||
- type: checkboxes
|
||||
id: deps
|
||||
attributes:
|
||||
label: Dependencies
|
||||
description: >
|
||||
openGym is intentionally dependency-light — new packages (front or back) are a hard
|
||||
sell. See [CONTRIBUTING.md](../../CONTRIBUTING.md).
|
||||
options:
|
||||
- label: This doesn't require adding a new dependency
|
||||
@@ -0,0 +1,86 @@
|
||||
# Publishes the two images to the gitea.com container registry, replacing GHCR.
|
||||
#
|
||||
# Images land at gitea.com/duartesantos/opengym-{api,web} and are what
|
||||
# `docker compose pull` fetches.
|
||||
#
|
||||
# As on GitHub, a *published release* is the trigger, never a bare tag push: the
|
||||
# versioning rule consolidates unreleased tags, and a deleted tag does not delete
|
||||
# the image tags it already pushed — dependency bots then read the orphan as a
|
||||
# newer series (that was issue #87 on the old repo).
|
||||
#
|
||||
# Needs one repository secret: PACKAGES_TOKEN — a gitea.com token with
|
||||
# write:package scope (Settings → Applications → Generate New Token). The built-in
|
||||
# token cannot write packages.
|
||||
name: Publish Docker images
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [main]
|
||||
release:
|
||||
types: [published]
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
matrix:
|
||||
include:
|
||||
- image: api
|
||||
context: ./api
|
||||
file: ./api/Dockerfile
|
||||
- image: web
|
||||
context: .
|
||||
file: ./web/Dockerfile
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- name: Lowercase owner (registry names must be lowercase)
|
||||
id: repo
|
||||
run: echo "owner=$(echo '${{ github.repository_owner }}' | tr '[:upper:]' '[:lower:]')" >> "$GITHUB_OUTPUT"
|
||||
|
||||
- name: Set version metadata
|
||||
id: version_meta
|
||||
run: |
|
||||
# On a release the ref is refs/tags/vX.Y.Z; on a main push it is a branch ref,
|
||||
# which would otherwise label the image "refs/heads/main".
|
||||
case "$GITHUB_REF" in
|
||||
refs/tags/*) VERSION="${GITHUB_REF#refs/tags/}" ;;
|
||||
*) VERSION="main-${GITHUB_SHA::7}" ;;
|
||||
esac
|
||||
echo "VERSION=$VERSION" >> $GITHUB_OUTPUT
|
||||
echo "VCS_REF=${GITHUB_SHA}" >> $GITHUB_OUTPUT
|
||||
echo "BUILD_DATE=$(date -u +'%Y-%m-%dT%H:%M:%SZ')" >> $GITHUB_OUTPUT
|
||||
|
||||
- uses: docker/setup-qemu-action@v3
|
||||
- uses: docker/setup-buildx-action@v3
|
||||
|
||||
- uses: docker/login-action@v3
|
||||
with:
|
||||
registry: gitea.com
|
||||
username: ${{ github.repository_owner }}
|
||||
password: ${{ secrets.PACKAGES_TOKEN }}
|
||||
|
||||
- uses: docker/metadata-action@v5
|
||||
id: meta
|
||||
with:
|
||||
images: gitea.com/${{ steps.repo.outputs.owner }}/opengym-${{ matrix.image }}
|
||||
tags: |
|
||||
type=raw,value=latest,enable={{is_default_branch}}
|
||||
type=semver,pattern={{version}}
|
||||
type=semver,pattern={{major}}.{{minor}}
|
||||
|
||||
# No cache-from/to: the GHCR copy used type=gha, which is a GitHub-hosted
|
||||
# service and is not there on gitea.com's runners.
|
||||
- uses: docker/build-push-action@v6
|
||||
with:
|
||||
context: ${{ matrix.context }}
|
||||
file: ${{ matrix.file }}
|
||||
platforms: linux/amd64,linux/arm64
|
||||
build-args: |
|
||||
VERSION=${{ steps.version_meta.outputs.VERSION }}
|
||||
VCS_REF=${{ steps.version_meta.outputs.VCS_REF }}
|
||||
BUILD_DATE=${{ steps.version_meta.outputs.BUILD_DATE }}
|
||||
push: true
|
||||
tags: ${{ steps.meta.outputs.tags }}
|
||||
labels: ${{ steps.meta.outputs.labels }}
|
||||
@@ -0,0 +1,38 @@
|
||||
# Same suite as .github/workflows/test.yml, run by gitea.com's Actions runners.
|
||||
# The GitHub copy is kept for the day that account comes back; this one is what
|
||||
# actually gates contributions today.
|
||||
name: Tests
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
paths:
|
||||
- 'frontend/**'
|
||||
- 'mcp/**'
|
||||
- '.gitea/workflows/test.yml'
|
||||
push:
|
||||
branches: [main]
|
||||
paths:
|
||||
- 'frontend/**'
|
||||
- 'mcp/**'
|
||||
- '.gitea/workflows/test.yml'
|
||||
workflow_dispatch:
|
||||
|
||||
concurrency:
|
||||
group: test-${{ github.ref }}
|
||||
cancel-in-progress: true
|
||||
|
||||
jobs:
|
||||
test:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
# node:22-alpine in web/Dockerfile and api/Dockerfile — CI must match production.
|
||||
- uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: 22
|
||||
cache: npm
|
||||
cache-dependency-path: frontend/package-lock.json
|
||||
- run: npm ci
|
||||
working-directory: frontend
|
||||
- run: npm test
|
||||
working-directory: frontend
|
||||
@@ -2,3 +2,4 @@
|
||||
# enrolled in GitHub Sponsors (github.com/sponsors — identity check, Stripe payout account and
|
||||
# a tax form); until then the button is simply not shown.
|
||||
github: DuarteSantos8
|
||||
buy_me_a_coffee: duartesantos
|
||||
@@ -1,5 +1,60 @@
|
||||
# Changelog
|
||||
|
||||
## v1.2.8 — 2026-08-22
|
||||
|
||||
A housekeeping release, and two things worth reading even if you skip the rest. openGym has moved
|
||||
to **gitea.com** — the GitHub account it lived on was suspended, and everything you click to
|
||||
self-host pointed there. And the exercise media's licence is now stated correctly: the images and
|
||||
animations are © Gym visual, not CC, which matters if you redistribute them.
|
||||
|
||||
### The project moved to gitea.com
|
||||
|
||||
- 🏠 **openGym now lives at <https://gitea.com/DuarteSantos/openGym>.** The GitHub account
|
||||
was suspended on 2026-08-19 and took the repository, the GHCR images, the Pages demo and
|
||||
Discussions with it. `docker compose` now pulls `gitea.com/duartesantos/opengym-{api,web}`; the
|
||||
README, `SECURITY.md`, `CONTRIBUTING.md` and the self-hosting docs point at the new home; issue
|
||||
forms, tests and the image publish run as Gitea Actions. **If you self-host, re-pull:** the old
|
||||
`ghcr.io` images are gone and will not update again.
|
||||
- Gitea has no Discussions, so questions and ideas are labelled issues — or the Discord, which
|
||||
is where most of it happens now: <https://discord.gg/e62jY6fwVb>.
|
||||
- Old issue and PR numbers in the entries below stay as plain text. They point at a dead repo and
|
||||
do not match the numbering here.
|
||||
|
||||
### The exercise media is © Gym visual — not CC
|
||||
|
||||
- ⚖️ **openGym described the exercise dataset as "CC". That was wrong**, and it is now
|
||||
corrected everywhere it appeared (README, `NOTICE.md`, the website, the in-app credit, the
|
||||
compose file and `scripts/fetch-media.sh`). Upstream
|
||||
[hasaneyldrm/exercises-dataset](https://github.com/hasaneyldrm/exercises-dataset) licenses its two
|
||||
halves differently: the exercise **metadata and instruction text are MIT**, while the **images and
|
||||
animations are © [Gym visual](https://gymvisual.com/)**, used under that dataset's terms with
|
||||
permission that is not transferable.
|
||||
- **Nothing changes for using openGym.** It never shipped that media — not in the repository,
|
||||
not in its history, not in the images or the APK; your instance downloads it from upstream on
|
||||
first run, and the media step now prints where it comes from and under what terms.
|
||||
- **It does change what you may do with the media.** Reusing the images or animations — in
|
||||
openGym or anywhere else, commercially or not — needs your own licence from Gym visual. See
|
||||
[NOTICE.md](NOTICE.md).
|
||||
|
||||
### Fixes
|
||||
|
||||
- ⬅️ **The back gesture no longer quits the app** (Android). The packaged app never listened for
|
||||
the system back event at all — Capacitor leaves that to `@capacitor/app`, which was not
|
||||
installed — so a back swipe went straight past the WebView and finished the activity from
|
||||
wherever you were. The per-sheet history entries added in [#63] only ever did anything in a
|
||||
browser tab. Back now dismisses the open sheet, then walks back through the screens you came
|
||||
from, and only leaves the app after a second press at the root ("Press back again to exit").
|
||||
A sheet that is locked mid-task still swallows back, as it does in the browser.
|
||||
|
||||
### The website counts visits; the app still counts nothing
|
||||
|
||||
- 📊 **<https://opengym.duarte-santos.ch> now runs self-hosted, cookieless
|
||||
[Umami](https://umami.is/)** — page views for the landing, about and docs pages, no cookies,
|
||||
no third-party service.
|
||||
- 🔒 **Your instance does not.** The frontend only gets an analytics tag when
|
||||
`VITE_UMAMI_SRC` *and* `VITE_UMAMI_ID` are set at build time, which they are not in any published
|
||||
image or in a plain `npm run build`. A self-hosted openGym remains telemetry-free, as advertised.
|
||||
|
||||
## v1.2.7 — 2026-08-18
|
||||
|
||||
The muscle map answers a third question. Balance showed where the volume went and Fatigue what was
|
||||
|
||||
+6
-5
@@ -55,13 +55,14 @@ cd frontend && npm test
|
||||
|
||||
| You have | Goes to |
|
||||
| --- | --- |
|
||||
| A question, or self-hosting that won't behave | [Discussions → Q&A](https://github.com/DuarteSantos8/openGym/discussions/categories/q-a) |
|
||||
| An idea you're not sure about yet | [Discussions → Ideas](https://github.com/DuarteSantos8/openGym/discussions/categories/ideas) |
|
||||
| A reproducible bug | [Issues](https://github.com/DuarteSantos8/openGym/issues) |
|
||||
| A question, or self-hosting that won't behave | [An issue labelled `question`](https://gitea.com/DuarteSantos/openGym/issues) |
|
||||
| An idea you're not sure about yet | [An issue labelled `idea`](https://gitea.com/DuarteSantos/openGym/issues) |
|
||||
| A reproducible bug | [Issues](https://gitea.com/DuarteSantos/openGym/issues) |
|
||||
| A change you've already built | A pull request |
|
||||
|
||||
An answered question in Q&A is worth more than the same answer buried in a closed issue — the
|
||||
next person searching "passkey login fails behind my reverse proxy" actually finds it.
|
||||
gitea.com has no Discussions, so questions and ideas are issues too — 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.
|
||||
|
||||
## Reporting bugs
|
||||
|
||||
|
||||
@@ -46,11 +46,54 @@ SOFTWARE.
|
||||
|
||||
## Exercise data & media
|
||||
|
||||
The exercise names, instructions (English in `frontend/src/lib/exercises-data.js`, other
|
||||
languages in `frontend/src/instr/`, regenerated via `scripts/build-instructions.mjs`), images
|
||||
and animations (fetched into `media/` at build time) come from
|
||||
[**hasaneyldrm/exercises-dataset**](https://github.com/hasaneyldrm/exercises-dataset)
|
||||
and are **not** covered by openGym's AGPL license — they remain under that dataset's own terms.
|
||||
The media files are not distributed in this repository; they are downloaded from the upstream
|
||||
source on first run. If you redistribute openGym with the media included, review the upstream
|
||||
license first.
|
||||
Both come from [**hasaneyldrm/exercises-dataset**](https://github.com/hasaneyldrm/exercises-dataset),
|
||||
and that dataset licenses them differently. Neither is covered by openGym's AGPL license.
|
||||
|
||||
### Metadata & instruction text — MIT
|
||||
|
||||
The exercise names, attributes and instructions (English in `frontend/src/lib/exercises-data.js`,
|
||||
other languages in `frontend/src/instr/`, regenerated via `scripts/build-instructions.mjs`) are
|
||||
MIT-licensed, reproduced below.
|
||||
|
||||
```
|
||||
MIT License
|
||||
|
||||
Copyright (c) 2026 Hasan Emir Yıldırım
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation and data files (the "Software"),
|
||||
to deal in the Software without restriction, including without limitation the
|
||||
rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
|
||||
sell copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
||||
```
|
||||
|
||||
### Images & animations — © Gym visual, not MIT and not AGPL
|
||||
|
||||
> **© Gym visual — https://gymvisual.com/**
|
||||
|
||||
The exercise thumbnails (180×180) and animations are **© [Gym visual](https://gymvisual.com/)**.
|
||||
They are in the upstream dataset with the rights holder's written permission, granted to that
|
||||
dataset; that permission is **not transferable**. Their use is governed by Gym visual's
|
||||
[Terms & Conditions](https://gymvisual.com/content/3-terms-and-conditions-of-use) — not by the MIT
|
||||
license above, and not by openGym's AGPL.
|
||||
|
||||
**openGym does not redistribute this media.** It is not in this repository, not in its history,
|
||||
and not in the published Docker images or the Android APK. A self-hosted instance downloads it
|
||||
from the upstream source on first `docker compose up`; the mobile and demo builds load it from a
|
||||
CDN at runtime.
|
||||
|
||||
If you want to reuse the media — in openGym or anywhere else, commercially or not — **obtain your
|
||||
own license from Gym visual first**, and keep the `© Gym visual — https://gymvisual.com/`
|
||||
attribution intact wherever it appears.
|
||||
@@ -19,9 +19,9 @@ No account on someone else's server, no subscription, no ads. Just `docker compo
|
||||

|
||||

|
||||
<br>
|
||||

|
||||
[](https://github.com/DuarteSantos8/openGym/stargazers)
|
||||
[](https://github.com/DuarteSantos8/openGym/issues)
|
||||

|
||||
[](https://gitea.com/DuarteSantos/openGym/stars)
|
||||
[](https://gitea.com/DuarteSantos/openGym/issues)
|
||||
|
||||
</div>
|
||||
|
||||
@@ -39,11 +39,11 @@ No account on someone else's server, no subscription, no ads. Just `docker compo
|
||||
|
||||
<div align="center">
|
||||
|
||||
### [🌐 opengym.duarte-santos.ch](https://opengym.duarte-santos.ch) · [▶ Try the live demo](https://duartesantos8.github.io/openGym/)
|
||||
### [🌐 opengym.duarte-santos.ch](https://opengym.duarte-santos.ch) · [📦 Source on gitea.com](https://gitea.com/DuarteSantos/openGym)
|
||||
|
||||
No signup, nothing to install — it runs entirely in your browser on example data.<br>
|
||||
<sub>There's no server behind the demo, so passkey sign-in, sync across devices and the
|
||||
admin dashboard only exist in a self-hosted instance.</sub>
|
||||
Screenshots, docs and the APK download live on the site.<br>
|
||||
<sub>The browser demo was hosted on GitHub Pages and is offline while that account is
|
||||
suspended — self-host it (below) or sideload the Android app to try it for real.</sub>
|
||||
|
||||
</div>
|
||||
|
||||
@@ -92,7 +92,7 @@ as a home-screen app, passkey sign-in, offline support, sync across your phone a
|
||||
You need [Docker](https://docs.docker.com/get-docker/) with Compose.
|
||||
|
||||
```bash
|
||||
git clone https://github.com/DuarteSantos8/openGym
|
||||
git clone https://gitea.com/DuarteSantos/openGym
|
||||
cd openGym
|
||||
cp .env.example .env
|
||||
docker compose pull # grab prebuilt images (amd64 + arm64) — skip to build from source instead
|
||||
@@ -100,8 +100,17 @@ docker compose up -d
|
||||
```
|
||||
|
||||
Open **http://localhost:8080**, tap **Create profile**, and you're in. First launch downloads
|
||||
the exercise media (~140 MB) once. Prefer building the images yourself instead of pulling from
|
||||
`ghcr.io`? Drop the `pull` step and run `docker compose up -d --build` — you don't need Node or
|
||||
the exercise media (~140 MB) once.
|
||||
|
||||
> **About that media:** it comes from
|
||||
> [hasaneyldrm/exercises-dataset](https://github.com/hasaneyldrm/exercises-dataset), whose
|
||||
> metadata and instruction text are MIT — but whose images and animations are
|
||||
> **© [Gym visual](https://gymvisual.com/)**, used under that dataset's terms and *not* under
|
||||
> openGym's AGPL. openGym ships none of it: your instance downloads it from upstream. Reusing it
|
||||
> yourself, commercially or not, needs your own licence from Gym visual — see
|
||||
> [NOTICE.md](NOTICE.md).
|
||||
Prefer building the images yourself instead of pulling from
|
||||
`gitea.com`? Drop the `pull` step and run `docker compose up -d --build` — you don't need Node or
|
||||
a build step locally either way.
|
||||
|
||||
> Want it reachable from your phone over the internet with passkeys? You'll need an HTTPS
|
||||
@@ -187,7 +196,8 @@ Rough, community-driven — ideas and PRs welcome:
|
||||
## Tech
|
||||
|
||||
React 19 + Vite (React Router, Zustand) · Node (no framework) · nginx · Docker Compose ·
|
||||
WebAuthn · exercise data from [hasaneyldrm/exercises-dataset](https://github.com/hasaneyldrm/exercises-dataset).
|
||||
WebAuthn · exercise data from [hasaneyldrm/exercises-dataset](https://github.com/hasaneyldrm/exercises-dataset)
|
||||
(MIT metadata and instructions; media © Gym visual — see [License](#license)).
|
||||
No database server, no cloud dependencies — the frontend builds inside Docker, so self-hosting
|
||||
stays a one-command `docker compose up`.
|
||||
|
||||
@@ -202,15 +212,18 @@ in the Docker build.
|
||||
|
||||
## Community
|
||||
|
||||
- **[Q&A](https://github.com/DuarteSantos8/openGym/discussions/categories/q-a)** — self-hosting
|
||||
help, passkey/login trouble, "how do I…". Most login problems turn out to be an `RP_ID`/`ORIGIN`
|
||||
mismatch.
|
||||
- **[Ideas](https://github.com/DuarteSantos8/openGym/discussions/categories/ideas)** — features
|
||||
worth talking through before anyone writes code.
|
||||
- **[Show and tell](https://github.com/DuarteSantos8/openGym/discussions/categories/show-and-tell)**
|
||||
— your setup, your plan templates, whatever you built on top.
|
||||
- **[Issues](https://github.com/DuarteSantos8/openGym/issues)** — bugs, and work that's already
|
||||
been agreed on.
|
||||
- **[Issues](https://gitea.com/DuarteSantos/openGym/issues)** — bugs, questions, self-hosting
|
||||
help and ideas. gitea.com has no Discussions, so it all lives in one tracker: label a question
|
||||
`question` and an idea `idea`, and it gets treated as one rather than as agreed-on work.
|
||||
- **Login trouble?** Most of it is an `RP_ID`/`ORIGIN` mismatch — check
|
||||
[docs/SELF_HOSTING.md](docs/SELF_HOSTING.md) before opening an issue.
|
||||
- **Pull requests** — [open one on gitea.com](https://gitea.com/DuarteSantos/openGym/pulls); see
|
||||
[CONTRIBUTING.md](CONTRIBUTING.md).
|
||||
|
||||
> **On the GitHub repo:** `github.com/DuarteSantos8/openGym` is offline because the account was
|
||||
> suspended. gitea.com is the home of the project until that is resolved — same history, same
|
||||
> tags, same releases. Old GitHub issue and PR numbers in [CHANGELOG.md](CHANGELOG.md) are kept
|
||||
> as plain references; they don't map onto gitea's numbering.
|
||||
|
||||
## Contributing
|
||||
|
||||
@@ -221,10 +234,26 @@ openGym is free and stays free: AGPL, no subscription, no paid tier, nothing hel
|
||||
sponsors. If it replaced a paid tracker for you and you want to chip in, the Sponsor button at the
|
||||
top of the page is there — a star, a bug report or a PR is worth just as much.
|
||||
|
||||
<a href="https://buymeacoffee.com/duartesantos" target="_blank">
|
||||
<img src="https://cdn.buymeacoffee.com/buttons/v2/default-yellow.png"
|
||||
alt="Buy Me A Coffee"
|
||||
style="height: 60px !important;width: 217px !important;">
|
||||
</a>
|
||||
|
||||
## License
|
||||
|
||||
[GNU AGPL v3.0](LICENSE) — free and open source. You can self-host, use, modify and share it;
|
||||
if you run a modified version as a network service, you must offer that version's source under
|
||||
the same license. Nobody can turn openGym into a closed, proprietary product.
|
||||
**openGym's own code** is [GNU AGPL v3.0](LICENSE) — free and open source. You can self-host,
|
||||
use, modify and share it; if you run a modified version as a network service, you must offer that
|
||||
version's source under the same license. Nobody can turn openGym into a closed, proprietary
|
||||
product.
|
||||
|
||||
Exercise images/GIFs are fetched from the upstream dataset and keep their own terms — see [NOTICE.md](NOTICE.md).
|
||||
**Third-party content is not, and openGym cannot sublicense it.** The exercise metadata and
|
||||
instruction text come from
|
||||
[hasaneyldrm/exercises-dataset](https://github.com/hasaneyldrm/exercises-dataset) under the
|
||||
**MIT** license. The exercise images and animations are **© [Gym visual](https://gymvisual.com/)**
|
||||
and are used under that dataset's terms — openGym does not redistribute them (your instance
|
||||
fetches them at first run) and does not relicense them under the AGPL. To reuse that media
|
||||
yourself, get your own licence from Gym visual
|
||||
([terms](https://gymvisual.com/content/3-terms-and-conditions-of-use)).
|
||||
|
||||
Full third-party notices, including the body-diagram geometry: **[NOTICE.md](NOTICE.md)**.
|
||||
+8
-9
@@ -8,7 +8,7 @@ need — what the app protects you from and what it doesn't.
|
||||
|
||||
Only the **latest release**. Releases are semver tags (`v1.0.0` → `v1.2.3`, see
|
||||
[CHANGELOG.md](CHANGELOG.md)); there is no LTS or maintenance branch and older tags are never
|
||||
patched. A fix ships in the next release and in the `latest` images on ghcr.io.
|
||||
patched. A fix ships in the next release and in the `latest` images on gitea.com.
|
||||
|
||||
Updating a self-hosted instance:
|
||||
|
||||
@@ -18,14 +18,13 @@ git pull && docker compose pull && docker compose up -d
|
||||
|
||||
## Reporting a vulnerability
|
||||
|
||||
Use GitHub's private vulnerability reporting — repo **Security** tab → **Report a vulnerability**:
|
||||
The project moved to gitea.com, which has no private-advisory feature. So: open an issue on
|
||||
<https://gitea.com/DuarteSantos/openGym/issues> saying only *"I need a private channel for a
|
||||
security report"* — no details, no repro, no version — and you'll get an address to send it to
|
||||
within a couple of days.
|
||||
|
||||
<https://github.com/DuarteSantos8/openGym/security/advisories/new>
|
||||
|
||||
> Private reporting has to be switched on in the repository settings for that link to work
|
||||
> (Settings → Advanced Security → Private vulnerability reporting). If it 404s, open a normal
|
||||
> issue saying only *"I need a private channel for a security report"* — no details, no repro —
|
||||
> and it will be enabled.
|
||||
> The GitHub repo and its private vulnerability reporting are gone with the suspended account;
|
||||
> `github.com/DuarteSantos8/openGym/security/advisories/new` no longer resolves.
|
||||
|
||||
Please don't put a working exploit in a public issue if it can be used against other people's
|
||||
instances. Everything else (a crash you can only trigger on your own box, a scanner warning)
|
||||
@@ -50,7 +49,7 @@ in the thread; there's no objection, and no request to sit on it indefinitely.
|
||||
change a signed-in user's data.
|
||||
- **Shipped deployment config** — `docker-compose.yml`, `web/nginx.conf`, the two Dockerfiles:
|
||||
a default that exposes something a self-hoster wouldn't expect to be exposed.
|
||||
- **The published images** `ghcr.io/duartesantos8/opengym-api` and `-web`.
|
||||
- **The published images** `gitea.com/duartesantos/opengym-api` and `-web`.
|
||||
|
||||
## Out of scope
|
||||
|
||||
|
||||
+4
-4
@@ -4,12 +4,12 @@ ARG VERSION=dev
|
||||
ARG VCS_REF=dev
|
||||
ARG BUILD_DATE=unknown
|
||||
|
||||
LABEL maintainer="Duarte Santos https://github.com/DuarteSantos8" \
|
||||
LABEL maintainer="Duarte Santos https://gitea.com/DuarteSantos" \
|
||||
org.opencontainers.image.title="opengym-api" \
|
||||
org.opencontainers.image.description="Backend for Self-hosted gym & body-weight tracker — plan routines, log workouts (supersets & cardio too), track your weight and progress, passkey login. Your data, your server." \
|
||||
org.opencontainers.image.source="https://github.com/DuarteSantos8/openGym" \
|
||||
org.opencontainers.image.url="https://ghcr.io/duartesantos8/opengym-api" \
|
||||
org.opencontainers.image.documentation="https://github.com/DuarteSantos8/openGym#readme" \
|
||||
org.opencontainers.image.source="https://gitea.com/DuarteSantos/openGym" \
|
||||
org.opencontainers.image.url="https://gitea.com/DuarteSantos/-/packages/container/opengym-api" \
|
||||
org.opencontainers.image.documentation="https://gitea.com/DuarteSantos/openGym#readme" \
|
||||
org.opencontainers.image.licenses="AGPL-3.0-or-later" \
|
||||
org.opencontainers.image.version=$VERSION \
|
||||
org.opencontainers.image.revision=$VCS_REF \
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "gym-api",
|
||||
"version": "1.2.7",
|
||||
"version": "1.2.8",
|
||||
"private": true,
|
||||
"type": "module",
|
||||
"main": "server.js",
|
||||
|
||||
+14
-3
@@ -2,7 +2,10 @@ name: opengym
|
||||
|
||||
services:
|
||||
# One-time: download the exercise images + GIFs into ./media (skipped if already there).
|
||||
# ~140 MB, from github.com/hasaneyldrm/exercises-dataset (CC).
|
||||
# ~140 MB, from github.com/hasaneyldrm/exercises-dataset. That dataset is MIT for the
|
||||
# metadata and instruction text, but the images and GIFs are © Gym visual
|
||||
# (https://gymvisual.com/) and are used under the dataset's terms — openGym neither
|
||||
# redistributes nor relicenses them. See NOTICE.md.
|
||||
media:
|
||||
image: alpine/git
|
||||
volumes:
|
||||
@@ -13,6 +16,14 @@ services:
|
||||
- |
|
||||
if [ -z "$$(ls -A /out/img 2>/dev/null)" ]; then
|
||||
echo "↓ Downloading exercise media (~140 MB, one time)…"
|
||||
echo " Source: github.com/hasaneyldrm/exercises-dataset"
|
||||
echo " Metadata and instruction text: MIT."
|
||||
echo " Images and animations: © Gym visual — https://gymvisual.com/"
|
||||
echo " They are used under that dataset's terms, not openGym's AGPL, and are"
|
||||
echo " downloaded from upstream — openGym does not redistribute them."
|
||||
echo " Terms: https://gymvisual.com/content/3-terms-and-conditions-of-use"
|
||||
echo " Reusing this media yourself, commercially or not, needs your own licence"
|
||||
echo " from Gym visual. Details in NOTICE.md."
|
||||
git clone --depth 1 https://github.com/hasaneyldrm/exercises-dataset /tmp/ds
|
||||
cp /tmp/ds/images/*.jpg /out/img/ && cp /tmp/ds/videos/*.gif /out/gif/
|
||||
echo "✓ Exercise media ready ($$(ls /out/img | wc -l) images)."
|
||||
@@ -24,7 +35,7 @@ services:
|
||||
# Passkey auth + per-user data (Node, no framework).
|
||||
# image: prebuilt (docker compose pull). build: from source (docker compose up --build).
|
||||
api:
|
||||
image: ghcr.io/duartesantos8/opengym-api:latest
|
||||
image: gitea.com/duartesantos/opengym-api:latest
|
||||
build: ./api
|
||||
restart: unless-stopped
|
||||
env_file: .env
|
||||
@@ -39,7 +50,7 @@ services:
|
||||
# Builds the React frontend (multi-stage) and serves it, proxying /api → api
|
||||
# and the exercise media from the shared volume. Single origin for passkeys.
|
||||
web:
|
||||
image: ghcr.io/duartesantos8/opengym-web:latest
|
||||
image: gitea.com/duartesantos/opengym-web:latest
|
||||
build:
|
||||
context: .
|
||||
dockerfile: web/Dockerfile
|
||||
|
||||
@@ -8,10 +8,10 @@ This guide takes you from "just cloned it" to "using it from my phone over the i
|
||||
Requirements: [Docker](https://docs.docker.com/get-docker/) with the Compose plugin.
|
||||
|
||||
```bash
|
||||
git clone https://github.com/DuarteSantos8/openGym
|
||||
git clone https://gitea.com/DuarteSantos/openGym
|
||||
cd openGym
|
||||
cp .env.example .env
|
||||
docker compose pull # prebuilt images from ghcr.io (amd64 + arm64) — or skip and build from source
|
||||
docker compose pull # prebuilt images from gitea.com (amd64 + arm64) — or skip and build from source
|
||||
docker compose up -d
|
||||
```
|
||||
|
||||
|
||||
@@ -7,8 +7,8 @@ android {
|
||||
applicationId "ch.duartesantos.opengym"
|
||||
minSdkVersion rootProject.ext.minSdkVersion
|
||||
targetSdkVersion rootProject.ext.targetSdkVersion
|
||||
versionCode 8
|
||||
versionName "1.2.7"
|
||||
versionCode 9
|
||||
versionName "1.2.8"
|
||||
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
||||
aaptOptions {
|
||||
// Files and dirs to omit from the packaged assets dir, modified to accommodate modern web apps.
|
||||
|
||||
@@ -9,6 +9,7 @@ android {
|
||||
|
||||
apply from: "../capacitor-cordova-android-plugins/cordova.variables.gradle"
|
||||
dependencies {
|
||||
implementation project(':capacitor-app')
|
||||
implementation project(':capacitor-filesystem')
|
||||
implementation project(':capacitor-local-notifications')
|
||||
implementation project(':capacitor-share')
|
||||
|
||||
@@ -2,6 +2,9 @@
|
||||
include ':capacitor-android'
|
||||
project(':capacitor-android').projectDir = new File('../node_modules/@capacitor/android/capacitor')
|
||||
|
||||
include ':capacitor-app'
|
||||
project(':capacitor-app').projectDir = new File('../node_modules/@capacitor/app/android')
|
||||
|
||||
include ':capacitor-filesystem'
|
||||
project(':capacitor-filesystem').projectDir = new File('../node_modules/@capacitor/filesystem/android')
|
||||
|
||||
|
||||
@@ -11,6 +11,7 @@ install! 'cocoapods', :disable_input_output_paths => true
|
||||
def capacitor_pods
|
||||
pod 'Capacitor', :path => '../../node_modules/@capacitor/ios'
|
||||
pod 'CapacitorCordova', :path => '../../node_modules/@capacitor/ios'
|
||||
pod 'CapacitorApp', :path => '../../node_modules/@capacitor/app'
|
||||
pod 'CapacitorFilesystem', :path => '../../node_modules/@capacitor/filesystem'
|
||||
pod 'CapacitorLocalNotifications', :path => '../../node_modules/@capacitor/local-notifications'
|
||||
pod 'CapacitorShare', :path => '../../node_modules/@capacitor/share'
|
||||
|
||||
Generated
+11
-2
@@ -1,14 +1,15 @@
|
||||
{
|
||||
"name": "opengym-frontend",
|
||||
"version": "1.2.6",
|
||||
"version": "1.2.7",
|
||||
"lockfileVersion": 3,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "opengym-frontend",
|
||||
"version": "1.2.6",
|
||||
"version": "1.2.7",
|
||||
"license": "AGPL-3.0-or-later",
|
||||
"dependencies": {
|
||||
"@capacitor/app": "^7.1.2",
|
||||
"@capacitor/core": "^7.6.8",
|
||||
"@capacitor/filesystem": "^7.1.8",
|
||||
"@capacitor/local-notifications": "^7.0.7",
|
||||
@@ -62,6 +63,14 @@
|
||||
"@capacitor/core": "^7.6.0"
|
||||
}
|
||||
},
|
||||
"node_modules/@capacitor/app": {
|
||||
"version": "7.1.2",
|
||||
"resolved": "https://registry.npmjs.org/@capacitor/app/-/app-7.1.2.tgz",
|
||||
"integrity": "sha512-d4I/oF/PRu4megL7/IGKYfe5j7yzSON1FRFgq6kH+m5kH6g7V+wyjHRLauCzGNjdRx4S+nWOumINds0qcRBtKg==",
|
||||
"peerDependencies": {
|
||||
"@capacitor/core": ">=7.0.0"
|
||||
}
|
||||
},
|
||||
"node_modules/@capacitor/assets": {
|
||||
"version": "3.0.5",
|
||||
"resolved": "https://registry.npmjs.org/@capacitor/assets/-/assets-3.0.5.tgz",
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "opengym-frontend",
|
||||
"private": true,
|
||||
"version": "1.2.7",
|
||||
"version": "1.2.8",
|
||||
"type": "module",
|
||||
"scripts": {
|
||||
"dev": "vite",
|
||||
@@ -14,6 +14,7 @@
|
||||
},
|
||||
"license": "AGPL-3.0-or-later",
|
||||
"dependencies": {
|
||||
"@capacitor/app": "^7.1.2",
|
||||
"@capacitor/core": "^7.6.8",
|
||||
"@capacitor/filesystem": "^7.1.8",
|
||||
"@capacitor/local-notifications": "^7.0.7",
|
||||
|
||||
@@ -6,6 +6,7 @@ import { bindUI } from './components/ui.jsx'
|
||||
import { ACCENTS } from './lib/format.js'
|
||||
import { setLang, useLang } from './lib/i18n.js'
|
||||
import { setNav } from './lib/nav.js'
|
||||
import { initBackButton } from './lib/back.js'
|
||||
import { useWakeLock } from './lib/wakelock.js'
|
||||
import { startFlow } from './sheets.jsx'
|
||||
import Icon from './components/Icon.jsx'
|
||||
@@ -92,5 +93,11 @@ function Shell() {
|
||||
export default function App() {
|
||||
const boot = useStore(s => s.boot)
|
||||
useEffect(() => { boot() }, [boot])
|
||||
// Android system back — sheet, then page, then press-again-to-exit (see lib/back.js)
|
||||
useEffect(() => {
|
||||
let stop = null, gone = false
|
||||
initBackButton().then(fn => { if (gone) fn(); else stop = fn })
|
||||
return () => { gone = true; stop?.() }
|
||||
}, [])
|
||||
return <HashRouter><Shell /></HashRouter>
|
||||
}
|
||||
@@ -0,0 +1,62 @@
|
||||
// Android system back (the gesture and the hardware/nav button are the same event).
|
||||
//
|
||||
// Capacitor's BridgeActivity does not handle back at all — without a JS listener the
|
||||
// activity simply finishes, so a back swipe quit the app from anywhere, whatever the
|
||||
// WebView history said. That made the sheet history entries from #63 dead weight in the
|
||||
// packaged app: they only ever worked in a browser tab, where the browser walks history
|
||||
// itself.
|
||||
//
|
||||
// Once a `backButton` listener exists, the plugin stops falling through to finish() —
|
||||
// back can then ONLY leave the app through App.exitApp(), which is why the last step is
|
||||
// an explicit press-again-to-exit rather than a silent no-op.
|
||||
import { MOBILE } from './mobile.js'
|
||||
import { useUI } from '../store/useUI.js'
|
||||
import { t } from './i18n.js'
|
||||
|
||||
// How long a first back press stays armed as "press again to exit" (the toast shows 2.2s).
|
||||
export const EXIT_WINDOW = 2000
|
||||
|
||||
// What a back press means, given what is on screen. Pure, so the table below is testable.
|
||||
export function decideBack({ top, canGoBack, exitArmed }) {
|
||||
if (top) return top.locked ? 'ignore' : 'sheet' // a locked sheet swallows back on purpose
|
||||
if (canGoBack) return 'history' // a page/tab we pushed ourselves
|
||||
return exitArmed ? 'exit' : 'arm-exit'
|
||||
}
|
||||
|
||||
export function makeBackHandler({ getSheets, closeSheet, toast, goBack, exit, now = Date.now }) {
|
||||
let armedAt = -Infinity
|
||||
return (ev = {}) => {
|
||||
const sheets = getSheets()
|
||||
const action = decideBack({
|
||||
top: sheets[sheets.length - 1],
|
||||
canGoBack: !!ev.canGoBack,
|
||||
exitArmed: now() - armedAt < EXIT_WINDOW,
|
||||
})
|
||||
if (action !== 'arm-exit') armedAt = -Infinity
|
||||
if (action === 'sheet') closeSheet(sheets[sheets.length - 1].id)
|
||||
else if (action === 'history') goBack()
|
||||
else if (action === 'arm-exit') { armedAt = now(); toast(t('Press back again to exit')) }
|
||||
else if (action === 'exit') exit()
|
||||
return action
|
||||
}
|
||||
}
|
||||
|
||||
// Registers the listener for the native shell. No-op in web builds, where the browser
|
||||
// (or the PWA shell) walks history on its own and there is no plugin to talk to.
|
||||
export async function initBackButton() {
|
||||
if (!MOBILE) return () => {}
|
||||
try {
|
||||
const { App } = await import('@capacitor/app')
|
||||
const handler = makeBackHandler({
|
||||
getSheets: () => useUI.getState().sheets,
|
||||
closeSheet: id => useUI.getState().closeSheet(id),
|
||||
toast: msg => useUI.getState().toast(msg),
|
||||
goBack: () => window.history.back(),
|
||||
exit: () => App.exitApp(),
|
||||
})
|
||||
const sub = await App.addListener('backButton', handler)
|
||||
return () => sub.remove()
|
||||
} catch (e) {
|
||||
return () => {} // no plugin (older install): leave back to the default behaviour
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,103 @@
|
||||
// @vitest-environment happy-dom
|
||||
import { describe, expect, it } from 'vitest'
|
||||
import { decideBack, makeBackHandler, EXIT_WINDOW } from './back.js'
|
||||
|
||||
// Back on Android has to serve three layers with one event: the sheet stack on top, the
|
||||
// page history under it, and — because a registered listener stops the plugin from ever
|
||||
// finishing the activity itself — a deliberate way out of the app at the bottom.
|
||||
describe('decideBack', () => {
|
||||
it('dismisses the top sheet before touching history', () => {
|
||||
expect(decideBack({ top: { id: 's1' }, canGoBack: true, exitArmed: false })).toBe('sheet')
|
||||
})
|
||||
|
||||
it('lets a locked sheet swallow the press', () => {
|
||||
expect(decideBack({ top: { id: 's1', locked: true }, canGoBack: true, exitArmed: true })).toBe('ignore')
|
||||
})
|
||||
|
||||
it('walks history when nothing is open', () => {
|
||||
expect(decideBack({ top: undefined, canGoBack: true, exitArmed: false })).toBe('history')
|
||||
})
|
||||
|
||||
it('arms the exit at the bottom of the stack, and exits on the second press', () => {
|
||||
expect(decideBack({ top: undefined, canGoBack: false, exitArmed: false })).toBe('arm-exit')
|
||||
expect(decideBack({ top: undefined, canGoBack: false, exitArmed: true })).toBe('exit')
|
||||
})
|
||||
})
|
||||
|
||||
function harness() {
|
||||
const calls = { closed: [], toasts: [], back: 0, exit: 0 }
|
||||
let sheets = []
|
||||
let now = 1000
|
||||
const handler = makeBackHandler({
|
||||
getSheets: () => sheets,
|
||||
closeSheet: id => { calls.closed.push(id); sheets = sheets.filter(s => s.id !== id) },
|
||||
toast: m => calls.toasts.push(m),
|
||||
goBack: () => { calls.back++ },
|
||||
exit: () => { calls.exit++ },
|
||||
now: () => now,
|
||||
})
|
||||
return { calls, handler, setSheets: s => { sheets = s }, tick: ms => { now += ms } }
|
||||
}
|
||||
|
||||
describe('makeBackHandler', () => {
|
||||
it('closes stacked sheets one press at a time', () => {
|
||||
const h = harness()
|
||||
h.setSheets([{ id: 'a' }, { id: 'b' }])
|
||||
expect(h.handler({ canGoBack: true })).toBe('sheet')
|
||||
expect(h.handler({ canGoBack: true })).toBe('sheet')
|
||||
expect(h.calls.closed).toEqual(['b', 'a'])
|
||||
expect(h.calls.back).toBe(0)
|
||||
})
|
||||
|
||||
it('does not close a locked sheet, and does not arm the exit behind it', () => {
|
||||
const h = harness()
|
||||
h.setSheets([{ id: 'a', locked: true }])
|
||||
expect(h.handler({ canGoBack: false })).toBe('ignore')
|
||||
expect(h.calls.closed).toEqual([])
|
||||
expect(h.calls.toasts).toEqual([])
|
||||
expect(h.calls.exit).toBe(0)
|
||||
})
|
||||
|
||||
it('goes back a page while the WebView still has app history', () => {
|
||||
const h = harness()
|
||||
expect(h.handler({ canGoBack: true })).toBe('history')
|
||||
expect(h.calls.back).toBe(1)
|
||||
expect(h.calls.exit).toBe(0)
|
||||
})
|
||||
|
||||
// The whole point of the fix: one press at the root must never be the end of the app.
|
||||
it('warns once, then exits on a second press inside the window', () => {
|
||||
const h = harness()
|
||||
expect(h.handler({ canGoBack: false })).toBe('arm-exit')
|
||||
expect(h.calls.toasts).toHaveLength(1)
|
||||
expect(h.calls.exit).toBe(0)
|
||||
h.tick(EXIT_WINDOW - 1)
|
||||
expect(h.handler({ canGoBack: false })).toBe('exit')
|
||||
expect(h.calls.exit).toBe(1)
|
||||
})
|
||||
|
||||
it('re-arms rather than exiting once the window has passed', () => {
|
||||
const h = harness()
|
||||
h.handler({ canGoBack: false })
|
||||
h.tick(EXIT_WINDOW + 1)
|
||||
expect(h.handler({ canGoBack: false })).toBe('arm-exit')
|
||||
expect(h.calls.exit).toBe(0)
|
||||
expect(h.calls.toasts).toHaveLength(2)
|
||||
})
|
||||
|
||||
// A sheet opened (or a page pushed) after the warning means the user is still using the
|
||||
// app — the next back belongs to that sheet, and the one after must warn again.
|
||||
it('disarms the exit as soon as another press does real work', () => {
|
||||
const h = harness()
|
||||
h.handler({ canGoBack: false })
|
||||
h.setSheets([{ id: 'a' }])
|
||||
expect(h.handler({ canGoBack: true })).toBe('sheet')
|
||||
expect(h.handler({ canGoBack: false })).toBe('arm-exit')
|
||||
expect(h.calls.exit).toBe(0)
|
||||
})
|
||||
|
||||
it('treats a missing event payload as no history', () => {
|
||||
const h = harness()
|
||||
expect(h.handler()).toBe('arm-exit')
|
||||
})
|
||||
})
|
||||
@@ -11,4 +11,4 @@
|
||||
// lands in a self-hosted bundle.
|
||||
export const DEMO = import.meta.env.VITE_DEMO === '1'
|
||||
export const DEMO_SEEDED = 'gym_demo_seeded_v1'
|
||||
export const REPO = 'https://github.com/DuarteSantos8/openGym'
|
||||
export const REPO = 'https://gitea.com/DuarteSantos/openGym'
|
||||
@@ -3,6 +3,7 @@ export default {
|
||||
// --- generic ---
|
||||
'Confirm': 'Bestätigen',
|
||||
'Cancel': 'Abbrechen',
|
||||
'Press back again to exit': 'Zum Beenden erneut zurück drücken',
|
||||
'Delete': 'Löschen',
|
||||
'Save': 'Speichern',
|
||||
'Import': 'Importieren',
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
export default {
|
||||
'Confirm': 'Confirmar',
|
||||
'Cancel': 'Cancelar',
|
||||
'Press back again to exit': 'Pulsa atrás otra vez para salir',
|
||||
'Delete': 'Eliminar',
|
||||
'Save': 'Guardar',
|
||||
'Import': 'Importar',
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
export default {
|
||||
'Confirm': 'Confirmer',
|
||||
'Cancel': 'Annuler',
|
||||
'Press back again to exit': 'Appuyez de nouveau pour quitter',
|
||||
'Delete': 'Supprimer',
|
||||
'Save': 'Enregistrer',
|
||||
'Import': 'Importer',
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
export default {
|
||||
'Confirm': 'पुष्टि करें',
|
||||
'Cancel': 'रद्द करें',
|
||||
'Press back again to exit': 'बाहर निकलने के लिए फिर से बैक दबाएँ',
|
||||
'Delete': 'हटाएँ',
|
||||
'Save': 'सहेजें',
|
||||
'Import': 'आयात करें',
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
export default {
|
||||
'Confirm': 'Conferma',
|
||||
'Cancel': 'Annulla',
|
||||
'Press back again to exit': 'Premi di nuovo indietro per uscire',
|
||||
'Delete': 'Elimina',
|
||||
'Save': 'Salva',
|
||||
'Import': 'Importa',
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
export default {
|
||||
'Confirm': '확인',
|
||||
'Cancel': '취소',
|
||||
'Press back again to exit': '뒤로를 한 번 더 누르면 종료됩니다',
|
||||
'Delete': '삭제',
|
||||
'Save': '저장',
|
||||
'Import': '가져오기',
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
export default {
|
||||
'Confirm': 'Potwierdź',
|
||||
'Cancel': 'Anuluj',
|
||||
'Press back again to exit': 'Naciśnij wstecz ponownie, aby wyjść',
|
||||
'Delete': 'Usuń',
|
||||
'Save': 'Zapisz',
|
||||
'Import': 'Importuj',
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
export default {
|
||||
'Confirm': 'Confirmar',
|
||||
'Cancel': 'Cancelar',
|
||||
'Press back again to exit': 'Prima novamente para sair',
|
||||
'Delete': 'Eliminar',
|
||||
'Save': 'Guardar',
|
||||
'Import': 'Importar',
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
export default {
|
||||
'Confirm': 'Подтвердить',
|
||||
'Cancel': 'Отмена',
|
||||
'Press back again to exit': 'Нажмите «Назад» ещё раз, чтобы выйти',
|
||||
'Delete': 'Удалить',
|
||||
'Save': 'Сохранить',
|
||||
'Import': 'Импорт',
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
export default {
|
||||
'Confirm': 'Onayla',
|
||||
'Cancel': 'İptal',
|
||||
'Press back again to exit': 'Çıkmak için geri tuşuna tekrar basın',
|
||||
'Delete': 'Sil',
|
||||
'Save': 'Kaydet',
|
||||
'Import': 'İçe aktar',
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
export default {
|
||||
'Confirm': '确认',
|
||||
'Cancel': '取消',
|
||||
'Press back again to exit': '再按一次返回退出',
|
||||
'Delete': '删除',
|
||||
'Save': '保存',
|
||||
'Import': '导入',
|
||||
|
||||
@@ -196,7 +196,8 @@ export default function Settings() {
|
||||
|
||||
<div className="dim small" style={{ textAlign: 'center', marginTop: 4, lineHeight: 1.6 }}>
|
||||
openGym · {t('free & open source (AGPL v3)')}<br />
|
||||
<a href="https://github.com/DuarteSantos8/openGym" target="_blank" rel="noopener">source code</a> · exercise data: hasaneyldrm/exercises-dataset (CC)
|
||||
<a href="https://gitea.com/DuarteSantos/openGym" target="_blank" rel="noopener">source code</a> · exercise data: hasaneyldrm/exercises-dataset (MIT)<br />
|
||||
exercise images and animations © <a href="https://gymvisual.com/" target="_blank" rel="noopener">Gym visual</a>
|
||||
</div>
|
||||
</div>
|
||||
}
|
||||
|
||||
+19
-1
@@ -4,8 +4,26 @@ import react from '@vitejs/plugin-react'
|
||||
const backend = process.env.API_TARGET || 'http://127.0.0.1:3000'
|
||||
const media = process.env.MEDIA_TARGET || 'http://127.0.0.1:8888'
|
||||
|
||||
// Optional web analytics (Umami). Injected only when BOTH vars are set at build time,
|
||||
// so a plain `npm run build` — and every self-hosted install — stays telemetry-free.
|
||||
// Set for the public instance: VITE_UMAMI_SRC=https://stats.example/script.js VITE_UMAMI_ID=<uuid>
|
||||
const umamiSrc = process.env.VITE_UMAMI_SRC
|
||||
const umamiId = process.env.VITE_UMAMI_ID
|
||||
|
||||
const umami = {
|
||||
name: 'opengym-umami',
|
||||
transformIndexHtml() {
|
||||
if (!umamiSrc || !umamiId) return
|
||||
return [{
|
||||
tag: 'script',
|
||||
attrs: { defer: true, src: umamiSrc, 'data-website-id': umamiId },
|
||||
injectTo: 'head'
|
||||
}]
|
||||
}
|
||||
}
|
||||
|
||||
export default defineConfig({
|
||||
plugins: [react()],
|
||||
plugins: [react(), umami],
|
||||
base: './',
|
||||
server: {
|
||||
proxy: {
|
||||
|
||||
+12
-1
@@ -1,11 +1,22 @@
|
||||
#!/usr/bin/env bash
|
||||
# Manually download the exercise images (JPG) and animations (GIF) into ./media.
|
||||
# You normally DON'T need this — `docker compose up` fetches them automatically.
|
||||
# Source: hasaneyldrm/exercises-dataset (CC).
|
||||
# Source: hasaneyldrm/exercises-dataset — MIT for the metadata and instruction text, but the
|
||||
# images and GIFs are © Gym visual (https://gymvisual.com/), used under that dataset's terms.
|
||||
# openGym does not redistribute or relicense them. See NOTICE.md.
|
||||
set -euo pipefail
|
||||
cd "$(dirname "$0")/.."
|
||||
tmp="$(mktemp -d)"
|
||||
trap 'rm -rf "$tmp"' EXIT
|
||||
cat <<'EOF'
|
||||
↓ Downloading exercise media (~140 MB) from github.com/hasaneyldrm/exercises-dataset
|
||||
Metadata and instruction text: MIT.
|
||||
Images and animations: © Gym visual — https://gymvisual.com/
|
||||
Used under that dataset's terms, not openGym's AGPL; openGym does not redistribute them.
|
||||
Terms: https://gymvisual.com/content/3-terms-and-conditions-of-use
|
||||
Reusing this media yourself, commercially or not, needs your own licence from Gym visual.
|
||||
Details in NOTICE.md.
|
||||
EOF
|
||||
git clone --depth 1 https://github.com/hasaneyldrm/exercises-dataset "$tmp"
|
||||
mkdir -p media/img media/gif
|
||||
cp "$tmp"/images/*.jpg media/img/
|
||||
|
||||
+4
-4
@@ -19,12 +19,12 @@ ARG VERSION=dev
|
||||
ARG VCS_REF=dev
|
||||
ARG BUILD_DATE=unknown
|
||||
|
||||
LABEL maintainer="Duarte Santos https://github.com/DuarteSantos8" \
|
||||
LABEL maintainer="Duarte Santos https://gitea.com/DuarteSantos" \
|
||||
org.opencontainers.image.title="opengym-web" \
|
||||
org.opencontainers.image.description="Frontend for Self-hosted gym & body-weight tracker — plan routines, log workouts (supersets & cardio too), track your weight and progress, passkey login. Your data, your server." \
|
||||
org.opencontainers.image.source="https://github.com/DuarteSantos8/openGym" \
|
||||
org.opencontainers.image.url="https://ghcr.io/duartesantos8/opengym-web" \
|
||||
org.opencontainers.image.documentation="https://github.com/DuarteSantos8/openGym#readme" \
|
||||
org.opencontainers.image.source="https://gitea.com/DuarteSantos/openGym" \
|
||||
org.opencontainers.image.url="https://gitea.com/DuarteSantos/-/packages/container/opengym-web" \
|
||||
org.opencontainers.image.documentation="https://gitea.com/DuarteSantos/openGym#readme" \
|
||||
org.opencontainers.image.licenses="AGPL-3.0-or-later" \
|
||||
org.opencontainers.image.version=$VERSION \
|
||||
org.opencontainers.image.revision=$VCS_REF \
|
||||
|
||||
+4
-1
@@ -10,4 +10,7 @@ Not in this folder (added at deploy time):
|
||||
icons the PWA uses, so the browser tab, home screen and app all match)
|
||||
- `openGym.apk` — the signed release build (see `../docs/MOBILE.md`)
|
||||
|
||||
`site.js` fetches the star/fork counts from the public GitHub API at view time.
|
||||
`site.js` fetches the star/issue counts and the release timeline from the public
|
||||
gitea.com API at view time. It pointed at api.github.com until that account was
|
||||
suspended; the two URLs go back once it is restored, together with the notice
|
||||
block at the top of `index.html` and the demo iframe.
|
||||
+29
-6
@@ -9,7 +9,9 @@
|
||||
<link rel="icon" type="image/png" sizes="512x512" href="icon-512.png">
|
||||
<link rel="icon" type="image/png" sizes="180x180" href="icon-180.png">
|
||||
<link rel="apple-touch-icon" href="icon-180.png">
|
||||
<link rel="stylesheet" href="styles.css">
|
||||
<link rel="stylesheet" href="styles.css?v=3">
|
||||
<!-- Umami web analytics for opengym.duarte-santos.ch (self-hosted, cookieless). -->
|
||||
<script defer src="https://stats.duarte-santos.ch/script.js" data-website-id="db36019e-50f4-453c-9c56-d0588aefe233"></script>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
@@ -24,11 +26,31 @@
|
||||
<a href="/#demo" class="hide-s">Demo</a>
|
||||
<a href="docs.html">Docs</a>
|
||||
<a href="about.html" class="hide-s">About</a>
|
||||
<a href="https://github.com/DuarteSantos8/openGym" rel="noopener"><span data-gh="stars">GitHub</span></a>
|
||||
<a href="https://gitea.com/DuarteSantos/openGym" rel="noopener"><span data-gh="stars">Gitea</span></a>
|
||||
<a href="https://discord.gg/e62jY6fwVb" rel="noopener">Discord</a>
|
||||
<a class="cta" href="/#download">Download</a>
|
||||
</div>
|
||||
</div></nav>
|
||||
|
||||
<!-- TEMPORARY: GitHub account suspended -> repo lives on gitea.com. Remove this block and
|
||||
revert the links (+ site.js) to github.com once the account is restored. -->
|
||||
<div class="alert" role="alert"><div class="wrap">
|
||||
<div class="alert-tag">⚠️ Important notice</div>
|
||||
<h2>My GitHub account has been suspended — the openGym repo is gone with it</h2>
|
||||
<p><b>github.com/DuarteSantos8/openGym is offline.</b> The repository, the releases and the
|
||||
GitHub-Pages demo are all unreachable — not by choice. openGym itself is unaffected:
|
||||
the app, the APK on this page and every self-hosted install keep working exactly as before.</p>
|
||||
<p>Until I get the account back, the code lives here — and the Discord is where I will announce
|
||||
the moment it is resolved:</p>
|
||||
<div class="alert-actions">
|
||||
<a class="btn alert-btn" href="https://gitea.com/DuarteSantos/openGym" rel="noopener">gitea.com/DuarteSantos/openGym</a>
|
||||
<a class="btn dc-btn" href="https://discord.gg/e62jY6fwVb" rel="noopener">Join the Discord</a>
|
||||
</div>
|
||||
<p class="alert-note">Every repository link on this site now points at that mirror — same code,
|
||||
same AGPL-3.0 license, same history.</p>
|
||||
</div></div>
|
||||
|
||||
|
||||
<main class="wrap prose">
|
||||
<h1>About openGym</h1>
|
||||
<p class="lead">openGym wasn't planned as a product. It started as a tiny app I built for
|
||||
@@ -74,7 +96,7 @@
|
||||
<p>Docker-Compose self-hosting, passkey profiles, guided workouts, 1,324-exercise
|
||||
library. AGPL from day one.</p></li>
|
||||
<li data-fallback><b>Every release since</b><span class="when">ongoing</span>
|
||||
<p>See the full list on <a href="https://github.com/DuarteSantos8/openGym/releases" rel="noopener">GitHub → Releases</a>.</p></li>
|
||||
<p>See the full list on <a href="https://gitea.com/DuarteSantos/openGym/releases" rel="noopener">Gitea → Releases</a>.</p></li>
|
||||
</ul>
|
||||
|
||||
<h2>Principles</h2>
|
||||
@@ -91,7 +113,7 @@
|
||||
|
||||
<div class="hero-btns" style="justify-content:flex-start;margin:30px 0 10px">
|
||||
<a class="btn" href="/#download">Get openGym</a>
|
||||
<a class="btn ghost" href="https://github.com/DuarteSantos8/openGym" rel="noopener">Star it on GitHub</a>
|
||||
<a class="btn ghost" href="https://gitea.com/DuarteSantos/openGym" rel="noopener">Star it on Gitea</a>
|
||||
</div>
|
||||
</main>
|
||||
|
||||
@@ -100,8 +122,9 @@
|
||||
<div class="links">
|
||||
<a href="docs.html">Docs</a>
|
||||
<a href="about.html" class="hide-s">About</a>
|
||||
<a href="https://github.com/DuarteSantos8/openGym" rel="noopener">GitHub</a>
|
||||
<a href="https://duartesantos8.github.io/openGym/" rel="noopener">Live demo</a>
|
||||
<a href="https://gitea.com/DuarteSantos/openGym" rel="noopener">Gitea</a>
|
||||
<a href="https://discord.gg/e62jY6fwVb" rel="noopener">Discord</a>
|
||||
<a href="/#download">Download</a>
|
||||
</div>
|
||||
</div></footer>
|
||||
|
||||
|
||||
+44
-14
@@ -9,7 +9,9 @@
|
||||
<link rel="icon" type="image/png" sizes="512x512" href="icon-512.png">
|
||||
<link rel="icon" type="image/png" sizes="180x180" href="icon-180.png">
|
||||
<link rel="apple-touch-icon" href="icon-180.png">
|
||||
<link rel="stylesheet" href="styles.css">
|
||||
<link rel="stylesheet" href="styles.css?v=3">
|
||||
<!-- Umami web analytics for opengym.duarte-santos.ch (self-hosted, cookieless). -->
|
||||
<script defer src="https://stats.duarte-santos.ch/script.js" data-website-id="db36019e-50f4-453c-9c56-d0588aefe233"></script>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
@@ -24,16 +26,36 @@
|
||||
<a href="/#demo" class="hide-s">Demo</a>
|
||||
<a href="docs.html">Docs</a>
|
||||
<a href="about.html" class="hide-s">About</a>
|
||||
<a href="https://github.com/DuarteSantos8/openGym" rel="noopener"><span data-gh="stars">GitHub</span></a>
|
||||
<a href="https://gitea.com/DuarteSantos/openGym" rel="noopener"><span data-gh="stars">Gitea</span></a>
|
||||
<a href="https://discord.gg/e62jY6fwVb" rel="noopener">Discord</a>
|
||||
<a class="cta" href="/#download">Download</a>
|
||||
</div>
|
||||
</div></nav>
|
||||
|
||||
<!-- TEMPORARY: GitHub account suspended -> repo lives on gitea.com. Remove this block and
|
||||
revert the links (+ site.js) to github.com once the account is restored. -->
|
||||
<div class="alert" role="alert"><div class="wrap">
|
||||
<div class="alert-tag">⚠️ Important notice</div>
|
||||
<h2>My GitHub account has been suspended — the openGym repo is gone with it</h2>
|
||||
<p><b>github.com/DuarteSantos8/openGym is offline.</b> The repository, the releases and the
|
||||
GitHub-Pages demo are all unreachable — not by choice. openGym itself is unaffected:
|
||||
the app, the APK on this page and every self-hosted install keep working exactly as before.</p>
|
||||
<p>Until I get the account back, the code lives here — and the Discord is where I will announce
|
||||
the moment it is resolved:</p>
|
||||
<div class="alert-actions">
|
||||
<a class="btn alert-btn" href="https://gitea.com/DuarteSantos/openGym" rel="noopener">gitea.com/DuarteSantos/openGym</a>
|
||||
<a class="btn dc-btn" href="https://discord.gg/e62jY6fwVb" rel="noopener">Join the Discord</a>
|
||||
</div>
|
||||
<p class="alert-note">Every repository link on this site now points at that mirror — same code,
|
||||
same AGPL-3.0 license, same history.</p>
|
||||
</div></div>
|
||||
|
||||
|
||||
<main class="wrap prose">
|
||||
<h1>Docs</h1>
|
||||
<p class="lead">Everything you need to get openGym running — on a phone, or on your own
|
||||
server. The deeper, maintainer-level docs live
|
||||
<a href="https://github.com/DuarteSantos8/openGym/tree/main/docs" rel="noopener">in the repository</a>.</p>
|
||||
<a href="https://gitea.com/DuarteSantos/openGym/src/branch/main/docs" rel="noopener">in the repository</a>.</p>
|
||||
|
||||
<div class="toc">
|
||||
<a href="#android">Android</a>
|
||||
@@ -70,16 +92,16 @@
|
||||
<li><b>Build it onto your own iPhone:</b> with a Mac and Xcode, the native app runs on
|
||||
your device with a free Apple ID (Apple expires the signature after 7 days; re-run
|
||||
from Xcode to renew). See
|
||||
<a href="https://github.com/DuarteSantos8/openGym/blob/main/docs/MOBILE.md" rel="noopener">docs/MOBILE.md</a>.</li>
|
||||
<li><b>Just looking?</b> The <a href="https://duartesantos8.github.io/openGym/" rel="noopener">live demo</a>
|
||||
runs in any browser with example data.</li>
|
||||
<a href="https://gitea.com/DuarteSantos/openGym/src/branch/main/docs/MOBILE.md" rel="noopener">docs/MOBILE.md</a>.</li>
|
||||
<li><b>Just looking?</b> The in-browser demo was hosted on GitHub Pages and is offline
|
||||
while my GitHub account is suspended — the Android app above needs no account either.</li>
|
||||
</ul>
|
||||
|
||||
<h2 id="selfhost">Self-host with Docker</h2>
|
||||
<p>The self-hosted flavor adds passkey profiles, sync across devices, and (optionally) an
|
||||
admin dashboard. You need <a href="https://docs.docker.com/get-docker/" rel="noopener">Docker</a>
|
||||
with Compose:</p>
|
||||
<pre><code>git clone https://github.com/DuarteSantos8/openGym
|
||||
<pre><code>git clone https://gitea.com/DuarteSantos/openGym
|
||||
cd openGym
|
||||
cp .env.example .env
|
||||
docker compose pull # prebuilt images (amd64 + arm64) — skip to build from source
|
||||
@@ -89,7 +111,7 @@ docker compose up -d</code></pre>
|
||||
<div class="note">Want it reachable from your phone with passkeys? You'll need an HTTPS
|
||||
domain — a two-line change in <code>.env</code>. The full guide, including reverse-proxy
|
||||
examples and the invite-only/admin options, is in
|
||||
<a href="https://github.com/DuarteSantos8/openGym/blob/main/docs/SELF_HOSTING.md" rel="noopener">docs/SELF_HOSTING.md</a>.</div>
|
||||
<a href="https://gitea.com/DuarteSantos/openGym/src/branch/main/docs/SELF_HOSTING.md" rel="noopener">docs/SELF_HOSTING.md</a>.</div>
|
||||
|
||||
<h3>Settings worth knowing about</h3>
|
||||
<p>All of these live in <code>.env</code>; the defaults are what you get if you touch nothing.</p>
|
||||
@@ -111,7 +133,7 @@ docker compose up -d</code></pre>
|
||||
<p>It runs on your machine, is spawned by the client, and reads your exported data directly.
|
||||
Nothing is sent anywhere, and it is <b>not part of the Docker build</b> — if you don't use
|
||||
an AI assistant, it simply isn't there. Setup is a few lines of client config:
|
||||
<a href="https://github.com/DuarteSantos8/openGym/blob/main/mcp/README.md" rel="noopener">mcp/README.md</a>.</p>
|
||||
<a href="https://gitea.com/DuarteSantos/openGym/src/branch/main/mcp/README.md" rel="noopener">mcp/README.md</a>.</p>
|
||||
|
||||
<h2 id="import">Import your training history</h2>
|
||||
<p>Coming from another tracker? <b>Settings → Data → Import from another app</b> reads:</p>
|
||||
@@ -141,7 +163,7 @@ docker compose up -d</code></pre>
|
||||
inside the container — no local Node needed.</li>
|
||||
<li><b>Android APK / iOS app:</b> the Capacitor projects live in <code>frontend/android</code>
|
||||
and <code>frontend/ios</code> — build, signing and distribution notes are in
|
||||
<a href="https://github.com/DuarteSantos8/openGym/blob/main/docs/MOBILE.md" rel="noopener">docs/MOBILE.md</a>.</li>
|
||||
<a href="https://gitea.com/DuarteSantos/openGym/src/branch/main/docs/MOBILE.md" rel="noopener">docs/MOBILE.md</a>.</li>
|
||||
</ul>
|
||||
|
||||
<h2 id="faq">FAQ</h2>
|
||||
@@ -161,8 +183,15 @@ docker compose up -d</code></pre>
|
||||
own hardware, synced across devices, with profiles for the people you train with: self-host.
|
||||
You can start with the app and move to a server later — the backup file migrates everything.</p>
|
||||
<h3>Where does the exercise database come from?</h3>
|
||||
<p>From <a href="https://github.com/hasaneyldrm/exercises-dataset" rel="noopener">hasaneyldrm/exercises-dataset</a>
|
||||
(CC-licensed): 1,324 exercises with animations and instructions in 10 languages.</p>
|
||||
<p>From <a href="https://github.com/hasaneyldrm/exercises-dataset" rel="noopener">hasaneyldrm/exercises-dataset</a>:
|
||||
1,324 exercises with animations and instructions in 10 languages. That dataset licenses the two
|
||||
halves differently, and so does openGym: the exercise metadata and instruction text are
|
||||
<b>MIT</b>, while the images and animations are
|
||||
<b>© <a href="https://gymvisual.com/" rel="noopener">Gym visual</a></b>, used under the
|
||||
dataset's terms rather than openGym's AGPL.</p>
|
||||
<p>openGym does not redistribute that media — your instance downloads it from the upstream source on
|
||||
first run. If you want to reuse it yourself, commercially or otherwise, get your own licence from
|
||||
Gym visual first (<a href="https://gymvisual.com/content/3-terms-and-conditions-of-use" rel="noopener">terms & conditions</a>).</p>
|
||||
</main>
|
||||
|
||||
<footer><div class="wrap foot">
|
||||
@@ -170,8 +199,9 @@ docker compose up -d</code></pre>
|
||||
<div class="links">
|
||||
<a href="docs.html">Docs</a>
|
||||
<a href="about.html" class="hide-s">About</a>
|
||||
<a href="https://github.com/DuarteSantos8/openGym" rel="noopener">GitHub</a>
|
||||
<a href="https://duartesantos8.github.io/openGym/" rel="noopener">Live demo</a>
|
||||
<a href="https://gitea.com/DuarteSantos/openGym" rel="noopener">Gitea</a>
|
||||
<a href="https://discord.gg/e62jY6fwVb" rel="noopener">Discord</a>
|
||||
<a href="/#download">Download</a>
|
||||
</div>
|
||||
</div></footer>
|
||||
|
||||
|
||||
+61
-18
@@ -14,7 +14,9 @@
|
||||
<link rel="icon" type="image/png" sizes="512x512" href="icon-512.png">
|
||||
<link rel="icon" type="image/png" sizes="180x180" href="icon-180.png">
|
||||
<link rel="apple-touch-icon" href="icon-180.png">
|
||||
<link rel="stylesheet" href="styles.css">
|
||||
<link rel="stylesheet" href="styles.css?v=3">
|
||||
<!-- Umami web analytics for opengym.duarte-santos.ch (self-hosted, cookieless). -->
|
||||
<script defer src="https://stats.duarte-santos.ch/script.js" data-website-id="db36019e-50f4-453c-9c56-d0588aefe233"></script>
|
||||
<script type="application/ld+json">
|
||||
{"@context":"https://schema.org","@type":"SoftwareApplication","name":"openGym",
|
||||
"operatingSystem":"Android, Web","applicationCategory":"HealthApplication",
|
||||
@@ -38,11 +40,31 @@
|
||||
<a href="#demo" class="hide-s">Demo</a>
|
||||
<a href="docs.html">Docs</a>
|
||||
<a href="about.html" class="hide-s">About</a>
|
||||
<a href="https://github.com/DuarteSantos8/openGym" rel="noopener"><span data-gh="stars">GitHub</span></a>
|
||||
<a href="https://gitea.com/DuarteSantos/openGym" rel="noopener"><span data-gh="stars">Gitea</span></a>
|
||||
<a href="https://discord.gg/e62jY6fwVb" rel="noopener">Discord</a>
|
||||
<a class="cta" href="#download">Download</a>
|
||||
</div>
|
||||
</div></nav>
|
||||
|
||||
<!-- TEMPORARY: GitHub account suspended -> repo lives on gitea.com. Remove this block and
|
||||
revert the links (+ site.js) to github.com once the account is restored. -->
|
||||
<div class="alert" role="alert"><div class="wrap">
|
||||
<div class="alert-tag">⚠️ Important notice</div>
|
||||
<h2>My GitHub account has been suspended — the openGym repo is gone with it</h2>
|
||||
<p><b>github.com/DuarteSantos8/openGym is offline.</b> The repository, the releases and the
|
||||
GitHub-Pages demo are all unreachable — not by choice. openGym itself is unaffected:
|
||||
the app, the APK on this page and every self-hosted install keep working exactly as before.</p>
|
||||
<p>Until I get the account back, the code lives here — and the Discord is where I will announce
|
||||
the moment it is resolved:</p>
|
||||
<div class="alert-actions">
|
||||
<a class="btn alert-btn" href="https://gitea.com/DuarteSantos/openGym" rel="noopener">gitea.com/DuarteSantos/openGym</a>
|
||||
<a class="btn dc-btn" href="https://discord.gg/e62jY6fwVb" rel="noopener">Join the Discord</a>
|
||||
</div>
|
||||
<p class="alert-note">Every repository link on this site now points at that mirror — same code,
|
||||
same AGPL-3.0 license, same history.</p>
|
||||
</div></div>
|
||||
|
||||
|
||||
<header class="hero"><div class="wrap">
|
||||
<div class="logo">
|
||||
<img src="icon-512.png" alt="openGym icon" width="108" height="108" style="border-radius:26px">
|
||||
@@ -54,10 +76,22 @@
|
||||
<div class="hero-btns">
|
||||
<a class="btn" href="#download">Get openGym</a>
|
||||
<a class="btn ghost" href="#demo">Try the live demo</a>
|
||||
<a class="btn ghost" href="https://github.com/DuarteSantos8/openGym" rel="noopener">GitHub <span class="ct" data-gh="stars">★</span></a>
|
||||
<a class="btn ghost" href="https://gitea.com/DuarteSantos/openGym" rel="noopener">Gitea <span class="ct" data-gh="stars">★</span></a>
|
||||
</div>
|
||||
</div></header>
|
||||
|
||||
<div class="dc-wrap"><div class="wrap">
|
||||
<div class="dc">
|
||||
<div class="dc-icon"><svg viewBox="0 0 71 55" width="44" height="34" aria-hidden="true"><path d="M60.1045 4.8978C55.5792 2.8214 50.7265 1.2916 45.6527 0.41542C45.5603 0.39851 45.468 0.440769 45.4204 0.525289C44.7963 1.6353 44.105 3.0834 43.6209 4.2216C38.1637 3.4046 32.7345 3.4046 27.3892 4.2216C26.905 3.0581 26.1886 1.6353 25.5617 0.525289C25.5141 0.443589 25.4218 0.40133 25.3294 0.41542C20.2584 1.2888 15.4057 2.8186 10.8776 4.8978C10.8384 4.9147 10.8048 4.9429 10.7825 4.9795C1.57795 18.7309 -0.943561 32.1443 0.293408 45.3914C0.299005 45.4562 0.335386 45.5182 0.385761 45.5576C6.45866 50.0174 12.3413 52.7249 18.1147 54.5195C18.2071 54.5477 18.305 54.5139 18.3638 54.4378C19.7295 52.5728 20.9469 50.6063 21.9907 48.5383C22.0523 48.4172 21.9935 48.2735 21.8676 48.2256C19.9366 47.4931 18.0979 46.6 16.3292 45.5858C16.1893 45.5041 16.1781 45.304 16.3068 45.2082C16.679 44.9293 17.0513 44.6391 17.4067 44.3461C17.4711 44.2926 17.5606 44.2813 17.6362 44.3151C29.2558 49.6217 41.8354 49.6217 53.3179 44.3151C53.3935 44.2785 53.483 44.2898 53.5502 44.3433C53.9057 44.6363 54.2779 44.9293 54.6529 45.2082C54.7816 45.304 54.7732 45.5041 54.6333 45.5858C52.8646 46.6197 51.0259 47.4931 49.0921 48.2228C48.9662 48.2707 48.9102 48.4172 48.9718 48.5383C50.038 50.6034 51.2554 52.5699 52.5959 54.435C52.6519 54.5139 52.7526 54.5477 52.845 54.5195C58.6464 52.7249 64.529 50.0174 70.6019 45.5576C70.6551 45.5182 70.6887 45.459 70.6943 45.3942C72.1747 30.0791 68.2147 16.7757 60.1968 4.9823C60.1772 4.9429 60.1437 4.9147 60.1045 4.8978ZM23.7259 37.3253C20.2276 37.3253 17.3451 34.1136 17.3451 30.1693C17.3451 26.225 20.1717 23.0133 23.7259 23.0133C27.308 23.0133 30.1626 26.2532 30.1066 30.1693C30.1066 34.1136 27.28 37.3253 23.7259 37.3253ZM47.3178 37.3253C43.8196 37.3253 40.9371 34.1136 40.9371 30.1693C40.9371 26.225 43.7636 23.0133 47.3178 23.0133C50.9 23.0133 53.7545 26.2532 53.6986 30.1693C53.6986 34.1136 50.9 37.3253 47.3178 37.3253Z"/></svg></div>
|
||||
<div class="dc-body">
|
||||
<h3>Join the openGym Discord</h3>
|
||||
<p>Release announcements, self-hosting help with Docker, reverse proxies and passkeys,
|
||||
and somewhere to report a bug. It is where you will hear about a new version first.</p>
|
||||
</div>
|
||||
<a class="btn" href="https://discord.gg/e62jY6fwVb" rel="noopener">Join the Discord</a>
|
||||
</div>
|
||||
</div></div>
|
||||
|
||||
<section id="features"><div class="wrap">
|
||||
<p class="kicker">Everything a training log needs</p>
|
||||
<h2>Built in the gym, not in a boardroom</h2>
|
||||
@@ -101,14 +135,18 @@
|
||||
|
||||
<section id="demo"><div class="wrap">
|
||||
<p class="kicker">Live demo</p>
|
||||
<h2>Try it right here</h2>
|
||||
<p class="lead">This is the real app with seeded example data, running in your browser —
|
||||
poke around, start a workout, change anything.</p>
|
||||
<div class="demo-wrap">
|
||||
<div class="phone"><iframe src="https://duartesantos8.github.io/openGym/" title="openGym live demo" loading="lazy"></iframe></div>
|
||||
<h2>Temporarily offline</h2>
|
||||
<p class="lead">The in-browser demo ran on GitHub Pages, which went down with my suspended
|
||||
GitHub account. It comes straight back once the account is restored.</p>
|
||||
<div class="offline">
|
||||
<span class="big">🚧</span>
|
||||
<p><b>Want to try openGym in the meantime?</b> Install the Android app below — it needs no
|
||||
account and no server — or run the self-hosted version with one <code>docker compose up</code>.</p>
|
||||
<div class="hero-btns" style="margin-top:18px">
|
||||
<a class="btn" href="#download">Get openGym</a>
|
||||
<a class="btn ghost" href="https://gitea.com/DuarteSantos/openGym" rel="noopener">Browse the code on Gitea</a>
|
||||
</div>
|
||||
</div>
|
||||
<p class="demo-note">Demo data lives only in this browser tab-family and can be reset in its
|
||||
Settings. Prefer a full window? <a href="https://duartesantos8.github.io/openGym/" rel="noopener">Open the demo full-screen →</a></p>
|
||||
</div></section>
|
||||
|
||||
<section id="download"><div class="wrap">
|
||||
@@ -128,7 +166,7 @@
|
||||
<li class="no">No cross-device sync</li>
|
||||
</ul>
|
||||
<a class="btn" href="openGym.apk" download>Download for Android</a>
|
||||
<p class="meta">v1.2.6 · 4.3 MB · Android 6.0+ · signed APK, sideload (your browser will ask — that's normal outside the Play Store)</p>
|
||||
<p class="meta">v1.2.7 · 4.3 MB · Android 6.0+ · signed APK, sideload (your browser will ask — that's normal outside the Play Store)</p>
|
||||
<p class="meta"><b>iPhone?</b> Apple doesn't allow installs outside the App Store — use the
|
||||
self-hosted version as a home-screen app instead, or see <a href="docs.html#iphone">the docs</a>.</p>
|
||||
</div>
|
||||
@@ -163,18 +201,22 @@
|
||||
<h2>AGPL-licensed, forever</h2>
|
||||
<p class="lead">The code is public, the license keeps every fork open, and there is no
|
||||
commercial version waiting behind a curtain. If openGym is useful to you,
|
||||
a ⭐ on GitHub helps more people find it.</p>
|
||||
a ⭐ on Gitea helps more people find it.</p>
|
||||
<p class="lead">There is a Discord for release announcements, self-hosting help and bug
|
||||
reports. It is the fastest way to hear about a new version — and the fastest way
|
||||
to get unstuck if a reverse proxy or a passkey is fighting you.</p>
|
||||
<div class="os">
|
||||
<div class="stat"><b data-gh="stars-n">–</b><span>GitHub stars</span></div>
|
||||
<div class="stat"><b data-gh="stars-n">–</b><span>Gitea stars</span></div>
|
||||
<div class="stat"><b data-gh="forks-n">–</b><span>forks</span></div>
|
||||
<div class="stat"><b data-gh="issues-n">–</b><span>open issues</span></div>
|
||||
<div class="stat"><b>1,324</b><span>exercises</span></div>
|
||||
<div class="stat"><b>12</b><span>languages</span></div>
|
||||
</div>
|
||||
<div class="hero-btns" style="justify-content:flex-start;margin-top:24px">
|
||||
<a class="btn ghost" href="https://github.com/DuarteSantos8/openGym" rel="noopener">openGym on GitHub</a>
|
||||
<a class="btn ghost" href="https://github.com/DuarteSantos8/openGym/blob/main/CONTRIBUTING.md" rel="noopener">Contributing</a>
|
||||
<a class="btn ghost" href="https://github.com/DuarteSantos8/openGym/blob/main/CHANGELOG.md" rel="noopener">Changelog</a>
|
||||
<a class="btn ghost" href="https://gitea.com/DuarteSantos/openGym" rel="noopener">openGym on Gitea</a>
|
||||
<a class="btn ghost" href="https://gitea.com/DuarteSantos/openGym/src/branch/main/CONTRIBUTING.md" rel="noopener">Contributing</a>
|
||||
<a class="btn ghost" href="https://gitea.com/DuarteSantos/openGym/src/branch/main/CHANGELOG.md" rel="noopener">Changelog</a>
|
||||
<a class="btn" href="https://discord.gg/e62jY6fwVb" rel="noopener">Join the Discord</a>
|
||||
</div>
|
||||
</div></section>
|
||||
|
||||
@@ -183,8 +225,9 @@
|
||||
<div class="links">
|
||||
<a href="docs.html">Docs</a>
|
||||
<a href="about.html" class="hide-s">About</a>
|
||||
<a href="https://github.com/DuarteSantos8/openGym" rel="noopener">GitHub</a>
|
||||
<a href="https://duartesantos8.github.io/openGym/" rel="noopener">Live demo</a>
|
||||
<a href="https://gitea.com/DuarteSantos/openGym" rel="noopener">Gitea</a>
|
||||
<a href="https://discord.gg/e62jY6fwVb" rel="noopener">Discord</a>
|
||||
<a href="/#download">Download</a>
|
||||
</div>
|
||||
</div></footer>
|
||||
|
||||
|
||||
+12
-11
@@ -1,25 +1,26 @@
|
||||
// Live GitHub numbers in the nav + open-source strip. Fails silently — the site
|
||||
// works fine without them (unauthenticated API: 60 req/h per IP, cached below).
|
||||
// Live repo numbers in the nav + open-source strip. Fails silently — the site works
|
||||
// fine without them. Points at the gitea.com mirror while the GitHub account is
|
||||
// suspended; switch the two API URLs back to api.github.com once it is restored.
|
||||
(async () => {
|
||||
const set = (id, v) => document.querySelectorAll('[data-gh="' + id + '"]').forEach(el => { el.textContent = v })
|
||||
try {
|
||||
let d = null
|
||||
const cached = sessionStorage.getItem('gh_repo')
|
||||
const cached = sessionStorage.getItem('repo_meta')
|
||||
if (cached) d = JSON.parse(cached)
|
||||
else {
|
||||
const r = await fetch('https://api.github.com/repos/DuarteSantos8/openGym')
|
||||
const r = await fetch('https://gitea.com/api/v1/repos/DuarteSantos/openGym')
|
||||
if (!r.ok) return
|
||||
d = await r.json()
|
||||
sessionStorage.setItem('gh_repo', JSON.stringify({ stargazers_count: d.stargazers_count, forks_count: d.forks_count, open_issues_count: d.open_issues_count }))
|
||||
sessionStorage.setItem('repo_meta', JSON.stringify({ stars_count: d.stars_count, forks_count: d.forks_count, open_issues_count: d.open_issues_count }))
|
||||
}
|
||||
set('stars', '★ ' + d.stargazers_count)
|
||||
set('stars-n', d.stargazers_count)
|
||||
set('stars', '★ ' + d.stars_count)
|
||||
set('stars-n', d.stars_count)
|
||||
set('forks-n', d.forks_count)
|
||||
set('issues-n', d.open_issues_count)
|
||||
} catch (e) { /* offline / rate-limited — leave placeholders */ }
|
||||
})()
|
||||
|
||||
// About page: build the milestones timeline from the published GitHub releases, so the
|
||||
// About page: build the milestones timeline from the published Gitea 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.
|
||||
;(async () => {
|
||||
@@ -27,14 +28,14 @@
|
||||
if (!tl) return
|
||||
try {
|
||||
let rel = null
|
||||
const cached = sessionStorage.getItem('gh_releases')
|
||||
const cached = sessionStorage.getItem('repo_releases')
|
||||
if (cached) rel = JSON.parse(cached)
|
||||
else {
|
||||
const r = await fetch('https://api.github.com/repos/DuarteSantos8/openGym/releases?per_page=100')
|
||||
const r = await fetch('https://gitea.com/api/v1/repos/DuarteSantos/openGym/releases?limit=100')
|
||||
if (!r.ok) return
|
||||
rel = (await r.json()).filter(x => !x.draft && !x.prerelease)
|
||||
.map(x => ({ tag: x.tag_name, name: x.name, at: x.published_at, body: x.body || '', url: x.html_url }))
|
||||
sessionStorage.setItem('gh_releases', JSON.stringify(rel))
|
||||
sessionStorage.setItem('repo_releases', JSON.stringify(rel))
|
||||
}
|
||||
if (!rel.length) return
|
||||
const fmt = d => new Date(d).toLocaleDateString('en-GB', { year: 'numeric', month: 'long', day: 'numeric' })
|
||||
|
||||
@@ -178,3 +178,87 @@ table.cfg td:first-child { white-space: nowrap; width: 1%; padding-right: 1.2rem
|
||||
table.cfg td:first-child { white-space: normal; width: auto; padding-top: .7rem; border-top: 1px solid var(--line, #24303f); }
|
||||
table.cfg tr:first-child td:first-child { border-top: 0; }
|
||||
}
|
||||
|
||||
/* ---------- suspension notice (GitHub account suspended → gitea.com mirror) ----------
|
||||
Temporary: remove this block together with the .alert markup once the account is back. */
|
||||
.alert {
|
||||
background:
|
||||
radial-gradient(1200px 260px at 50% -40px, rgba(255, 159, 10, .18), transparent 70%),
|
||||
linear-gradient(180deg, #241a10, #1a1410);
|
||||
border-bottom: 1px solid rgba(255, 159, 10, .38);
|
||||
border-top: 3px solid #ff9f0a;
|
||||
padding: 40px 0 44px;
|
||||
text-align: center;
|
||||
}
|
||||
.alert-tag {
|
||||
display: inline-block; margin-bottom: 16px;
|
||||
background: rgba(255, 159, 10, .16); color: #ffb340;
|
||||
border: 1px solid rgba(255, 159, 10, .35); border-radius: 999px;
|
||||
padding: 6px 15px; font-size: 13px; font-weight: 700;
|
||||
text-transform: uppercase; letter-spacing: .09em;
|
||||
}
|
||||
.alert h2 {
|
||||
font-size: clamp(27px, 5.4vw, 46px); line-height: 1.15; letter-spacing: -.03em;
|
||||
color: #ffd8a3; max-width: 900px; margin: 0 auto;
|
||||
}
|
||||
.alert p { color: #e3d5c4; font-size: clamp(15px, 2vw, 17.5px); max-width: 720px; margin: 16px auto 0; }
|
||||
.alert p b { color: #fff; }
|
||||
.alert .alert-btn {
|
||||
margin-top: 20px; background: #ff9f0a; color: #1a1206;
|
||||
font-size: clamp(15px, 2.4vw, 19px); font-weight: 700; padding: 15px 26px;
|
||||
word-break: break-word;
|
||||
}
|
||||
.alert .alert-note { color: #a9977f; font-size: 14px; margin-top: 18px; }
|
||||
.alert code { background: rgba(255, 159, 10, .12); color: #ffc978; }
|
||||
|
||||
/* offline live demo */
|
||||
.offline {
|
||||
background: var(--card); border: 1px dashed var(--line); border-radius: 18px;
|
||||
padding: 34px 26px; text-align: center; margin-top: 22px;
|
||||
}
|
||||
.offline .big { font-size: 34px; display: block; margin-bottom: 10px; }
|
||||
.offline p { color: var(--dim); max-width: 620px; margin: 0 auto 6px; }
|
||||
|
||||
/* ---------- Discord call-to-action ----------
|
||||
Blurple rather than the lime accent on purpose: this block has to read as a
|
||||
different kind of thing from the download/demo buttons around it. */
|
||||
.dc-wrap { padding: 8px 0 46px; }
|
||||
.dc {
|
||||
display: flex; align-items: center; gap: 26px;
|
||||
max-width: 720px; margin: 0 auto; text-align: left;
|
||||
background:
|
||||
radial-gradient(700px 200px at 12% -30px, rgba(88, 101, 242, .22), transparent 70%),
|
||||
linear-gradient(180deg, #1a1c2e, #15161f);
|
||||
border: 1px solid rgba(88, 101, 242, .42);
|
||||
border-radius: 20px; padding: 28px 30px;
|
||||
}
|
||||
.dc:hover { border-color: rgba(88, 101, 242, .72); }
|
||||
.dc-icon {
|
||||
flex: 0 0 76px; width: 76px; height: 76px; border-radius: 20px;
|
||||
background: #5865f2; display: flex; align-items: center; justify-content: center;
|
||||
}
|
||||
/* The Discord mark is 71:55, not square — forcing it into a square box
|
||||
letterboxes it and it reads as vertically off-centre. */
|
||||
.dc-icon svg { width: 44px; height: 34px; fill: #fff; display: block; }
|
||||
.dc-body { flex: 1 1 auto; min-width: 0; }
|
||||
.dc h3 { font-size: clamp(19px, 3vw, 23px); letter-spacing: -.02em; margin-bottom: 6px; }
|
||||
.dc p { color: var(--dim); font-size: 14.5px; }
|
||||
.dc .btn {
|
||||
background: #5865f2; color: #fff; white-space: nowrap;
|
||||
flex: 0 0 auto; align-self: center;
|
||||
}
|
||||
.dc .btn:hover { filter: brightness(1.12); }
|
||||
@media (max-width: 620px) {
|
||||
.dc { flex-direction: column; text-align: center; gap: 18px; padding: 26px 22px; }
|
||||
.dc .btn { width: 100%; text-align: center; }
|
||||
}
|
||||
|
||||
/* Discord button inside the suspended-account banner */
|
||||
.alert .alert-actions {
|
||||
display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; align-items: stretch;
|
||||
}
|
||||
.alert .alert-actions .btn { margin-top: 20px; }
|
||||
.alert .dc-btn {
|
||||
background: #5865f2; color: #fff;
|
||||
font-size: clamp(15px, 2.4vw, 19px); font-weight: 700; padding: 15px 26px;
|
||||
}
|
||||
Reference in new issue
Block a user