Merge main (v1.2.14) in coach-providers
Konflikte: zwoelf Locale-Packs (beide Seiten haengen Strings an, sechs doppelte Schluessel bereinigt), Admin.jsx/admin.css (Coach-Karte bleibt, main-Umbau uebernommen), Workout/Home/Plan/sheets (main gewinnt), docs.html (Coach-Kapitel war doppelt). Ungarisch und Thai sind auf main dazugekommen und bekommen die 334 Coach-Strings. pt-BR-Fingerprint nachgezogen.
This commit is contained in:
commit
63cf1deaed
121 files changed
+17177
-747
No files matched your search
+18
-8
@@ -15,14 +15,24 @@ Not in this folder (added at deploy time):
|
||||
of exercise media stays out of it. It has to live on this host: the site frames it, and
|
||||
`X-Frame-Options: SAMEORIGIN` would block it from anywhere else.
|
||||
|
||||
`site.js` carries four independent pieces, each one failing soft so the page is
|
||||
complete without any of them: the phone nav sheet, the scroll reveals, the demo
|
||||
iframe (injected only once the frame is on screen, and never below 700 px, where
|
||||
the CSS swaps it for an "open it full-screen" card), and the two things that come
|
||||
from the public gitlab.com API at view time — the star/issue counts and the About
|
||||
page's release timeline. Those two URLs pointed at api.github.com until that
|
||||
account was suspended; they go back once it is restored, together with the notice
|
||||
block at the top of all three pages.
|
||||
Navigation is a topic rail (`.side`): one title/subtitle list of everything on the
|
||||
site, a fixed column beside the page from 1300 px up and the hamburger sheet below
|
||||
that, with a scrollspy lighting the section under the reader. The top bar keeps
|
||||
only the brand, GitLab, Discord and the download button.
|
||||
|
||||
`site.js` carries five independent pieces, each one failing soft so the page is
|
||||
complete without any of them: the topic-rail sheet, its scrollspy, the scroll
|
||||
reveals, the demo iframe (injected only once the frame is on screen, and never
|
||||
below 700 px, where the CSS swaps it for an "open it full-screen" card), and the
|
||||
two things that come from the public gitlab.com API at view time — the star/issue
|
||||
counts and the About page's release timeline. Those two URLs pointed at
|
||||
api.github.com until that account was suspended; they go back once it is restored.
|
||||
|
||||
`api.html` is the one **generated** file in here: `node scripts/build-api-docs.mjs`
|
||||
rewrites it from `../api/openapi.yaml`. Edit the spec, re-run the script, commit both —
|
||||
never hand-edit `api.html`, the next run overwrites it. The page is static HTML in this
|
||||
site's own design (no Swagger UI, nothing rendered at view time); the only script of its
|
||||
own it carries is the contents drawer and the card expand/collapse.
|
||||
|
||||
`styles.css` and `site.js` are cache-busted with `?v=N` — nginx serves the site
|
||||
with `no-cache, must-revalidate`, but the query bump is what saves a Cloudflare
|
||||
|
||||
+67
-32
@@ -6,52 +6,87 @@
|
||||
<title>About — openGym</title>
|
||||
<meta name="description" content="The story behind openGym: a gym tracker that started as a tiny personal app on a homelab server and grew into an open-source project.">
|
||||
<meta name="theme-color" content="#000000">
|
||||
<meta property="og:title" content="About openGym">
|
||||
<meta property="og:description" content="How openGym came to be: a tracker built for one user, open-sourced under the AGPL, with every release documented.">
|
||||
<meta property="og:image" content="https://opengym.duarte-santos.ch/img/banner.png">
|
||||
<meta property="og:url" content="https://opengym.duarte-santos.ch/about.html">
|
||||
<meta property="og:type" content="website">
|
||||
<meta property="og:site_name" content="openGym">
|
||||
<meta name="twitter:card" content="summary_large_image">
|
||||
<meta name="twitter:title" content="About openGym">
|
||||
<meta name="twitter:image" content="https://opengym.duarte-santos.ch/img/banner.png">
|
||||
<link rel="canonical" href="https://opengym.duarte-santos.ch/about.html">
|
||||
<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?v=9">
|
||||
<link rel="stylesheet" href="styles.css?v=16">
|
||||
<script>document.documentElement.className += ' js'</script>
|
||||
<!-- 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>
|
||||
<body class="topnav">
|
||||
|
||||
<nav><div class="wrap nav-in">
|
||||
<a class="brand" href="/">
|
||||
<img src="icon-180.png" alt="" width="24" height="24">
|
||||
openGym
|
||||
</a>
|
||||
<button class="nav-toggle" aria-expanded="false" aria-controls="menu" aria-label="Menu">
|
||||
<span></span><span></span>
|
||||
</button>
|
||||
<div class="nav-links" id="menu">
|
||||
<a href="/#features">Features</a>
|
||||
<a href="/#screens">Screenshots</a>
|
||||
<a href="/#demo">Demo</a>
|
||||
<a href="docs.html">Docs</a>
|
||||
<a href="about.html">About</a>
|
||||
<a href="https://gitlab.com/DuarteSantos8/opengym" rel="noopener">GitLab <span data-gh="stars"></span></a>
|
||||
<a href="https://discord.gg/e62jY6fwVb" rel="noopener">Discord</a>
|
||||
<div class="nav-quick">
|
||||
<a class="ql site" href="/#features">Features</a>
|
||||
<a class="ql site" href="/#screens">Screenshots</a>
|
||||
<a class="ql site" href="/#demo">Demo</a>
|
||||
<a class="ql site" href="/docs.html">Docs</a>
|
||||
<a class="ql site" href="/api.html">API</a>
|
||||
<a class="ql site" href="/about.html">About</a>
|
||||
<a class="ql" href="https://gitlab.com/DuarteSantos8/opengym" rel="noopener">GitLab <span data-gh="stars"></span></a>
|
||||
<a class="ql" href="https://discord.gg/e62jY6fwVb" rel="noopener">Discord <span data-dc="members"></span></a>
|
||||
<a class="ql coffee" href="https://buymeacoffee.com/duartesantos" rel="noopener" aria-label="Buy me a coffee"><svg viewBox="0 0 24 24" aria-hidden="true"><path d="M20.216 6.415l-.132-.666c-.119-.598-.388-1.163-1.001-1.379-.197-.069-.42-.098-.57-.241-.152-.143-.196-.366-.231-.572-.065-.378-.125-.756-.192-1.133-.057-.325-.102-.69-.25-.987-.195-.4-.597-.634-.996-.788a5.723 5.723 0 00-.626-.194c-1-.263-2.05-.36-3.077-.416a25.834 25.834 0 00-3.7.062c-.915.083-1.88.184-2.75.5-.318.116-.646.256-.888.501-.297.302-.393.77-.177 1.146.154.267.415.456.692.58.36.162.737.284 1.123.366 1.075.238 2.189.331 3.287.37 1.218.05 2.437.01 3.65-.118.299-.033.598-.073.896-.119.352-.054.578-.513.474-.834-.124-.383-.457-.531-.834-.473-.466.074-.96.108-1.382.146-1.177.08-2.358.082-3.536.006a22.228 22.228 0 01-1.157-.107c-.086-.01-.18-.025-.258-.036-.243-.036-.484-.08-.724-.13-.111-.027-.111-.185 0-.212h.005c.277-.06.557-.108.838-.147h.002c.131-.009.263-.032.394-.048a25.076 25.076 0 013.426-.12c.674.019 1.347.067 2.017.144l.228.031c.267.04.533.088.798.145.392.085.895.113 1.07.542.055.137.08.288.111.431l.319 1.484a.237.237 0 01-.199.284h-.003c-.037.006-.075.01-.112.015a36.704 36.704 0 01-4.743.295 37.059 37.059 0 01-4.699-.304c-.14-.017-.293-.042-.417-.06-.326-.048-.649-.108-.973-.161-.393-.065-.768-.032-1.123.161-.29.16-.527.404-.675.701-.154.316-.199.66-.267 1-.069.34-.176.707-.135 1.056.087.753.613 1.365 1.37 1.502a39.69 39.69 0 0011.343.376.483.483 0 01.535.53l-.071.697-1.018 9.907c-.041.41-.047.832-.125 1.237-.122.637-.553 1.028-1.182 1.171-.577.131-1.165.2-1.756.205-.656.004-1.31-.025-1.966-.022-.699.004-1.556-.06-2.095-.58-.475-.458-.54-1.174-.605-1.793l-.731-7.013-.322-3.094c-.037-.351-.286-.695-.678-.678-.336.015-.718.3-.678.679l.228 2.185.949 9.112c.147 1.344 1.174 2.068 2.446 2.272.742.12 1.503.144 2.257.156.966.016 1.942.053 2.892-.122 1.408-.258 2.465-1.198 2.616-2.657.34-3.332.683-6.663 1.024-9.995l.215-2.087a.484.484 0 01.39-.426c.402-.078.787-.212 1.074-.518.455-.488.546-1.124.385-1.766zm-1.478.772c-.145.137-.363.201-.578.233-2.416.359-4.866.54-7.308.46-1.748-.06-3.477-.254-5.207-.498-.17-.024-.353-.055-.47-.18-.22-.236-.111-.71-.054-.995.052-.26.152-.609.463-.646.484-.057 1.046.148 1.526.22.577.088 1.156.159 1.737.212 2.48.226 5.002.19 7.472-.14.45-.06.899-.13 1.345-.21.399-.072.84-.206 1.08.206.166.281.188.657.162.974a.544.544 0 01-.169.364zm-6.159 3.9c-.862.37-1.84.788-3.109.788a5.884 5.884 0 01-1.569-.217l.877 9.004c.065.78.717 1.38 1.5 1.38 0 0 1.243.065 1.658.065.447 0 1.786-.065 1.786-.065.783 0 1.434-.6 1.499-1.38l.94-9.95a3.996 3.996 0 00-1.322-.238c-.826 0-1.491.284-2.26.613z"/></svg><span>Buy me a coffee!</span></a>
|
||||
<a class="cta" href="/#download">Download</a>
|
||||
</div>
|
||||
<button class="nav-toggle" id="navtoggle" aria-expanded="false" aria-controls="sitemenu" aria-label="Menu">
|
||||
<span></span><span></span>
|
||||
</button>
|
||||
</div></nav>
|
||||
|
||||
<!-- TEMPORARY: GitHub account suspended -> repo lives on gitlab.com. Remove this block and
|
||||
revert the links (+ site.js) to github.com once the account is restored. -->
|
||||
<div class="notice-wrap"><div class="wrap">
|
||||
<aside class="notice" role="note">
|
||||
<div class="notice-tag">Repository moved</div>
|
||||
<h2>My GitHub account was suspended, and the openGym repo went with it.</h2>
|
||||
<p><b>github.com/DuarteSantos8/openGym is offline</b> — not by choice. The app is
|
||||
untouched: the APK, the demo and every self-hosted install work exactly as before. The
|
||||
code, the releases, the container images and the APK builds now live on GitLab under
|
||||
the same AGPL-3.0 license, and every repository link here points there.</p>
|
||||
<div class="actions">
|
||||
<a class="btn" href="https://gitlab.com/DuarteSantos8/opengym" rel="noopener">Open on GitLab</a>
|
||||
<a class="btn dc-btn" href="https://discord.gg/e62jY6fwVb" rel="noopener">Join the Discord</a>
|
||||
</div>
|
||||
</aside>
|
||||
</div></div>
|
||||
<!-- The navigation sheet: the header's links again, for the widths where the bar has
|
||||
room only for the brand and the download. Byte-identical on every page, like the
|
||||
bar above it — nothing is ever dropped because of which page you are on. -->
|
||||
<div class="navsheet" id="sitemenu" role="navigation" aria-label="Site" aria-hidden="true">
|
||||
<div class="nl-rows">
|
||||
<a class="nl" href="/#features">Features</a>
|
||||
<a class="nl" href="/#screens">Screenshots</a>
|
||||
<a class="nl" href="/#demo">Demo</a>
|
||||
<a class="nl" href="/docs.html">Docs</a>
|
||||
<a class="nl" href="/api.html">API</a>
|
||||
<a class="nl" href="/about.html">About</a>
|
||||
<a class="nl" href="https://gitlab.com/DuarteSantos8/opengym" rel="noopener">GitLab <span data-gh="stars"></span></a>
|
||||
<a class="nl" href="https://discord.gg/e62jY6fwVb" rel="noopener">Discord <span data-dc="members"></span></a>
|
||||
<a class="nl coffee" href="https://buymeacoffee.com/duartesantos" rel="noopener">Buy me a coffee! <svg viewBox="0 0 24 24" aria-hidden="true"><path d="M20.216 6.415l-.132-.666c-.119-.598-.388-1.163-1.001-1.379-.197-.069-.42-.098-.57-.241-.152-.143-.196-.366-.231-.572-.065-.378-.125-.756-.192-1.133-.057-.325-.102-.69-.25-.987-.195-.4-.597-.634-.996-.788a5.723 5.723 0 00-.626-.194c-1-.263-2.05-.36-3.077-.416a25.834 25.834 0 00-3.7.062c-.915.083-1.88.184-2.75.5-.318.116-.646.256-.888.501-.297.302-.393.77-.177 1.146.154.267.415.456.692.58.36.162.737.284 1.123.366 1.075.238 2.189.331 3.287.37 1.218.05 2.437.01 3.65-.118.299-.033.598-.073.896-.119.352-.054.578-.513.474-.834-.124-.383-.457-.531-.834-.473-.466.074-.96.108-1.382.146-1.177.08-2.358.082-3.536.006a22.228 22.228 0 01-1.157-.107c-.086-.01-.18-.025-.258-.036-.243-.036-.484-.08-.724-.13-.111-.027-.111-.185 0-.212h.005c.277-.06.557-.108.838-.147h.002c.131-.009.263-.032.394-.048a25.076 25.076 0 013.426-.12c.674.019 1.347.067 2.017.144l.228.031c.267.04.533.088.798.145.392.085.895.113 1.07.542.055.137.08.288.111.431l.319 1.484a.237.237 0 01-.199.284h-.003c-.037.006-.075.01-.112.015a36.704 36.704 0 01-4.743.295 37.059 37.059 0 01-4.699-.304c-.14-.017-.293-.042-.417-.06-.326-.048-.649-.108-.973-.161-.393-.065-.768-.032-1.123.161-.29.16-.527.404-.675.701-.154.316-.199.66-.267 1-.069.34-.176.707-.135 1.056.087.753.613 1.365 1.37 1.502a39.69 39.69 0 0011.343.376.483.483 0 01.535.53l-.071.697-1.018 9.907c-.041.41-.047.832-.125 1.237-.122.637-.553 1.028-1.182 1.171-.577.131-1.165.2-1.756.205-.656.004-1.31-.025-1.966-.022-.699.004-1.556-.06-2.095-.58-.475-.458-.54-1.174-.605-1.793l-.731-7.013-.322-3.094c-.037-.351-.286-.695-.678-.678-.336.015-.718.3-.678.679l.228 2.185.949 9.112c.147 1.344 1.174 2.068 2.446 2.272.742.12 1.503.144 2.257.156.966.016 1.942.053 2.892-.122 1.408-.258 2.465-1.198 2.616-2.657.34-3.332.683-6.663 1.024-9.995l.215-2.087a.484.484 0 01.39-.426c.402-.078.787-.212 1.074-.518.455-.488.546-1.124.385-1.766zm-1.478.772c-.145.137-.363.201-.578.233-2.416.359-4.866.54-7.308.46-1.748-.06-3.477-.254-5.207-.498-.17-.024-.353-.055-.47-.18-.22-.236-.111-.71-.054-.995.052-.26.152-.609.463-.646.484-.057 1.046.148 1.526.22.577.088 1.156.159 1.737.212 2.48.226 5.002.19 7.472-.14.45-.06.899-.13 1.345-.21.399-.072.84-.206 1.08.206.166.281.188.657.162.974a.544.544 0 01-.169.364zm-6.159 3.9c-.862.37-1.84.788-3.109.788a5.884 5.884 0 01-1.569-.217l.877 9.004c.065.78.717 1.38 1.5 1.38 0 0 1.243.065 1.658.065.447 0 1.786-.065 1.786-.065.783 0 1.434-.6 1.499-1.38l.94-9.95a3.996 3.996 0 00-1.322-.238c-.826 0-1.491.284-2.26.613z"/></svg></a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- The one control that opens the contents, at every width. The drawer it opens is
|
||||
closed in CSS, so it is shut on first paint whether or not the script runs. -->
|
||||
<button class="toc-btn" id="tocbtn" aria-expanded="false" aria-controls="menu">
|
||||
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.9" stroke-linecap="round" aria-hidden="true"><path d="M4 6.5h16M4 12h16M4 17.5h10"/></svg>
|
||||
Contents
|
||||
</button>
|
||||
|
||||
<!-- The contents drawer: one list, one way in, one way out. Closed by default at
|
||||
every width, and no preference is remembered — see .side in styles.css. -->
|
||||
<aside class="side" id="menu" aria-label="Contents" aria-hidden="true">
|
||||
<div class="side-top">
|
||||
<p class="side-title">Contents</p>
|
||||
<button class="rail-close" aria-label="Close contents"><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" aria-hidden="true"><path d="M5 5l14 14M19 5L5 19"/></svg></button>
|
||||
</div>
|
||||
<p class="side-label">On this page</p>
|
||||
<a class="side-link" href="#milestones-h"><b>Milestones</b><span>Every release, straight from GitLab</span></a>
|
||||
<a class="side-link" href="#principles"><b>Principles</b><span>The rules that don't move</span></a>
|
||||
<p class="side-label">More</p>
|
||||
<a class="side-link" href="/"><b>Home</b><span>The tour, the demo, the download</span></a>
|
||||
<a class="side-link" href="docs.html"><b>Docs</b><span>Install, self-host, import</span></a>
|
||||
<a class="side-link" href="api.html"><b>API</b><span>Every route, as an OpenAPI spec</span></a>
|
||||
</aside>
|
||||
|
||||
<main class="wrap prose">
|
||||
<h1>About openGym</h1>
|
||||
@@ -71,7 +106,7 @@
|
||||
|
||||
<p>Then friends wanted in. That brought passkey profiles, so everyone signs in with a
|
||||
fingerprint and keeps their own data, and sync, so the log survives any phone. Somewhere
|
||||
along the way the little page was rewritten into a proper React app, learned 13 languages,
|
||||
along the way the little page was rewritten into a proper React app, learned 14 languages,
|
||||
grew a muscle map that reads three ways (where the volume went, what is still recovering,
|
||||
and what each muscle is actually strong at), picked up importers for FitNotes, Strong,
|
||||
Hevy and Apple Health, and finally became a native Android app you can install from
|
||||
@@ -101,7 +136,7 @@
|
||||
<p>See the full list on <a href="https://gitlab.com/DuarteSantos8/opengym/-/releases" rel="noopener">GitLab → Releases</a>.</p></li>
|
||||
</ul>
|
||||
|
||||
<h2>Principles</h2>
|
||||
<h2 id="principles">Principles</h2>
|
||||
<ul>
|
||||
<li><b>Your data is yours.</b> Local-first, one-file backups, no lock-in. Leaving openGym
|
||||
must always be one export away.</li>
|
||||
@@ -130,6 +165,6 @@
|
||||
</div>
|
||||
</div></footer>
|
||||
|
||||
<script src="site.js?v=9" defer></script>
|
||||
<script src="site.js?v=16" defer></script>
|
||||
</body>
|
||||
</html>
|
||||
+2240
File diff suppressed because it is too large.
Load diff
+709
-102
@@ -4,60 +4,182 @@
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width,initial-scale=1,viewport-fit=cover">
|
||||
<title>Docs — openGym</title>
|
||||
<meta name="description" content="How to install openGym on Android, use it on iPhone, self-host it with Docker, import your training history, and keep backups.">
|
||||
<meta name="description" content="The complete openGym reference: every feature, installing on Android and iPhone, self-hosting with Docker, every .env setting, the AI Coach, importing from FitNotes/Strong/Hevy, backups, the MCP server, and how it's built.">
|
||||
<meta name="theme-color" content="#000000">
|
||||
<meta property="og:title" content="openGym Docs — the complete reference">
|
||||
<meta property="og:description" content="The complete openGym reference: every feature, self-hosting with Docker, every setting, the AI Coach, imports, backups, MCP, troubleshooting.">
|
||||
<meta property="og:image" content="https://opengym.duarte-santos.ch/img/banner.png">
|
||||
<meta property="og:url" content="https://opengym.duarte-santos.ch/docs.html">
|
||||
<meta property="og:type" content="website">
|
||||
<meta property="og:site_name" content="openGym">
|
||||
<meta name="twitter:card" content="summary_large_image">
|
||||
<meta name="twitter:title" content="openGym Docs — the complete reference">
|
||||
<meta name="twitter:image" content="https://opengym.duarte-santos.ch/img/banner.png">
|
||||
<link rel="canonical" href="https://opengym.duarte-santos.ch/docs.html">
|
||||
<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?v=9">
|
||||
<link rel="stylesheet" href="styles.css?v=16">
|
||||
<script>document.documentElement.className += ' js'</script>
|
||||
<!-- 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": "FAQPage", "mainEntity": [{"@type": "Question", "name": "Is openGym really free?", "acceptedAnswer": {"@type": "Answer", "text": "Yes — free as in cost and as in freedom (AGPL-3.0). No pro tier, no locked features, no ads, and the license keeps every fork open source too."}}, {"@type": "Question", "name": "Why isn't openGym on the Play Store or App Store?", "acceptedAnswer": {"@type": "Answer", "text": "By choice (and on iOS, by Apple's rules for sideloading). Store accounts cost money, impose terms that sit badly with the AGPL, and put a gatekeeper between you and an app whose whole point is that your data is yours. The signed Android APK is a direct download."}}, {"@type": "Question", "name": "Should I pick the mobile app or self-host?", "acceptedAnswer": {"@type": "Answer", "text": "To simply track your training: the mobile app. For data on your own hardware, synced across devices, with profiles for the people you train with: self-host with Docker. The backup file migrates everything between the two, or pair the app to your server."}}, {"@type": "Question", "name": "What's on the openGym roadmap?", "acceptedAnswer": {"@type": "Answer", "text": "Percentage/training-max programming (5/3/1-style), more starter plans, body measurements alongside weight, per-exercise notes and a plate calculator, more instruction languages. Community-driven — ideas and merge requests welcome."}}, {"@type": "Question", "name": "Where does the exercise database come from?", "acceptedAnswer": {"@type": "Answer", "text": "From hasaneyldrm/exercises-dataset: 1,324 exercises with animations and instructions. The metadata and instruction text are MIT; the images and animations are third-party media that openGym never redistributes — your instance downloads them from upstream on first run."}}, {"@type": "Question", "name": "What does the AGPL license mean for me?", "acceptedAnswer": {"@type": "Answer", "text": "You can self-host, use, modify and share openGym freely. Only if you run a modified version as a network service must you offer that version's source under the same license. Using or self-hosting it unmodified obliges you to nothing."}}]}
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
<body class="topnav">
|
||||
|
||||
<nav><div class="wrap nav-in">
|
||||
<a class="brand" href="/">
|
||||
<img src="icon-180.png" alt="" width="24" height="24">
|
||||
openGym
|
||||
</a>
|
||||
<button class="nav-toggle" aria-expanded="false" aria-controls="menu" aria-label="Menu">
|
||||
<span></span><span></span>
|
||||
</button>
|
||||
<div class="nav-links" id="menu">
|
||||
<a href="/#features">Features</a>
|
||||
<a href="/#screens">Screenshots</a>
|
||||
<a href="/#demo">Demo</a>
|
||||
<a href="docs.html">Docs</a>
|
||||
<a href="about.html">About</a>
|
||||
<a href="https://gitlab.com/DuarteSantos8/opengym" rel="noopener">GitLab <span data-gh="stars"></span></a>
|
||||
<a href="https://discord.gg/e62jY6fwVb" rel="noopener">Discord</a>
|
||||
<div class="nav-quick">
|
||||
<a class="ql site" href="/#features">Features</a>
|
||||
<a class="ql site" href="/#screens">Screenshots</a>
|
||||
<a class="ql site" href="/#demo">Demo</a>
|
||||
<a class="ql site" href="/docs.html">Docs</a>
|
||||
<a class="ql site" href="/api.html">API</a>
|
||||
<a class="ql site" href="/about.html">About</a>
|
||||
<a class="ql" href="https://gitlab.com/DuarteSantos8/opengym" rel="noopener">GitLab <span data-gh="stars"></span></a>
|
||||
<a class="ql" href="https://discord.gg/e62jY6fwVb" rel="noopener">Discord <span data-dc="members"></span></a>
|
||||
<a class="ql coffee" href="https://buymeacoffee.com/duartesantos" rel="noopener" aria-label="Buy me a coffee"><svg viewBox="0 0 24 24" aria-hidden="true"><path d="M20.216 6.415l-.132-.666c-.119-.598-.388-1.163-1.001-1.379-.197-.069-.42-.098-.57-.241-.152-.143-.196-.366-.231-.572-.065-.378-.125-.756-.192-1.133-.057-.325-.102-.69-.25-.987-.195-.4-.597-.634-.996-.788a5.723 5.723 0 00-.626-.194c-1-.263-2.05-.36-3.077-.416a25.834 25.834 0 00-3.7.062c-.915.083-1.88.184-2.75.5-.318.116-.646.256-.888.501-.297.302-.393.77-.177 1.146.154.267.415.456.692.58.36.162.737.284 1.123.366 1.075.238 2.189.331 3.287.37 1.218.05 2.437.01 3.65-.118.299-.033.598-.073.896-.119.352-.054.578-.513.474-.834-.124-.383-.457-.531-.834-.473-.466.074-.96.108-1.382.146-1.177.08-2.358.082-3.536.006a22.228 22.228 0 01-1.157-.107c-.086-.01-.18-.025-.258-.036-.243-.036-.484-.08-.724-.13-.111-.027-.111-.185 0-.212h.005c.277-.06.557-.108.838-.147h.002c.131-.009.263-.032.394-.048a25.076 25.076 0 013.426-.12c.674.019 1.347.067 2.017.144l.228.031c.267.04.533.088.798.145.392.085.895.113 1.07.542.055.137.08.288.111.431l.319 1.484a.237.237 0 01-.199.284h-.003c-.037.006-.075.01-.112.015a36.704 36.704 0 01-4.743.295 37.059 37.059 0 01-4.699-.304c-.14-.017-.293-.042-.417-.06-.326-.048-.649-.108-.973-.161-.393-.065-.768-.032-1.123.161-.29.16-.527.404-.675.701-.154.316-.199.66-.267 1-.069.34-.176.707-.135 1.056.087.753.613 1.365 1.37 1.502a39.69 39.69 0 0011.343.376.483.483 0 01.535.53l-.071.697-1.018 9.907c-.041.41-.047.832-.125 1.237-.122.637-.553 1.028-1.182 1.171-.577.131-1.165.2-1.756.205-.656.004-1.31-.025-1.966-.022-.699.004-1.556-.06-2.095-.58-.475-.458-.54-1.174-.605-1.793l-.731-7.013-.322-3.094c-.037-.351-.286-.695-.678-.678-.336.015-.718.3-.678.679l.228 2.185.949 9.112c.147 1.344 1.174 2.068 2.446 2.272.742.12 1.503.144 2.257.156.966.016 1.942.053 2.892-.122 1.408-.258 2.465-1.198 2.616-2.657.34-3.332.683-6.663 1.024-9.995l.215-2.087a.484.484 0 01.39-.426c.402-.078.787-.212 1.074-.518.455-.488.546-1.124.385-1.766zm-1.478.772c-.145.137-.363.201-.578.233-2.416.359-4.866.54-7.308.46-1.748-.06-3.477-.254-5.207-.498-.17-.024-.353-.055-.47-.18-.22-.236-.111-.71-.054-.995.052-.26.152-.609.463-.646.484-.057 1.046.148 1.526.22.577.088 1.156.159 1.737.212 2.48.226 5.002.19 7.472-.14.45-.06.899-.13 1.345-.21.399-.072.84-.206 1.08.206.166.281.188.657.162.974a.544.544 0 01-.169.364zm-6.159 3.9c-.862.37-1.84.788-3.109.788a5.884 5.884 0 01-1.569-.217l.877 9.004c.065.78.717 1.38 1.5 1.38 0 0 1.243.065 1.658.065.447 0 1.786-.065 1.786-.065.783 0 1.434-.6 1.499-1.38l.94-9.95a3.996 3.996 0 00-1.322-.238c-.826 0-1.491.284-2.26.613z"/></svg><span>Buy me a coffee!</span></a>
|
||||
<a class="cta" href="/#download">Download</a>
|
||||
</div>
|
||||
<button class="nav-toggle" id="navtoggle" aria-expanded="false" aria-controls="sitemenu" aria-label="Menu">
|
||||
<span></span><span></span>
|
||||
</button>
|
||||
</div></nav>
|
||||
|
||||
<!-- TEMPORARY: GitHub account suspended -> repo lives on gitlab.com. Remove this block and
|
||||
revert the links (+ site.js) to github.com once the account is restored. -->
|
||||
<div class="notice-wrap"><div class="wrap">
|
||||
<aside class="notice" role="note">
|
||||
<div class="notice-tag">Repository moved</div>
|
||||
<h2>My GitHub account was suspended, and the openGym repo went with it.</h2>
|
||||
<p><b>github.com/DuarteSantos8/openGym is offline</b> — not by choice. The app is
|
||||
untouched: the APK, the demo and every self-hosted install work exactly as before. The
|
||||
code, the releases, the container images and the APK builds now live on GitLab under
|
||||
the same AGPL-3.0 license, and every repository link here points there.</p>
|
||||
<div class="actions">
|
||||
<a class="btn" href="https://gitlab.com/DuarteSantos8/opengym" rel="noopener">Open on GitLab</a>
|
||||
<a class="btn dc-btn" href="https://discord.gg/e62jY6fwVb" rel="noopener">Join the Discord</a>
|
||||
<!-- The navigation sheet: the header's links again, for the widths where the bar has
|
||||
room only for the brand and the download. Byte-identical on every page, like the
|
||||
bar above it — nothing is ever dropped because of which page you are on. -->
|
||||
<div class="navsheet" id="sitemenu" role="navigation" aria-label="Site" aria-hidden="true">
|
||||
<div class="nl-rows">
|
||||
<a class="nl" href="/#features">Features</a>
|
||||
<a class="nl" href="/#screens">Screenshots</a>
|
||||
<a class="nl" href="/#demo">Demo</a>
|
||||
<a class="nl" href="/docs.html">Docs</a>
|
||||
<a class="nl" href="/api.html">API</a>
|
||||
<a class="nl" href="/about.html">About</a>
|
||||
<a class="nl" href="https://gitlab.com/DuarteSantos8/opengym" rel="noopener">GitLab <span data-gh="stars"></span></a>
|
||||
<a class="nl" href="https://discord.gg/e62jY6fwVb" rel="noopener">Discord <span data-dc="members"></span></a>
|
||||
<a class="nl coffee" href="https://buymeacoffee.com/duartesantos" rel="noopener">Buy me a coffee! <svg viewBox="0 0 24 24" aria-hidden="true"><path d="M20.216 6.415l-.132-.666c-.119-.598-.388-1.163-1.001-1.379-.197-.069-.42-.098-.57-.241-.152-.143-.196-.366-.231-.572-.065-.378-.125-.756-.192-1.133-.057-.325-.102-.69-.25-.987-.195-.4-.597-.634-.996-.788a5.723 5.723 0 00-.626-.194c-1-.263-2.05-.36-3.077-.416a25.834 25.834 0 00-3.7.062c-.915.083-1.88.184-2.75.5-.318.116-.646.256-.888.501-.297.302-.393.77-.177 1.146.154.267.415.456.692.58.36.162.737.284 1.123.366 1.075.238 2.189.331 3.287.37 1.218.05 2.437.01 3.65-.118.299-.033.598-.073.896-.119.352-.054.578-.513.474-.834-.124-.383-.457-.531-.834-.473-.466.074-.96.108-1.382.146-1.177.08-2.358.082-3.536.006a22.228 22.228 0 01-1.157-.107c-.086-.01-.18-.025-.258-.036-.243-.036-.484-.08-.724-.13-.111-.027-.111-.185 0-.212h.005c.277-.06.557-.108.838-.147h.002c.131-.009.263-.032.394-.048a25.076 25.076 0 013.426-.12c.674.019 1.347.067 2.017.144l.228.031c.267.04.533.088.798.145.392.085.895.113 1.07.542.055.137.08.288.111.431l.319 1.484a.237.237 0 01-.199.284h-.003c-.037.006-.075.01-.112.015a36.704 36.704 0 01-4.743.295 37.059 37.059 0 01-4.699-.304c-.14-.017-.293-.042-.417-.06-.326-.048-.649-.108-.973-.161-.393-.065-.768-.032-1.123.161-.29.16-.527.404-.675.701-.154.316-.199.66-.267 1-.069.34-.176.707-.135 1.056.087.753.613 1.365 1.37 1.502a39.69 39.69 0 0011.343.376.483.483 0 01.535.53l-.071.697-1.018 9.907c-.041.41-.047.832-.125 1.237-.122.637-.553 1.028-1.182 1.171-.577.131-1.165.2-1.756.205-.656.004-1.31-.025-1.966-.022-.699.004-1.556-.06-2.095-.58-.475-.458-.54-1.174-.605-1.793l-.731-7.013-.322-3.094c-.037-.351-.286-.695-.678-.678-.336.015-.718.3-.678.679l.228 2.185.949 9.112c.147 1.344 1.174 2.068 2.446 2.272.742.12 1.503.144 2.257.156.966.016 1.942.053 2.892-.122 1.408-.258 2.465-1.198 2.616-2.657.34-3.332.683-6.663 1.024-9.995l.215-2.087a.484.484 0 01.39-.426c.402-.078.787-.212 1.074-.518.455-.488.546-1.124.385-1.766zm-1.478.772c-.145.137-.363.201-.578.233-2.416.359-4.866.54-7.308.46-1.748-.06-3.477-.254-5.207-.498-.17-.024-.353-.055-.47-.18-.22-.236-.111-.71-.054-.995.052-.26.152-.609.463-.646.484-.057 1.046.148 1.526.22.577.088 1.156.159 1.737.212 2.48.226 5.002.19 7.472-.14.45-.06.899-.13 1.345-.21.399-.072.84-.206 1.08.206.166.281.188.657.162.974a.544.544 0 01-.169.364zm-6.159 3.9c-.862.37-1.84.788-3.109.788a5.884 5.884 0 01-1.569-.217l.877 9.004c.065.78.717 1.38 1.5 1.38 0 0 1.243.065 1.658.065.447 0 1.786-.065 1.786-.065.783 0 1.434-.6 1.499-1.38l.94-9.95a3.996 3.996 0 00-1.322-.238c-.826 0-1.491.284-2.26.613z"/></svg></a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- The one control that opens the contents, at every width. The drawer it opens is
|
||||
closed in CSS, so it is shut on first paint whether or not the script runs. -->
|
||||
<button class="toc-btn" id="tocbtn" aria-expanded="false" aria-controls="menu">
|
||||
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.9" stroke-linecap="round" aria-hidden="true"><path d="M4 6.5h16M4 12h16M4 17.5h10"/></svg>
|
||||
Contents
|
||||
</button>
|
||||
|
||||
<!-- The contents drawer: one list, one way in, one way out. Closed by default at
|
||||
every width, and no preference is remembered — see .side in styles.css. -->
|
||||
<aside class="side" id="menu" aria-label="Contents" aria-hidden="true">
|
||||
<div class="side-top">
|
||||
<p class="side-title">Contents</p>
|
||||
<button class="rail-close" aria-label="Close contents"><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" aria-hidden="true"><path d="M5 5l14 14M19 5L5 19"/></svg></button>
|
||||
</div>
|
||||
<p class="side-label">Documentation</p>
|
||||
<div class="side-group">
|
||||
<a class="side-link" href="#flavors"><b>Which openGym?</b></a>
|
||||
</div>
|
||||
<div class="side-group">
|
||||
<a class="side-link" href="#android"><b>Install on Android</b></a>
|
||||
</div>
|
||||
<div class="side-group">
|
||||
<a class="side-link" href="#iphone"><b>Use on iPhone</b></a>
|
||||
</div>
|
||||
<div class="side-group">
|
||||
<a class="side-link" href="#features"><b>Feature guide</b></a>
|
||||
<div class="side-subs">
|
||||
<a class="side-sub" href="#f-home">Home & the weekly plan</a>
|
||||
<a class="side-sub" href="#f-plan">Routines & plan builder</a>
|
||||
<a class="side-sub" href="#f-prog">Progression</a>
|
||||
<a class="side-sub" href="#f-workout">Running a workout</a>
|
||||
<a class="side-sub" href="#f-stats">Statistics</a>
|
||||
<a class="side-sub" href="#f-looks">Looks & languages</a>
|
||||
</div>
|
||||
</aside>
|
||||
</div></div>
|
||||
</div>
|
||||
<div class="side-group">
|
||||
<a class="side-link" href="#selfhost"><b>Self-hosting</b></a>
|
||||
<div class="side-subs">
|
||||
<a class="side-sub" href="#sh-passkey">The passkey rule</a>
|
||||
<a class="side-sub" href="#sh-https">HTTPS on your domain</a>
|
||||
<a class="side-sub" href="#sh-notify">Notifications</a>
|
||||
<a class="side-sub" href="#sh-stack">In an existing stack</a>
|
||||
<a class="side-sub" href="#sh-update">Updating</a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="side-group">
|
||||
<a class="side-link" href="#env"><b>Every setting</b></a>
|
||||
</div>
|
||||
<div class="side-group">
|
||||
<a class="side-link" href="#admin"><b>Admin & multi-user</b></a>
|
||||
<div class="side-subs">
|
||||
<a class="side-sub" href="#admin-log">The activity log</a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="side-group">
|
||||
<a class="side-link" href="#mobile-server"><b>Phone ↔ server</b></a>
|
||||
</div>
|
||||
<div class="side-group">
|
||||
<a class="side-link" href="#coach"><b>AI Coach</b></a>
|
||||
<div class="side-subs">
|
||||
<a class="side-sub" href="#coach-how">How it works</a>
|
||||
<a class="side-sub" href="#coach-providers">Providers</a>
|
||||
<a class="side-sub" href="#coach-local">Fully local</a>
|
||||
<a class="side-sub" href="#coach-phone">On the phone</a>
|
||||
<a class="side-sub" href="#coach-privacy">Privacy and limits</a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="side-group">
|
||||
<a class="side-link" href="#mcp"><b>Ask an AI (MCP)</b></a>
|
||||
</div>
|
||||
<div class="side-group">
|
||||
<a class="side-link" href="#import"><b>Import your history</b></a>
|
||||
<div class="side-subs">
|
||||
<a class="side-sub" href="#imp-hevy">Hevy, over the API</a>
|
||||
<a class="side-sub" href="#imp-csv">Your own CSV</a>
|
||||
<a class="side-sub" href="#imp-plans">Importing plans</a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="side-group">
|
||||
<a class="side-link" href="#backup"><b>Backups & your data</b></a>
|
||||
</div>
|
||||
<div class="side-group">
|
||||
<a class="side-link" href="#arch"><b>How it's built</b></a>
|
||||
</div>
|
||||
<div class="side-group">
|
||||
<a class="side-link" href="#build"><b>Build it yourself</b></a>
|
||||
</div>
|
||||
<div class="side-group">
|
||||
<a class="side-link" href="#troubleshoot"><b>Troubleshooting</b></a>
|
||||
<div class="side-subs">
|
||||
<a class="side-sub" href="#tr-passkey">Passkeys fail</a>
|
||||
<a class="side-sub" href="#tr-rest">Everything else</a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="side-group">
|
||||
<a class="side-link" href="#privacy"><b>Privacy</b></a>
|
||||
</div>
|
||||
<div class="side-group">
|
||||
<a class="side-link" href="#faq"><b>FAQ</b></a>
|
||||
</div>
|
||||
<p class="side-label">More</p>
|
||||
<a class="side-link" href="/"><b>Home</b><span>The tour, the demo, the download</span></a>
|
||||
<a class="side-link" href="api.html"><b>API</b><span>Every route, as an OpenAPI spec</span></a>
|
||||
<a class="side-link" href="about.html"><b>About</b><span>The story and the milestones</span></a>
|
||||
</aside>
|
||||
|
||||
<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://gitlab.com/DuarteSantos8/opengym/-/blob/main/docs" rel="noopener">in the repository</a>.</p>
|
||||
<p class="lead">The complete reference — every feature, every setting, every way to run
|
||||
openGym. The same documents live
|
||||
<a href="https://gitlab.com/DuarteSantos8/opengym/-/blob/main/docs" rel="noopener">in the repository</a>,
|
||||
next to the code they describe.</p>
|
||||
|
||||
<div class="toc">
|
||||
<a href="#android">Android</a>
|
||||
@@ -70,6 +192,17 @@
|
||||
<a href="#build">Build it yourself</a>
|
||||
<a href="#faq">FAQ</a>
|
||||
</div>
|
||||
<h2 id="flavors">Which openGym? The three flavors</h2>
|
||||
<p>One codebase, three ways to run it. Everything below applies to all of them unless a
|
||||
section says otherwise.</p>
|
||||
<table class="cfg">
|
||||
<tr><td><b>Mobile app</b></td><td>A sideloadable Android APK (and a buildable iOS app). No account, no server, no sync — the phone <i>is</i> the account, data lives in the app's private storage, workout-day reminders are native notifications. Install-and-done.</td></tr>
|
||||
<tr><td><b>Self-hosted</b></td><td>Two Docker containers on your own machine. Adds passkey profiles, sync across devices, installable as a home-screen PWA, optional admin dashboard, web push notifications. The flavor for households and training groups.</td></tr>
|
||||
<tr><td><b>Demo</b></td><td><a href="/demo/">The in-browser demo</a> — the real app seeded with example data, storing everything in your browser only. Useful to try before installing, and as a free plan editor (see <a href="#import">Import</a>).</td></tr>
|
||||
</table>
|
||||
<p>You can start with the mobile app and move to a server later (or the other way round) —
|
||||
the <a href="#backup">backup file</a> migrates everything, and the mobile app can also
|
||||
<a href="#mobile-server">connect directly to your server</a>.</p>
|
||||
|
||||
<h2 id="android">Install on Android</h2>
|
||||
<ol>
|
||||
@@ -82,8 +215,22 @@
|
||||
<div class="note">openGym is deliberately <b>not</b> on the Play Store — no store account
|
||||
between you and an open-source app. The APK is signed; updates install over the old
|
||||
version and keep your data.</div>
|
||||
<p>Everything is stored on the phone itself. The only things fetched from the internet are
|
||||
the exercise images and animations (from a CDN, on demand).</p>
|
||||
<p>The same signed APK exists in three places, all the same file:</p>
|
||||
<ul>
|
||||
<li>This site's <a href="/#download">download button</a>.</li>
|
||||
<li><a href="https://gitlab.com/DuarteSantos8/opengym/-/packages" rel="noopener">GitLab's package registry</a> —
|
||||
every version under <code>opengym-android/<version>/</code>, with a
|
||||
<code>.sha256</code> checksum beside it.</li>
|
||||
<li>The <a href="https://gitlab.com/DuarteSantos8/opengym/-/releases" rel="noopener">GitLab release</a> for that version, which links to both.</li>
|
||||
</ul>
|
||||
<p>Got the file from anywhere else? Verify it against the registry's <code>.sha256</code>
|
||||
before installing. Updates: download the new APK and install it over the old one — same
|
||||
signing key, data stays. Everything is stored on the phone itself; the only network
|
||||
traffic is fetching exercise images and animations from a CDN, on demand.</p>
|
||||
<p>The app requests notification permission only when you switch the workout-day reminder
|
||||
on, and declares <code>SCHEDULE_EXACT_ALARM</code> so reminders fire to the minute.
|
||||
Reminders are scheduled per calendar date — a day you already trained, or rescheduled
|
||||
away, stays quiet.</p>
|
||||
|
||||
<h2 id="iphone">Use on iPhone</h2>
|
||||
<p>Apple does not allow installing apps outside the App Store, so there is no iOS download —
|
||||
@@ -92,51 +239,334 @@
|
||||
<li><b>Self-host + home screen (recommended):</b> open your own openGym instance in
|
||||
Safari → <b>Share</b> → <b>Add to Home Screen</b>. You get a full-screen app with its
|
||||
own icon, passkey sign-in and sync — no expiry, no fees.</li>
|
||||
<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://gitlab.com/DuarteSantos8/opengym/-/blob/main/docs/MOBILE.md" rel="noopener">docs/MOBILE.md</a>.</li>
|
||||
<li><b>Build it onto your own iPhone:</b> 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 — <b>AltStore</b> can automate that re-signing over
|
||||
Wi-Fi). See <a href="https://gitlab.com/DuarteSantos8/opengym/-/blob/main/docs/MOBILE.md" rel="noopener">docs/MOBILE.md</a>.</li>
|
||||
<li><b>Just looking?</b> Try the <a href="/demo/">in-browser demo</a> — the real app with
|
||||
example data, no account and nothing to install. The Android app above needs no account either.</li>
|
||||
example data, no account and nothing to install.</li>
|
||||
</ul>
|
||||
|
||||
<h2 id="features">The app, feature by feature</h2>
|
||||
<p>What's actually inside, grouped the way you'll meet it. All of it ships in every flavor.</p>
|
||||
|
||||
<h3 id="f-home">Home & the weekly plan</h3>
|
||||
<ul>
|
||||
<li><b>A routine per weekday.</b> The home screen knows what day it is, shows this week
|
||||
with what's done and what's planned, and starts today's session with one tap.</li>
|
||||
<li><b>Reschedule any day.</b> Sick, missed a session, fewer gym days this week? Move a
|
||||
workout to another date without touching the weekly plan itself — the override applies
|
||||
to that date only.</li>
|
||||
<li><b>Weeks start where you say.</b> Monday or Sunday, in Settings → General. The
|
||||
weekly plan, the day strip on Home, the calendar grid and every “this week”
|
||||
total — the workout count, the week streak, the seven-day muscle balance —
|
||||
all follow it. Existing profiles keep the Monday week they have been looking at.</li>
|
||||
<li><b>On a rest day it says what’s next.</b> Rather than a full stop, the Home row
|
||||
names the next day that actually has something to train, and which routine it is.
|
||||
Rescheduled days count; a routine with no exercises in it does not.</li>
|
||||
<li><b>Body weight on the home screen:</b> your latest weigh-in, the trend, and how far
|
||||
you are from the goal you set.</li>
|
||||
<li><b>Streaks:</b> consecutive training weeks, workouts this week, and totals.</li>
|
||||
</ul>
|
||||
|
||||
<h3 id="f-plan">Routines & the plan builder</h3>
|
||||
<ul>
|
||||
<li><b>1,324 exercises</b> — searchable, with animated demonstrations and step-by-step
|
||||
instructions, plus a <b>filter for the equipment you actually own</b> (the filter
|
||||
options adapt to what you've picked, so every combination on screen has results).</li>
|
||||
<li><b>Your own exercises:</b> a name and a body part is enough; they behave like built-in
|
||||
ones everywhere, with an optional description instead of an animation.</li>
|
||||
<li><b>Supersets:</b> plan them into a routine, or pair two exercises <i>mid-session</i>
|
||||
with "make superset with previous/next" — then work through the group back-to-back
|
||||
with a single rest at the end of each round. Unpair any time; a group of one
|
||||
dissolves itself.</li>
|
||||
<li><b>Warm-up sets:</b> mark the ramp-up rows as warm-ups and they stay out of every
|
||||
number that shouldn't see them — no effect on estimated 1RM, progression, or the
|
||||
fatigue map, while still being right there in the session. A weight change cascades
|
||||
down the rows that share its phase, not across the divide.</li>
|
||||
<li><b>Timed exercises:</b> planks, hangs, wall sits and loaded carries are logged by
|
||||
time, not reps — with a work timer that counts the set itself (separate from the rest
|
||||
timer) and logs the time you actually held. They can carry weight too.</li>
|
||||
<li><b>Cardio:</b> logged as time + speed, not weight × reps.</li>
|
||||
<li><b>Bodyweight exercises, logged as bodyweight:</b> push-ups, pull-ups, dips and
|
||||
300-odd others arrive knowing they carry no load — no weight column, no working-weight
|
||||
prompt, one stepper for the reps. Add a dip belt and it reads as an addition.</li>
|
||||
<li><b>Reps per side:</b> for lunges, single-arm rows and the rest. You log the total,
|
||||
the app shows the split ("8 per side"), and targets step in twos so they never land
|
||||
on a number one side can't have.</li>
|
||||
<li><b>Rest per exercise:</b> heavy triples and curls don't want the same break — give any
|
||||
exercise its own rest time and it overrides the global timer for that exercise. A
|
||||
superset rests once, taking the longest. Travels with shared plans.</li>
|
||||
<li><b>Share a plan:</b> send someone your routines and week schedule as a small file
|
||||
(no workouts, no weigh-ins), or print it as a clean PDF. Importing merges — their own
|
||||
plan is never overwritten.</li>
|
||||
<li><b>Muscle preview:</b> while you build a routine, the body diagram shows what it
|
||||
hits.</li>
|
||||
</ul>
|
||||
|
||||
<h3 id="f-prog">Progression — weights that follow a rule</h3>
|
||||
<ul>
|
||||
<li>Pick a progression program <b>per routine, overridable per exercise</b>:
|
||||
<ul>
|
||||
<li><b>Linear</b> — add a fixed increment when you hit your reps.</li>
|
||||
<li><b>Greyskull LP</b> — AMRAP top set, double jumps for beating the target big,
|
||||
10 % resets on a stall.</li>
|
||||
<li><b>Double progression</b> — through a visible rep range (both bounds editable);
|
||||
reps climb first, then the weight steps and reps reset. Per-side exercises step
|
||||
in twos.</li>
|
||||
<li><b>Timed progression</b> — adding seconds instead of weight.</li>
|
||||
</ul></li>
|
||||
<li>Your weights are already right when the session opens, and <b>every target says
|
||||
why</b> it's that number. Missed reps never advance the load; stalls trigger a deload;
|
||||
bodyweight exercises progress in reps instead — and past a rep ceiling you set, a set
|
||||
is added instead of a rep, up to the point where the honest advice is load or a harder
|
||||
variation.</li>
|
||||
<li><b>Planned deloads:</b> flag a routine as excluded from automatic progression — its
|
||||
sessions open with the routine's own target weights, stay in your history and
|
||||
statistics, and never become the baseline your next regular session progresses
|
||||
from.</li>
|
||||
</ul>
|
||||
|
||||
<h3 id="f-workout">Running a workout</h3>
|
||||
<ul>
|
||||
<li><b>Guided sessions:</b> today's routine opens with weights pre-filled from last time,
|
||||
animated demos, a rest timer, and PR detection as you log.</li>
|
||||
<li><b>It asks your body weight first</b> — one habit, one chart.</li>
|
||||
<li><b>Plate math for barbell work.</b> Barbell, olympic, EZ, trap bar and Smith machine
|
||||
exercises carry a bar weight — 20 kg / 45 lb and the rest of the usual
|
||||
markings, or your own number per exercise — and the set in front of you shows
|
||||
the split: <i>Bar 20 kg · 30 kg per side</i>. Tap it to change the bar
|
||||
mid-session. You still log the <b>total</b>, so history, progression and estimated 1RM
|
||||
keep meaning exactly what they always did.</li>
|
||||
<li><b>Animations are your call:</b> the demo for each exercise can be full size, small, or
|
||||
hidden entirely during a workout (Settings → During a workout). Hidden collapses
|
||||
the media instead of leaving a gap.</li>
|
||||
<li><b>The screen stays awake while you train</b> — on for as long as a workout runs,
|
||||
released the moment you finish, switchable off in Settings. (Needs HTTPS or
|
||||
localhost; iOS refuses the wake lock in Low Power Mode.)</li>
|
||||
<li><b>Change your mind mid-session:</b> add an exercise you decided to do, or remove one
|
||||
you didn't, without ending the workout. Removing a member of a superset asks which
|
||||
one.</li>
|
||||
<li><b>Freestyle sessions:</b> train without a plan and pick exercises as you go — each
|
||||
arrives prefilled from the last time you did it, same sets, same reps and weights by
|
||||
position.</li>
|
||||
<li><b>Log a past workout:</b> forgot your phone, trained on paper, switched apps? Add a
|
||||
session after the fact from History — date, start time, duration, routine or
|
||||
freestyle, then the normal workout screen. If that day already has a workout you
|
||||
choose: replace, keep both, or cancel. Backfilled sessions never claim PRs against
|
||||
workouts that came later.</li>
|
||||
<li><b>Effort per set, in your scale:</b> an optional third column rating how hard a set
|
||||
was, as <b>RIR</b> (reps left in the tank) or <b>RPE</b> (the same judgement on a
|
||||
10-point scale). Off by default; each set keeps the scale it was logged with, and
|
||||
nothing else reads the value — progression and 1RM are unaffected.</li>
|
||||
<li><b>See the timer end, not just hear it:</b> an opt-in screen flash when a rest or
|
||||
work timer finishes — for loud gyms and headphones.</li>
|
||||
<li><b>Rest-timer push notifications</b> even with the app closed (self-hosted; the
|
||||
mobile app uses native notifications).</li>
|
||||
</ul>
|
||||
|
||||
<h3 id="f-stats">Statistics</h3>
|
||||
<ul>
|
||||
<li><b>Activity heatmap:</b> a GitHub-style year view, shaded by time spent training.</li>
|
||||
<li><b>Estimated 1RM</b> per exercise, from your best eligible set (it names which one),
|
||||
with its own progress curve and a calculator for sets you haven't done. It won't
|
||||
guess above 12 reps, and warm-up sets don't count.</li>
|
||||
<li><b>Muscle map, three ways</b> — a front-and-back body diagram (male or female figure,
|
||||
your pick) readable as:
|
||||
<ul>
|
||||
<li><b>Balance</b> — where the volume went, over a week, a month or all time,
|
||||
naming the muscles you <i>haven't</i> trained;</li>
|
||||
<li><b>Fatigue</b> — what is still recovering, weighted by how close each set was to
|
||||
your maximum, decaying smoothly rather than expiring at a window edge;</li>
|
||||
<li><b>Strength</b> — how long since you trained each muscle, and behind every one
|
||||
the exercises that built it with their estimated 1RM.</li>
|
||||
</ul>
|
||||
It also previews what a routine hits while you build it, and shows what you just
|
||||
trained when you finish.</li>
|
||||
<li><b>Body-weight chart</b> with a goal line you set — gains and losses colored by
|
||||
whether they move toward it.</li>
|
||||
<li><b>PRs</b> detected as you train, listed per exercise.</li>
|
||||
</ul>
|
||||
|
||||
<h3 id="f-looks">Looks, languages & little things</h3>
|
||||
<ul>
|
||||
<li><b>Light/dark themes and 8 accent colors</b>, saved to your profile, over a
|
||||
hand-drawn icon set instead of emoji — it looks the same on every phone.</li>
|
||||
<li><b>14 languages</b> — EN, DE, ES, FR, IT, PT (Portugal), PT (Brazil), PL, TR, RU,
|
||||
ZH, KO, HI, TH, HU. Exercise instructions are localized in 12 of them, and built-in
|
||||
exercise names show bilingually in PT-BR and HU. Translations load on demand, so the
|
||||
app stays fast.</li>
|
||||
<li><b>kg or lb</b> — pick your unit; imports convert.</li>
|
||||
<li><b>Workout-day reminder:</b> an optional notification on days you have a workout
|
||||
planned but haven't logged one. It fires at <i>your</i> local time — each device
|
||||
reports its own timezone — and follows you if you travel.</li>
|
||||
<li><b>Installable PWA</b> (self-hosted): add it to your home screen from any browser and
|
||||
it opens full-screen with its own icon.</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>
|
||||
<p>The self-hosted flavor is two small containers (web + API) and a folder of your data.
|
||||
You need <a href="https://docs.docker.com/get-docker/" rel="noopener">Docker</a> with
|
||||
Compose:</p>
|
||||
<pre><code>git clone https://gitlab.com/DuarteSantos8/opengym
|
||||
cd openGym
|
||||
cp .env.example .env
|
||||
docker compose pull # prebuilt images (amd64 + arm64) — skip to build from source
|
||||
docker compose up -d</code></pre>
|
||||
<p>Open <code>http://localhost:8080</code>, tap <b>Create profile</b>, and you're in. The
|
||||
first launch downloads the exercise media (~140 MB) once.</p>
|
||||
<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://gitlab.com/DuarteSantos8/opengym/-/blob/main/docs/SELF_HOSTING.md" rel="noopener">docs/SELF_HOSTING.md</a>.</div>
|
||||
first launch downloads the exercise media (~140 MB) once into <code>media/img</code>
|
||||
and <code>media/gif</code>. Check it's healthy:</p>
|
||||
<pre><code>docker compose ps
|
||||
curl http://localhost:8080/api/health # {"ok":true,...}</code></pre>
|
||||
<p>Logs: <code>docker compose logs -f</code> · stop: <code>docker compose down</code> ·
|
||||
build from source instead of pulling: skip the <code>pull</code> and run
|
||||
<code>docker compose up -d --build</code> — no Node needed locally either way.</p>
|
||||
|
||||
<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>
|
||||
<h3 id="sh-passkey">The passkey rule (read this before opening a port)</h3>
|
||||
<p>openGym signs you in with <b>passkeys</b> (WebAuthn — Face ID, fingerprint, or your
|
||||
password manager). Browsers enforce two rules: a passkey is bound to an exact
|
||||
<b>hostname</b>, and it only works over <b>HTTPS</b> — with one exception,
|
||||
<code>http://localhost</code>.</p>
|
||||
<p>So <code>http://localhost:8080</code> works on the Docker machine, but your phone
|
||||
<b>cannot</b> use <code>http://192.168.x.x:8080</code> — that's neither localhost nor
|
||||
HTTPS, and the passkey prompt won't appear. To use openGym from your phone you need a
|
||||
real HTTPS hostname (below). Until then, LAN devices can still use <b>guest mode</b>
|
||||
(data stays in that browser) or the <a href="#mobile-server">mobile app's pairing
|
||||
mode</a>.</p>
|
||||
|
||||
<h3 id="sh-https">HTTPS on your own domain</h3>
|
||||
<p>Put anything that terminates TLS in front of the <code>web</code> container. Pick
|
||||
whichever you already run:</p>
|
||||
<ul>
|
||||
<li><b>Cloudflare Tunnel</b> (no open ports): route <code>gym.example.com</code> →
|
||||
<code>http://<docker-host>:8080</code>. HTTPS comes with it.</li>
|
||||
<li><b>Caddy</b> (automatic Let's Encrypt): <code>gym.example.com { reverse_proxy localhost:8080 }</code></li>
|
||||
<li><b>Traefik / nginx / Nginx Proxy Manager:</b> route the HTTPS hostname to
|
||||
<code>web:80</code> or <code><docker-host>:8080</code>. Any proxy works.</li>
|
||||
</ul>
|
||||
<p>Then set the domain in <code>.env</code> and apply it:</p>
|
||||
<pre><code># .env
|
||||
RP_ID=gym.example.com
|
||||
ORIGIN=https://gym.example.com
|
||||
|
||||
docker compose up -d # restart alone does NOT re-read .env</code></pre>
|
||||
<p>Visit your domain, create your profile, add it to the home screen (iOS: Share → Add to
|
||||
Home Screen · Android: ⋮ → Add to Home screen).</p>
|
||||
<div class="note">Changing <code>RP_ID</code> later invalidates existing passkeys — they
|
||||
were bound to the old hostname, and everyone registers again. Settle the domain before
|
||||
people join.</div>
|
||||
<p>Want a valid certificate <b>without</b> exposing anything to the internet — HTTPS on a
|
||||
LAN-only address? That works too (wildcard cert via a DNS challenge, Caddy in front):
|
||||
<a href="https://gitlab.com/DuarteSantos8/opengym/-/blob/main/docs/SELF_HOSTING_HTTPS.md" rel="noopener">docs/SELF_HOSTING_HTTPS.md</a>.
|
||||
A VPN or an auth proxy (Authelia, Cloudflare Access…) in front composes with all of
|
||||
this.</p>
|
||||
|
||||
<h3 id="sh-notify">Notifications</h3>
|
||||
<p>A self-hosted instance can push two kinds of alert to your phone or desktop, even with
|
||||
the app closed: <b>rest timer over</b>, and the <b>workout-day reminder</b>. Turn them on
|
||||
per profile in <b>Settings → Notifications</b> (needs a signed-in profile and HTTPS).
|
||||
Nothing to configure server-side: VAPID keys are generated on first run and saved to
|
||||
<code>./data/vapid.json</code>, and each browser reports its own timezone. Set
|
||||
<code>VAPID_SUBJECT=mailto:you@example.com</code> if you'd rather push services could
|
||||
reach an inbox than your origin URL.</p>
|
||||
|
||||
<h3 id="sh-stack">Fitting it into an existing stack</h3>
|
||||
<p>The defaults assume openGym is alone: a service called <code>api</code> on port 3000,
|
||||
nginx on 80 inside the web container. Merging into a compose file that already has an
|
||||
<code>api</code>, or fronting it with your own proxy on another port, is four
|
||||
<code>.env</code> settings — <code>WEB_PORT</code>, <code>NGINX_PORT</code>,
|
||||
<code>BACKEND</code>, <code>PORT</code>. The web image renders its nginx config from
|
||||
these <i>at container start</i>, so they work on a prebuilt image, no rebuild.</p>
|
||||
|
||||
<h3 id="sh-update">Updating</h3>
|
||||
<pre><code>git pull # picks up compose/config changes
|
||||
docker compose pull # (or: docker compose up -d --build, if building from source)
|
||||
docker compose up -d</code></pre>
|
||||
<p>Your <code>./data</code> and the downloaded media are untouched; the app shell is
|
||||
versioned so clients pick up changes on next load. Releases are announced on
|
||||
<a href="https://gitlab.com/DuarteSantos8/opengym/-/releases" rel="noopener">GitLab</a>
|
||||
and <a href="https://discord.gg/e62jY6fwVb" rel="noopener">Discord</a>; container images
|
||||
(amd64 + arm64) are published to
|
||||
<a href="https://gitlab.com/DuarteSantos8/opengym/container_registry" rel="noopener">GitLab's registry</a>
|
||||
on every release.</p>
|
||||
|
||||
<h2 id="env">Every setting</h2>
|
||||
<p>All configuration is one <code>.env</code> file (see <code>.env.example</code>); the
|
||||
defaults are what you get if you touch nothing.</p>
|
||||
<table class="cfg">
|
||||
<tr><td><code>RP_ID</code> / <code>ORIGIN</code></td><td>The domain passkeys are bound to, and the full URL you serve from. The two must agree, or sign-in fails.</td></tr>
|
||||
<tr><td><code>RP_ID</code></td><td>Hostname passkeys are bound to. A <b>bare hostname</b>: no scheme, no port, no slash. Default <code>localhost</code>.</td></tr>
|
||||
<tr><td><code>ORIGIN</code></td><td>Full URL the app is served from — <i>with</i> scheme, <i>without</i> trailing slash. Must match the address bar exactly. Default <code>http://localhost:8080</code>.</td></tr>
|
||||
<tr><td><code>RP_NAME</code></td><td>Name shown in the passkey prompt. Default <code>openGym</code>.</td></tr>
|
||||
<tr><td><code>WEB_PORT</code></td><td>Host port for the web UI. Default <code>8080</code>.</td></tr>
|
||||
<tr><td><code>INVITE_ONLY</code></td><td>Set <code>1</code> and new profiles need an invite code you generate.</td></tr>
|
||||
<tr><td><code>ALLOW_GUEST</code></td><td>Set <code>0</code> to remove <b>Continue without account</b>, so everyone using the instance has a profile.</td></tr>
|
||||
<tr><td><code>ADMIN_UIDS</code></td><td>Which user ids get the admin dashboard.</td></tr>
|
||||
<tr><td><code>SESSION_DAYS</code></td><td>How long a sign-in lasts. Default <code>90</code>.</td></tr>
|
||||
<tr><td><code>BACKEND</code> / <code>PORT</code> / <code>NGINX_PORT</code></td><td>For fitting openGym into a stack that already has an <code>api</code> service, or putting it behind your own proxy on another port. The web container renders its nginx config at start-up, so these work on a prebuilt image.</td></tr>
|
||||
<tr><td><code>NGINX_PORT</code></td><td>Port the web container listens on, inside the container. Default <code>80</code>.</td></tr>
|
||||
<tr><td><code>BACKEND</code></td><td>Name of the API service <code>/api</code> is proxied to — change it if yours isn't called <code>api</code>.</td></tr>
|
||||
<tr><td><code>PORT</code></td><td>Port the API listens on; the web container proxies to the same value. Default <code>3000</code>.</td></tr>
|
||||
<tr><td><code>SESSION_DAYS</code></td><td>How long a sign-in lasts, in days. Default <code>90</code>.</td></tr>
|
||||
<tr><td><code>ADMIN_UIDS</code></td><td>Comma-separated user ids that get the <a href="#admin">admin dashboard</a>. Default: none — a fresh instance has no admin.</td></tr>
|
||||
<tr><td><code>INVITE_ONLY</code></td><td>Set <code>1</code> and new profiles need an invite code you generate from the dashboard. Existing accounts keep working. Default: off.</td></tr>
|
||||
<tr><td><code>ALLOW_GUEST</code></td><td>Set <code>0</code> to remove <b>Continue without account</b>. Guest data isn't deleted — it stays in that browser and returns if you re-enable guests, or moves into a profile created on the same device. Default: on.</td></tr>
|
||||
<tr><td><code>AUDIT_LOG</code></td><td>Record sign-ins and admin actions to the <a href="#admin-log">activity log</a> — set <code>0</code> to record nothing. Default: on.</td></tr>
|
||||
<tr><td><code>AUDIT_MAX</code></td><td>Events kept in the activity log; <code>0</code> for no limit. Default <code>5000</code>.</td></tr>
|
||||
<tr><td><code>AUDIT_DAYS</code></td><td>Days kept in the activity log; <code>0</code> to keep until <code>AUDIT_MAX</code>. Default <code>90</code>.</td></tr>
|
||||
<tr><td><code>AUDIT_IP</code></td><td>Record the caller's address: <code>off</code>, <code>net</code> (network only, e.g. <code>203.0.113.0/24</code>) or <code>full</code>. Default <code>off</code>.</td></tr>
|
||||
<tr><td><code>VAPID_SUBJECT</code></td><td>Contact URL sent with push notifications. Default: your <code>ORIGIN</code>.</td></tr>
|
||||
<tr><td><code>COACH_DISABLED</code></td><td>Set <code>1</code> to switch the <a href="#coach">AI Coach</a> off harder than any toggle. <code>COACH_JOB_TIMEOUT_MS</code> raises the job budget for slow local models.</td></tr>
|
||||
</table>
|
||||
<p>Two things that look like settings but aren't: <code>DATA_DIR</code> is pinned to
|
||||
<code>/data</code> by <code>docker-compose.yml</code> and mapped to <code>./data</code> —
|
||||
change the host side of that volume, not the variable. And
|
||||
<code>VITE_IMG_BASE</code>/<code>VITE_GIF_BASE</code> are <b>build-time</b> values baked
|
||||
into the frontend bundle — setting them next to <code>docker compose</code> does nothing
|
||||
to a prebuilt image (see <a href="#troubleshoot">Troubleshooting</a>).</p>
|
||||
|
||||
<h2 id="mcp">Ask an AI about your training</h2>
|
||||
<p>openGym ships an optional <b>MCP server</b>: a small read-only bridge that lets a client
|
||||
like Claude Desktop or Cursor answer questions from your actual log — <i>"what did I bench
|
||||
last week?"</i>, <i>"which muscle have I not trained this month?"</i>, <i>"what's my
|
||||
estimated 1RM on squats?"</i></p>
|
||||
<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://gitlab.com/DuarteSantos8/opengym/-/blob/main/mcp/README.md" rel="noopener">mcp/README.md</a>.</p>
|
||||
<h2 id="admin">Multiple users, admin & the activity log</h2>
|
||||
<p>Anyone who can reach the URL can create their own profile — each gets isolated data.
|
||||
That's the default: open signup, no admin. To control who gets in:</p>
|
||||
<pre><code>ADMIN_UIDS=youruserid # your id is in ./data/db.json under users[].id
|
||||
INVITE_ONLY=1 # new profiles need an invite code
|
||||
ALLOW_GUEST=0 # remove "Continue without account"</code></pre>
|
||||
<p>Register your own passkey profile <i>first</i>, then put your id in
|
||||
<code>ADMIN_UIDS</code>. You'll get an <b>Admin dashboard</b> link in Settings: who's
|
||||
training right now, each user's workout history and body weight, disabling an account
|
||||
(signed out and locked out everywhere until re-enabled), and — with invite-only on —
|
||||
generating and revoking invite codes. Admin access rides on your passkey and is enforced
|
||||
server-side; there is no separate admin login.</p>
|
||||
<p><code>INVITE_ONLY</code> and <code>ALLOW_GUEST</code> answer different questions and are
|
||||
usually set together: invite-only controls who may <i>create a profile</i>; the guest
|
||||
button never creates one — guest mode keeps everything in that browser and never talks
|
||||
to the server at all.</p>
|
||||
<h3 id="admin-log">The activity log</h3>
|
||||
<p>The dashboard keeps an activity log: sign-ins, sign-outs, failed attempts, refused
|
||||
signups, and every admin action. It lives in <code>./data/audit.log</code> as one JSON
|
||||
object per line — <code>tail -f</code> and <code>jq</code> work on it directly, and the
|
||||
dashboard reads the same file. On by default, keeping the last 5,000 events or 90 days,
|
||||
whichever comes first.</p>
|
||||
<p>What it deliberately does <b>not</b> record: IP addresses (unless you opt in via
|
||||
<code>AUDIT_IP</code>), browser user-agents (a fingerprint), and the passkey id of a
|
||||
failed sign-in (it would let you follow an unknown device between attempts). Guests
|
||||
never appear — nothing they do touches the server. Clearing the log records the clear
|
||||
itself, and event ids keep counting, so a gap is always visible.</p>
|
||||
|
||||
<h2 id="mobile-server">Connecting the mobile app to your server</h2>
|
||||
<p>The mobile app normally keeps everything on the phone. It can instead <b>connect to
|
||||
your self-hosted instance</b> — your data then lives there, synced like the browser PWA.
|
||||
Same app, not a different download; offered on first launch and under Settings →
|
||||
<b>Connect to my server</b>.</p>
|
||||
<p>Passkeys can't work inside the app's WebView (it never runs at your real hostname), so
|
||||
the device is <b>paired</b> instead:</p>
|
||||
<ol>
|
||||
<li>In a browser that's already signed in: Settings → <b>Pair the mobile app</b> — shows
|
||||
a one-time code, valid 5 minutes.</li>
|
||||
<li>In the app: enter your server's address and that code. Done.</li>
|
||||
</ol>
|
||||
<p>Worth knowing: the pairing exchanges the code for a bearer token that is the same signed
|
||||
value a session cookie carries — so <b>"sign out everywhere"</b> in the browser revokes
|
||||
paired apps too. Use an HTTPS address if at all possible (the token would otherwise
|
||||
cross the network in plain text). A connected app needs network access while in use —
|
||||
no offline mirror, same as the browser PWA. Settings → <b>Disconnect</b> syncs one last
|
||||
time, then drops the device cleanly back to local mode. (For the curious: it's
|
||||
<code>POST /api/pair/create</code> + <code>/api/pair/redeem</code> in
|
||||
<code>api/server.js</code>.)</p>
|
||||
|
||||
<h2 id="coach">Let an AI coach write your plan</h2>
|
||||
<p>Separate from the read-only bridge above, openGym has an optional <b>AI Coach</b>. Answer a
|
||||
@@ -147,7 +577,7 @@ docker compose up -d</code></pre>
|
||||
the rest alone. If the admin allows it and at least three people opt in, it can show
|
||||
anonymous medians so you can see how you sit against the others on your instance.</p>
|
||||
|
||||
<h3>How it works</h3>
|
||||
<h3 id="coach-how">How it works</h3>
|
||||
<p>The Coach is a chat. The first visit is a short intake, one question per screen; after
|
||||
that, every request works the same way:</p>
|
||||
<ol>
|
||||
@@ -167,7 +597,7 @@ docker compose up -d</code></pre>
|
||||
undone in one tap.</li>
|
||||
</ol>
|
||||
|
||||
<h3>Providers</h3>
|
||||
<h3 id="coach-providers">Providers</h3>
|
||||
<p>It is <b>off by default</b>. An admin turns it on in <b>Settings → Admin → AI Coach</b> and
|
||||
picks who answers:</p>
|
||||
<table class="cfg">
|
||||
@@ -213,13 +643,13 @@ docker compose up -d</code></pre>
|
||||
<p>A GPU machine elsewhere on your LAN works the same way: run Ollama or LM Studio there and
|
||||
point the Base URL at it, e.g. <code>http://192.168.1.50:11434</code>.</p>
|
||||
|
||||
<h3>On the phone</h3>
|
||||
<h3 id="coach-phone">On the phone</h3>
|
||||
<p><b>Settings → AI Coach</b> offers two ways in: pair the phone with your self-hosted
|
||||
instance and the Coach runs there under the rules above, or bring your own API key and the
|
||||
phone calls the provider directly — same allowlist, same validator, key in the platform's
|
||||
secure storage, ten runs a day.</p>
|
||||
|
||||
<h3>Privacy and limits</h3>
|
||||
<h3 id="coach-privacy">Privacy and limits</h3>
|
||||
<p>Before anyone uses it, a consent screen lists exactly which categories of data leave the
|
||||
server — generated from the same module that builds the payloads, so it cannot drift from
|
||||
what actually happens. The admin can cap runs per person and per instance per day, and
|
||||
@@ -228,65 +658,242 @@ docker compose up -d</code></pre>
|
||||
professional. Full details, including exactly what is sent and how credentials are stored:
|
||||
<a href="https://gitlab.com/DuarteSantos8/opengym/-/blob/main/docs/AI_COACH.md" rel="noopener">docs/AI_COACH.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>
|
||||
<ul>
|
||||
<li><b>FitNotes</b> (both the Android and the FitNotes 2 iOS export)</li>
|
||||
<li><b>Strong</b> and <b>Hevy</b> (CSV exports — session lengths carry over, so the
|
||||
activity heatmap fills in properly)</li>
|
||||
<li><b>Apple Health</b> (body-weight history from the XML export)</li>
|
||||
<li>…and anything else with date, exercise-name and weight/reps columns</li>
|
||||
</ul>
|
||||
<p>Exercise names are matched against the 1,324-exercise library; anything genuinely
|
||||
ambiguous becomes one of your own custom exercises instead of being guessed at. A summary
|
||||
shows exactly what will happen before anything is written, and importing is idempotent —
|
||||
running it twice never duplicates a workout.</p>
|
||||
<h2 id="mcp">Ask an AI about your training (MCP)</h2>
|
||||
<p>openGym ships an optional <b>MCP server</b>: a small read-only bridge that lets a client
|
||||
like Claude Desktop, Cursor or Cline answer questions from your actual log — <i>"what
|
||||
did I bench last week?"</i>, <i>"which muscle have I not trained this month?"</i>. It
|
||||
runs on your machine, is spawned by the client over stdio, reads the same
|
||||
<code>./data</code> files the API writes, and its numbers come from the <b>same pure
|
||||
functions the Stats screen uses</b> — so the answers match the app exactly.</p>
|
||||
<p>Eight tools in v1:</p>
|
||||
<table class="cfg">
|
||||
<tr><td><code>list_routines</code></td><td>What routines are saved? (names + exercise counts)</td></tr>
|
||||
<tr><td><code>get_routine</code></td><td>What does one routine prescribe, set by set?</td></tr>
|
||||
<tr><td><code>get_week_plan</code></td><td>This week's plan, including any date override.</td></tr>
|
||||
<tr><td><code>list_workouts</code></td><td>Recent sessions — dates, sets done/planned, volume, duration, PRs.</td></tr>
|
||||
<tr><td><code>get_workout</code></td><td>Full set-by-set breakdown of one session, by id or date.</td></tr>
|
||||
<tr><td><code>get_bodyweight</code></td><td>Weigh-ins, the goal line, deltas vs goal.</td></tr>
|
||||
<tr><td><code>estimate_1rm</code></td><td>Best 1RM for an exercise + trend, or a PR table across all.</td></tr>
|
||||
<tr><td><code>muscle_balance</code></td><td>Muscles trained this week/month/all-time, ranked — and the neglected ones.</td></tr>
|
||||
</table>
|
||||
<p>It is <b>not part of the Docker build</b> — if you don't use an AI assistant, it simply
|
||||
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 <code>cd mcp && npm
|
||||
install</code> plus a few lines of client config:
|
||||
<a href="https://gitlab.com/DuarteSantos8/opengym/-/blob/main/mcp/README.md" rel="noopener">mcp/README.md</a>.</p>
|
||||
|
||||
<h2 id="backup">Backups</h2>
|
||||
<h2 id="import">Import your training history</h2>
|
||||
<p>Coming from another tracker? <b>Settings → Data → Import from another app</b> reads a
|
||||
CSV export; these apps work without touching the file:</p>
|
||||
<table class="cfg">
|
||||
<tr><td><b>FitNotes</b> (Android)</td><td>Settings → Backup/Export → Spreadsheet Export</td></tr>
|
||||
<tr><td><b>FitNotes 2</b> (iOS)</td><td>Export workouts as CSV</td></tr>
|
||||
<tr><td><b>Strong</b></td><td>Settings → Export Data</td></tr>
|
||||
<tr><td><b>Hevy</b></td><td>Settings → Export & Import Data (workouts or measurements) — or skip the CSV entirely, below</td></tr>
|
||||
<tr><td><b>Gravl</b></td><td>Profile → Export Data</td></tr>
|
||||
<tr><td><b>Apple Health</b></td><td>Body-weight history straight out of the XML export</td></tr>
|
||||
</table>
|
||||
<p>Exercise names are matched against the library; anything genuinely ambiguous becomes one
|
||||
of your own custom exercises instead of being guessed at — nothing in the file is
|
||||
dropped. Session lengths and the RPE they record carry over. A summary shows exactly
|
||||
what will happen before anything is written, and importing is <b>idempotent</b> —
|
||||
running it twice never duplicates a workout.</p>
|
||||
<h3 id="imp-hevy">Hevy, directly over the API</h3>
|
||||
<p>With <b>Hevy Pro</b>, skip the CSV: create an API key under
|
||||
<a href="https://hevy.com/settings?developer" rel="noopener">Hevy → Settings → Developer</a>,
|
||||
then in openGym use <b>Settings → Import from Hevy</b>, paste the key (used only for that
|
||||
import — never saved), and choose any mix of <b>workouts</b>, <b>routines</b> and
|
||||
<b>weigh-ins</b>. Workout days that already have data here are left alone; imported
|
||||
routines are always added as new plans.</p>
|
||||
<h3 id="imp-csv">Rolling your own CSV</h3>
|
||||
<p>Anything with date, exercise-name and weight/reps columns imports. Minimal example:</p>
|
||||
<pre><code>workout name,exercise,date,weight kg,reps
|
||||
Leg Day,Squat,2026-08-21,120,5
|
||||
Leg Day,Squat,2026-08-21,125,4
|
||||
Leg Day,Leg Press,2026-08-21,200,1</code></pre>
|
||||
<p>Recognised headers (first match wins) for each field: <i>exercise</i> (also
|
||||
<code>exercise name/title</code>), <i>date</i> (<code>workout date</code>),
|
||||
<i>start/end time</i>, <i>workout name</i> (<code>title</code>, <code>workout</code>),
|
||||
<i>category</i> (<code>body part</code>, <code>muscle group</code>), <i>weight</i>
|
||||
(<code>weight kg</code>, <code>weight lbs</code>, plus a <code>weight unit</code>
|
||||
column), <i>reps</i> (<code>repetitions</code>), <i>rpe</i>, <i>rir</i>
|
||||
(<code>reps in reserve</code>), <i>distance</i> (<code>distance km</code> + unit),
|
||||
<i>seconds</i> (<code>duration seconds</code>, <code>set duration sec</code>),
|
||||
<i>time</i> (<code>duration</code>), <i>set type</i>, <i>note</i>
|
||||
(<code>comment(s)</code>, <code>notes</code>, <code>workout notes</code>). The full
|
||||
table lives in
|
||||
<a href="https://gitlab.com/DuarteSantos8/opengym/-/blob/main/docs/DATA_IMPORTS.md" rel="noopener">docs/DATA_IMPORTS.md</a>.</p>
|
||||
<h3 id="imp-plans">Importing plans</h3>
|
||||
<p>Routines travel as their own small JSON file (<b>Share a plan</b> exports every current
|
||||
routine; importing merges). Don't want to share everything? Edit the JSON, or use the
|
||||
<a href="/demo/">demo</a> as a free plan editor: import there, prune, export a fresh
|
||||
file. The demo stores everything in your browser — nothing is public or shared.</p>
|
||||
|
||||
<h2 id="backup">Backups & your data</h2>
|
||||
<h3>Per user</h3>
|
||||
<p><b>Settings → Data → Export backup (JSON)</b> writes your entire log — plan, workouts,
|
||||
weights, settings — into one file. On the mobile app it goes out through the share sheet
|
||||
(Files, AirDrop, mail…); in the browser it downloads. <b>Import backup</b> restores it
|
||||
anywhere: another phone, your self-hosted instance, or a fresh install. That file is the
|
||||
whole point of openGym — your training log as a file <i>you</i> own.</p>
|
||||
<h3>Per instance (self-hosted)</h3>
|
||||
<p>Everything lives in <code>./data</code> on your host:</p>
|
||||
<table class="cfg">
|
||||
<tr><td><code>db.json</code></td><td>Profiles and <b>public</b> passkeys. Private keys never touch the server — they stay in your phone's secure hardware or password manager.</td></tr>
|
||||
<tr><td><code>state-<user>.json</code></td><td>One file per user: plan, workouts, body weight, settings.</td></tr>
|
||||
<tr><td><code>audit.log</code></td><td>The activity log (if on) — one JSON object per line.</td></tr>
|
||||
<tr><td><code>secret</code></td><td>The session-cookie signing key.</td></tr>
|
||||
<tr><td><code>vapid.json</code></td><td>Push-notification keys, generated on first run.</td></tr>
|
||||
</table>
|
||||
<pre><code>tar czf opengym-backup-$(date +%F).tar.gz data/</code></pre>
|
||||
<p>That archive is everything — profiles, passkeys, history. It also contains
|
||||
<code>audit.log</code> with everyone's sign-in times; worth knowing before shipping it
|
||||
to a backup service you don't run. Restore by unpacking into the project folder.</p>
|
||||
|
||||
<h2 id="arch">How it's built</h2>
|
||||
<p>Two containers, one folder, no database server:</p>
|
||||
<ul>
|
||||
<li><b>frontend/</b> — React 19 + Vite (React Router, Zustand), built to static files
|
||||
<i>inside Docker</i>. The app ships no runtime dependencies beyond React, the router
|
||||
and Zustand.</li>
|
||||
<li><b>api/</b> — Node with <b>no framework</b> and two dependencies
|
||||
(<code>@simplewebauthn/server</code> for passkeys, <code>web-push</code> for
|
||||
notifications), storing everything as plain JSON files under <code>./data</code>.</li>
|
||||
<li><b>web/</b> — a multi-stage image that builds the frontend and serves it with nginx,
|
||||
proxying <code>/api</code> to the backend so it's all on <b>one origin</b> (passkeys
|
||||
require this).</li>
|
||||
</ul>
|
||||
<p>The training logic — progression rules, 1RM estimation, how a logged session is read
|
||||
back — lives in pure functions under <code>frontend/src/lib/</code> 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
|
||||
images, signs the APK, and publishes releases — tagging <code>vX.Y.Z</code> is what
|
||||
ships everything.</p>
|
||||
<p>The exercise database comes from
|
||||
<a href="https://github.com/hasaneyldrm/exercises-dataset" rel="noopener">hasaneyldrm/exercises-dataset</a>:
|
||||
1,324 exercises with animations and instructions. The metadata and instruction text are
|
||||
MIT; the images and animations are third-party media that openGym never redistributes —
|
||||
your instance downloads them from upstream on first run (see the
|
||||
<a href="#faq">FAQ</a> for the licensing details).</p>
|
||||
|
||||
<h2 id="build">Build it yourself</h2>
|
||||
<p>Everything on this page is built from the public repo:</p>
|
||||
<ul>
|
||||
<li><b>Web / self-host:</b> <code>docker compose up -d --build</code> builds the frontend
|
||||
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
|
||||
<li><b>Android APK:</b> <code>npm run build:mobile</code> in <code>frontend/</code>, then
|
||||
Gradle + <code>zipalign</code> + <code>apksigner</code> with your own keystore
|
||||
(keep it — updates must carry the same signature). Step-by-step:
|
||||
<a href="https://gitlab.com/DuarteSantos8/opengym/-/blob/main/docs/MOBILE.md" rel="noopener">docs/MOBILE.md</a>.</li>
|
||||
<li><b>iOS app:</b> the Capacitor project in <code>frontend/ios</code> — open in Xcode,
|
||||
set your (free) team, run on your device. Same doc.</li>
|
||||
<li><b>Development:</b> Node 20+; <code>npm test</code> in <code>frontend/</code>,
|
||||
<code>api/</code> and <code>mcp/</code> runs the suites. Contributions welcome —
|
||||
<a href="https://gitlab.com/DuarteSantos8/opengym/-/blob/main/CONTRIBUTING.md" rel="noopener">CONTRIBUTING.md</a>.</li>
|
||||
</ul>
|
||||
|
||||
<h2 id="troubleshoot">Troubleshooting</h2>
|
||||
<h3 id="tr-passkey">Passkeys fail even though the config looks right</h3>
|
||||
<p>The most common support question — work through these in order:</p>
|
||||
<ol>
|
||||
<li><b>Ask the server what it actually loaded:</b>
|
||||
<code>docker compose logs api | grep 'gym-api on'</code> prints the
|
||||
<code>rpID</code>/<code>origin</code> it runs with. If that disagrees with your
|
||||
<code>.env</code>: <code>docker compose restart</code> does <b>not</b> re-read
|
||||
<code>.env</code> — use <code>docker compose up -d</code>.</li>
|
||||
<li><b>Check the exact shape:</b> <code>RP_ID</code> is a bare hostname
|
||||
(<code>gym.example.com</code> — no <code>https://</code>, no port, no slash);
|
||||
<code>ORIGIN</code> is the full origin with scheme and without trailing slash. Both
|
||||
must match the address bar exactly.</li>
|
||||
<li><b>Behind a tunnel/proxy, use the public hostname</b> — never the container name,
|
||||
LAN IP or internal port. The tunnel's own route may point wherever it likes.</li>
|
||||
<li><b><code>www.</code> is a different host.</b> A passkey registered on
|
||||
<code>gym.example.com</code> won't work on <code>www.gym.example.com</code> — pick
|
||||
one, redirect the other.</li>
|
||||
<li><b>Changing the hostname invalidates existing passkeys.</b> Everyone registers
|
||||
again.</li>
|
||||
</ol>
|
||||
<h3 id="tr-rest">Everything else</h3>
|
||||
<table class="cfg">
|
||||
<tr><td>No passkey prompt on my phone</td><td>You're on <code>http://</code> or a bare IP. Passkeys need HTTPS or localhost — set up a domain, or use guest mode / the mobile app.</td></tr>
|
||||
<tr><td>"verification failed" on login</td><td><code>RP_ID</code>/<code>ORIGIN</code> don't match the address bar — see the checklist above, starting with what the server logged.</td></tr>
|
||||
<tr><td>Media didn't download</td><td><code>docker compose logs media</code>, re-run <code>docker compose up -d</code>, or run <code>./scripts/fetch-media.sh</code>.</td></tr>
|
||||
<tr><td>Port 8080 already used</td><td><code>WEB_PORT=9090</code> in <code>.env</code> (and update <code>ORIGIN</code> for local testing).</td></tr>
|
||||
<tr><td>No "Notifications" option in Settings</td><td>Needs a signed-in profile and HTTPS (or localhost) — guest mode and plain HTTP over LAN can't subscribe.</td></tr>
|
||||
<tr><td>Day reminder fires at the wrong time</td><td>Toggle it off and on so it re-detects your browser's timezone (also happens on every app load).</td></tr>
|
||||
<tr><td>"Keep screen awake" shows as unsupported</td><td>The Wake Lock API needs HTTPS or localhost; iOS also refuses it in Low Power Mode.</td></tr>
|
||||
<tr><td>Want to reset a stuck login</td><td>Delete the cookie — sessions are just signed cookies. "Sign out everywhere" in Settings ends every session (and paired apps) at once.</td></tr>
|
||||
<tr><td><code>docker compose pull</code> says "denied"</td><td>Build from source instead: <code>docker compose up -d --build</code>.</td></tr>
|
||||
<tr><td>Exercise images blank in an old build</td><td>Fixed in current images. <code>VITE_IMG_BASE</code>/<code>VITE_GIF_BASE</code> are <b>build-time</b>: they're baked into the bundle when the frontend compiles, so setting them at runtime does nothing to a prebuilt image — redirect media in your reverse proxy instead, or rebuild.</td></tr>
|
||||
</table>
|
||||
<p>Still stuck? The <a href="https://discord.gg/e62jY6fwVb" rel="noopener">Discord</a> is
|
||||
the quickest way to get an answer;
|
||||
<a href="https://gitlab.com/DuarteSantos8/opengym/-/issues" rel="noopener">issues</a> are
|
||||
better for anything the next person should find by searching.</p>
|
||||
|
||||
<h2 id="privacy">Privacy — the complete list</h2>
|
||||
<ul>
|
||||
<li><b>The app collects nothing.</b> No telemetry, no analytics, no crash reporting, no
|
||||
accounts on anyone else's server. The mobile app's only network traffic is fetching
|
||||
exercise media from a CDN; a self-hosted instance talks only to your own server.</li>
|
||||
<li><b>Passkey private keys never leave your device</b> — the server stores only public
|
||||
keys.</li>
|
||||
<li><b>The optional activity log</b> (self-hosted, admin feature) records sign-in events
|
||||
but no IP addresses, user-agents or failed-attempt passkey ids unless the operator
|
||||
opts in — <a href="#admin-log">details above</a>.</li>
|
||||
<li><b>The AI Coach is opt-in twice over</b> — an admin has to enable it, and a consent
|
||||
screen lists exactly which data categories leave the server before anyone uses it.
|
||||
Off, nothing is ever sent anywhere — <a href="#coach-privacy">details above</a>.</li>
|
||||
<li><b>The MCP server</b> is read-only, local, and never puts your data on the
|
||||
network.</li>
|
||||
<li><b>This website</b> uses self-hosted, cookieless <a href="https://umami.is" rel="noopener">Umami</a>
|
||||
page-view counting — no cookies, no cross-site tracking, and it never sees anything
|
||||
from inside the app or the demo.</li>
|
||||
</ul>
|
||||
|
||||
<h2 id="faq">FAQ</h2>
|
||||
<h3>Is it really free?</h3>
|
||||
<p>Yes — free as in cost <i>and</i> as in freedom (AGPL-3.0). No pro tier, no locked
|
||||
features, no ads, and the license keeps every fork open source too.</p>
|
||||
<h3>What data does openGym collect?</h3>
|
||||
<p>None. There is no telemetry, no analytics, no crash reporting. The mobile app's only
|
||||
network traffic is fetching exercise media from a CDN; a self-hosted instance talks only
|
||||
to your own server.</p>
|
||||
features, no ads, and the license keeps every fork open source too. If it replaced a
|
||||
paid tracker for you, there's a <a href="https://buymeacoffee.com/duartesantos" rel="noopener">coffee button</a> —
|
||||
a star, a bug report or a merge request is worth just as much.</p>
|
||||
<h3>Why isn't it on the Play Store / App Store?</h3>
|
||||
<p>By choice (and on iOS, by Apple's rules for sideloading). Store accounts cost money,
|
||||
impose terms that sit badly with the AGPL, and put a gatekeeper between you and an app
|
||||
whose whole point is that your data is yours.</p>
|
||||
<h3>Mobile app or self-hosted — which one should I pick?</h3>
|
||||
<p>If you just want to track your training: the mobile app. If you want your data on your
|
||||
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>
|
||||
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, or <a href="#mobile-server">pair the app to your server</a> and
|
||||
keep using it.</p>
|
||||
<h3>What's on the roadmap?</h3>
|
||||
<p>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
|
||||
requests welcome — the up-to-date list is in the
|
||||
<a href="https://gitlab.com/DuarteSantos8/opengym#roadmap" rel="noopener">README</a>.</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>:
|
||||
1,324 exercises with animations and instructions in 11 languages, including openGym's
|
||||
separately curated Brazilian Portuguese translation. In pt-BR, built-in exercise names
|
||||
show Portuguese first and the canonical English title in parentheses. 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>
|
||||
1,324 exercises with animations and instructions, localized in 12 of openGym's 14 UI
|
||||
languages — including openGym's separately curated Brazilian Portuguese translation.
|
||||
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
|
||||
third-party media used under the dataset's terms rather than openGym's AGPL — their
|
||||
ownership is currently disputed between
|
||||
<a href="https://gymvisual.com/" rel="noopener">Gym visual</a> and ExerciseDB, and a
|
||||
clarification has been requested.</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, clear
|
||||
it with the rights holder first. Full third-party notices, including the body-diagram
|
||||
geometry, are in
|
||||
<a href="https://gitlab.com/DuarteSantos8/opengym/-/blob/main/NOTICE.md" rel="noopener">NOTICE.md</a>.</p>
|
||||
<h3>What does the AGPL mean for me?</h3>
|
||||
<p>You can self-host, use, modify and share openGym freely. If you run a <i>modified</i>
|
||||
version as a network service, you must offer that version's source under the same
|
||||
license — that's the clause that keeps openGym from ever becoming someone's closed,
|
||||
proprietary product. Just using or self-hosting it unmodified obliges you to
|
||||
nothing.</p>
|
||||
</main>
|
||||
|
||||
<footer><div class="wrap foot">
|
||||
@@ -300,6 +907,6 @@ docker compose up -d</code></pre>
|
||||
</div>
|
||||
</div></footer>
|
||||
|
||||
<script src="site.js?v=9" defer></script>
|
||||
<script src="site.js?v=16" defer></script>
|
||||
</body>
|
||||
</html>
|
||||
+83
-45
@@ -6,15 +6,20 @@
|
||||
<title>openGym — free, open-source gym & body-weight tracker</title>
|
||||
<meta name="description" content="openGym is a free, open-source gym & body-weight tracker. Download the Android app or self-host it with Docker — no account, no cloud, no telemetry.">
|
||||
<meta name="theme-color" content="#000000">
|
||||
<meta name="twitter:card" content="summary_large_image">
|
||||
<meta name="twitter:title" content="openGym — your workouts, your weights, your data">
|
||||
<meta name="twitter:description" content="Free, open-source gym & body-weight tracker. Android APK or self-hosted with Docker. No account, no cloud, no telemetry.">
|
||||
<meta name="twitter:image" content="https://opengym.duarte-santos.ch/img/banner.png">
|
||||
<meta property="og:title" content="openGym — your workouts, your weights, your data">
|
||||
<meta property="og:description" content="Free, open-source gym & body-weight tracker. Android APK or self-hosted with Docker. No account, no cloud, no telemetry.">
|
||||
<meta property="og:image" content="https://opengym.duarte-santos.ch/img/banner.png">
|
||||
<meta property="og:url" content="https://opengym.duarte-santos.ch/">
|
||||
<link rel="canonical" href="https://opengym.duarte-santos.ch/">
|
||||
<meta property="og:type" content="website">
|
||||
<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?v=9">
|
||||
<link rel="stylesheet" href="styles.css?v=16">
|
||||
<!-- Marks that JS is alive before first paint, so the scroll-reveal styles never
|
||||
hide content from a browser that will not run them. -->
|
||||
<script>
|
||||
@@ -38,10 +43,11 @@ try {
|
||||
"license":"https://www.gnu.org/licenses/agpl-3.0.html",
|
||||
"url":"https://opengym.duarte-santos.ch/",
|
||||
"downloadUrl":"https://opengym.duarte-santos.ch/openGym.apk",
|
||||
"author":{"@type":"Person","name":"Duarte Santos","url":"https://duarte-santos.ch"}}
|
||||
"author":{"@type":"Person","name":"Duarte Santos","url":"https://duarte-santos.ch"},
|
||||
"sameAs":["https://gitlab.com/DuarteSantos8/opengym","https://discord.gg/e62jY6fwVb"]}
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
<body class="topnav">
|
||||
|
||||
<!-- Icon set: one sprite, referenced with <use>. Line icons at 24×24, stroke 1.7. -->
|
||||
<svg width="0" height="0" style="position:absolute" aria-hidden="true" focusable="false"><defs>
|
||||
@@ -76,37 +82,67 @@ try {
|
||||
<img src="icon-180.png" alt="" width="24" height="24">
|
||||
openGym
|
||||
</a>
|
||||
<button class="nav-toggle" aria-expanded="false" aria-controls="menu" aria-label="Menu">
|
||||
<div class="nav-quick">
|
||||
<a class="ql site" href="/#features">Features</a>
|
||||
<a class="ql site" href="/#screens">Screenshots</a>
|
||||
<a class="ql site" href="/#demo">Demo</a>
|
||||
<a class="ql site" href="/docs.html">Docs</a>
|
||||
<a class="ql site" href="/api.html">API</a>
|
||||
<a class="ql site" href="/about.html">About</a>
|
||||
<a class="ql" href="https://gitlab.com/DuarteSantos8/opengym" rel="noopener">GitLab <span data-gh="stars"></span></a>
|
||||
<a class="ql" href="https://discord.gg/e62jY6fwVb" rel="noopener">Discord <span data-dc="members"></span></a>
|
||||
<a class="ql coffee" href="https://buymeacoffee.com/duartesantos" rel="noopener" aria-label="Buy me a coffee"><svg viewBox="0 0 24 24" aria-hidden="true"><path d="M20.216 6.415l-.132-.666c-.119-.598-.388-1.163-1.001-1.379-.197-.069-.42-.098-.57-.241-.152-.143-.196-.366-.231-.572-.065-.378-.125-.756-.192-1.133-.057-.325-.102-.69-.25-.987-.195-.4-.597-.634-.996-.788a5.723 5.723 0 00-.626-.194c-1-.263-2.05-.36-3.077-.416a25.834 25.834 0 00-3.7.062c-.915.083-1.88.184-2.75.5-.318.116-.646.256-.888.501-.297.302-.393.77-.177 1.146.154.267.415.456.692.58.36.162.737.284 1.123.366 1.075.238 2.189.331 3.287.37 1.218.05 2.437.01 3.65-.118.299-.033.598-.073.896-.119.352-.054.578-.513.474-.834-.124-.383-.457-.531-.834-.473-.466.074-.96.108-1.382.146-1.177.08-2.358.082-3.536.006a22.228 22.228 0 01-1.157-.107c-.086-.01-.18-.025-.258-.036-.243-.036-.484-.08-.724-.13-.111-.027-.111-.185 0-.212h.005c.277-.06.557-.108.838-.147h.002c.131-.009.263-.032.394-.048a25.076 25.076 0 013.426-.12c.674.019 1.347.067 2.017.144l.228.031c.267.04.533.088.798.145.392.085.895.113 1.07.542.055.137.08.288.111.431l.319 1.484a.237.237 0 01-.199.284h-.003c-.037.006-.075.01-.112.015a36.704 36.704 0 01-4.743.295 37.059 37.059 0 01-4.699-.304c-.14-.017-.293-.042-.417-.06-.326-.048-.649-.108-.973-.161-.393-.065-.768-.032-1.123.161-.29.16-.527.404-.675.701-.154.316-.199.66-.267 1-.069.34-.176.707-.135 1.056.087.753.613 1.365 1.37 1.502a39.69 39.69 0 0011.343.376.483.483 0 01.535.53l-.071.697-1.018 9.907c-.041.41-.047.832-.125 1.237-.122.637-.553 1.028-1.182 1.171-.577.131-1.165.2-1.756.205-.656.004-1.31-.025-1.966-.022-.699.004-1.556-.06-2.095-.58-.475-.458-.54-1.174-.605-1.793l-.731-7.013-.322-3.094c-.037-.351-.286-.695-.678-.678-.336.015-.718.3-.678.679l.228 2.185.949 9.112c.147 1.344 1.174 2.068 2.446 2.272.742.12 1.503.144 2.257.156.966.016 1.942.053 2.892-.122 1.408-.258 2.465-1.198 2.616-2.657.34-3.332.683-6.663 1.024-9.995l.215-2.087a.484.484 0 01.39-.426c.402-.078.787-.212 1.074-.518.455-.488.546-1.124.385-1.766zm-1.478.772c-.145.137-.363.201-.578.233-2.416.359-4.866.54-7.308.46-1.748-.06-3.477-.254-5.207-.498-.17-.024-.353-.055-.47-.18-.22-.236-.111-.71-.054-.995.052-.26.152-.609.463-.646.484-.057 1.046.148 1.526.22.577.088 1.156.159 1.737.212 2.48.226 5.002.19 7.472-.14.45-.06.899-.13 1.345-.21.399-.072.84-.206 1.08.206.166.281.188.657.162.974a.544.544 0 01-.169.364zm-6.159 3.9c-.862.37-1.84.788-3.109.788a5.884 5.884 0 01-1.569-.217l.877 9.004c.065.78.717 1.38 1.5 1.38 0 0 1.243.065 1.658.065.447 0 1.786-.065 1.786-.065.783 0 1.434-.6 1.499-1.38l.94-9.95a3.996 3.996 0 00-1.322-.238c-.826 0-1.491.284-2.26.613z"/></svg><span>Buy me a coffee!</span></a>
|
||||
<a class="cta" href="/#download">Download</a>
|
||||
</div>
|
||||
<button class="nav-toggle" id="navtoggle" aria-expanded="false" aria-controls="sitemenu" aria-label="Menu">
|
||||
<span></span><span></span>
|
||||
</button>
|
||||
<div class="nav-links" id="menu">
|
||||
<a href="#features">Features</a>
|
||||
<a href="#screens">Screenshots</a>
|
||||
<a href="#demo">Demo</a>
|
||||
<a href="docs.html">Docs</a>
|
||||
<a href="about.html">About</a>
|
||||
<a href="https://gitlab.com/DuarteSantos8/opengym" rel="noopener">GitLab <span data-gh="stars"></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 gitlab.com. Remove this block and
|
||||
revert the links (+ site.js) to github.com once the account is restored. -->
|
||||
<div class="notice-wrap"><div class="wrap">
|
||||
<aside class="notice" role="note">
|
||||
<div class="notice-tag">Repository moved</div>
|
||||
<h2>My GitHub account was suspended, and the openGym repo went with it.</h2>
|
||||
<p><b>github.com/DuarteSantos8/openGym is offline</b> — not by choice. The app is
|
||||
untouched: the APK, the demo and every self-hosted install work exactly as before. The
|
||||
code, the releases, the container images and the APK builds now live on GitLab under
|
||||
the same AGPL-3.0 license, and every repository link here points there.</p>
|
||||
<div class="actions">
|
||||
<a class="btn" href="https://gitlab.com/DuarteSantos8/opengym" rel="noopener">Open on GitLab</a>
|
||||
<a class="btn dc-btn" href="https://discord.gg/e62jY6fwVb" rel="noopener">Join the Discord</a>
|
||||
</div>
|
||||
</aside>
|
||||
</div></div>
|
||||
<!-- The navigation sheet: the header's links again, for the widths where the bar has
|
||||
room only for the brand and the download. Byte-identical on every page, like the
|
||||
bar above it — nothing is ever dropped because of which page you are on. -->
|
||||
<div class="navsheet" id="sitemenu" role="navigation" aria-label="Site" aria-hidden="true">
|
||||
<div class="nl-rows">
|
||||
<a class="nl" href="/#features">Features</a>
|
||||
<a class="nl" href="/#screens">Screenshots</a>
|
||||
<a class="nl" href="/#demo">Demo</a>
|
||||
<a class="nl" href="/docs.html">Docs</a>
|
||||
<a class="nl" href="/api.html">API</a>
|
||||
<a class="nl" href="/about.html">About</a>
|
||||
<a class="nl" href="https://gitlab.com/DuarteSantos8/opengym" rel="noopener">GitLab <span data-gh="stars"></span></a>
|
||||
<a class="nl" href="https://discord.gg/e62jY6fwVb" rel="noopener">Discord <span data-dc="members"></span></a>
|
||||
<a class="nl coffee" href="https://buymeacoffee.com/duartesantos" rel="noopener">Buy me a coffee! <svg viewBox="0 0 24 24" aria-hidden="true"><path d="M20.216 6.415l-.132-.666c-.119-.598-.388-1.163-1.001-1.379-.197-.069-.42-.098-.57-.241-.152-.143-.196-.366-.231-.572-.065-.378-.125-.756-.192-1.133-.057-.325-.102-.69-.25-.987-.195-.4-.597-.634-.996-.788a5.723 5.723 0 00-.626-.194c-1-.263-2.05-.36-3.077-.416a25.834 25.834 0 00-3.7.062c-.915.083-1.88.184-2.75.5-.318.116-.646.256-.888.501-.297.302-.393.77-.177 1.146.154.267.415.456.692.58.36.162.737.284 1.123.366 1.075.238 2.189.331 3.287.37 1.218.05 2.437.01 3.65-.118.299-.033.598-.073.896-.119.352-.054.578-.513.474-.834-.124-.383-.457-.531-.834-.473-.466.074-.96.108-1.382.146-1.177.08-2.358.082-3.536.006a22.228 22.228 0 01-1.157-.107c-.086-.01-.18-.025-.258-.036-.243-.036-.484-.08-.724-.13-.111-.027-.111-.185 0-.212h.005c.277-.06.557-.108.838-.147h.002c.131-.009.263-.032.394-.048a25.076 25.076 0 013.426-.12c.674.019 1.347.067 2.017.144l.228.031c.267.04.533.088.798.145.392.085.895.113 1.07.542.055.137.08.288.111.431l.319 1.484a.237.237 0 01-.199.284h-.003c-.037.006-.075.01-.112.015a36.704 36.704 0 01-4.743.295 37.059 37.059 0 01-4.699-.304c-.14-.017-.293-.042-.417-.06-.326-.048-.649-.108-.973-.161-.393-.065-.768-.032-1.123.161-.29.16-.527.404-.675.701-.154.316-.199.66-.267 1-.069.34-.176.707-.135 1.056.087.753.613 1.365 1.37 1.502a39.69 39.69 0 0011.343.376.483.483 0 01.535.53l-.071.697-1.018 9.907c-.041.41-.047.832-.125 1.237-.122.637-.553 1.028-1.182 1.171-.577.131-1.165.2-1.756.205-.656.004-1.31-.025-1.966-.022-.699.004-1.556-.06-2.095-.58-.475-.458-.54-1.174-.605-1.793l-.731-7.013-.322-3.094c-.037-.351-.286-.695-.678-.678-.336.015-.718.3-.678.679l.228 2.185.949 9.112c.147 1.344 1.174 2.068 2.446 2.272.742.12 1.503.144 2.257.156.966.016 1.942.053 2.892-.122 1.408-.258 2.465-1.198 2.616-2.657.34-3.332.683-6.663 1.024-9.995l.215-2.087a.484.484 0 01.39-.426c.402-.078.787-.212 1.074-.518.455-.488.546-1.124.385-1.766zm-1.478.772c-.145.137-.363.201-.578.233-2.416.359-4.866.54-7.308.46-1.748-.06-3.477-.254-5.207-.498-.17-.024-.353-.055-.47-.18-.22-.236-.111-.71-.054-.995.052-.26.152-.609.463-.646.484-.057 1.046.148 1.526.22.577.088 1.156.159 1.737.212 2.48.226 5.002.19 7.472-.14.45-.06.899-.13 1.345-.21.399-.072.84-.206 1.08.206.166.281.188.657.162.974a.544.544 0 01-.169.364zm-6.159 3.9c-.862.37-1.84.788-3.109.788a5.884 5.884 0 01-1.569-.217l.877 9.004c.065.78.717 1.38 1.5 1.38 0 0 1.243.065 1.658.065.447 0 1.786-.065 1.786-.065.783 0 1.434-.6 1.499-1.38l.94-9.95a3.996 3.996 0 00-1.322-.238c-.826 0-1.491.284-2.26.613z"/></svg></a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- The one control that opens the contents, at every width. The drawer it opens is
|
||||
closed in CSS, so it is shut on first paint whether or not the script runs. -->
|
||||
<button class="toc-btn" id="tocbtn" aria-expanded="false" aria-controls="menu">
|
||||
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.9" stroke-linecap="round" aria-hidden="true"><path d="M4 6.5h16M4 12h16M4 17.5h10"/></svg>
|
||||
Contents
|
||||
</button>
|
||||
|
||||
<!-- The contents drawer: one list, one way in, one way out. Closed by default at
|
||||
every width, and no preference is remembered — see .side in styles.css. -->
|
||||
<aside class="side" id="menu" aria-label="Contents" aria-hidden="true">
|
||||
<div class="side-top">
|
||||
<p class="side-title">Contents</p>
|
||||
<button class="rail-close" aria-label="Close contents"><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" aria-hidden="true"><path d="M5 5l14 14M19 5L5 19"/></svg></button>
|
||||
</div>
|
||||
<p class="side-label">On this page</p>
|
||||
<a class="side-link" href="#features"><b>Features</b><span>Built on the gym floor</span></a>
|
||||
<a class="side-link" href="#screens"><b>Screenshots</b><span>Five screens, that's the app</span></a>
|
||||
<a class="side-link" href="#demo"><b>Live demo</b><span>The real app, in your browser</span></a>
|
||||
<a class="side-link" href="#download"><b>Download</b><span>Android APK or self-hosted</span></a>
|
||||
<a class="side-link" href="#story"><b>The story</b><span>One user, zero ambitions</span></a>
|
||||
<a class="side-link" href="#opensource"><b>Open source</b><span>AGPL-3.0, and staying that way</span></a>
|
||||
<a class="side-link" href="#elsewhere"><b>Elsewhere</b><span>GitLab, Discord, support</span></a>
|
||||
<p class="side-label">More</p>
|
||||
<a class="side-link" href="docs.html"><b>Docs</b><span>Install, self-host, import</span></a>
|
||||
<a class="side-link" href="api.html"><b>API</b><span>Every route, as an OpenAPI spec</span></a>
|
||||
<a class="side-link" href="about.html"><b>About</b><span>The story and the milestones</span></a>
|
||||
</aside>
|
||||
|
||||
<header class="hero">
|
||||
<div class="wrap">
|
||||
@@ -185,7 +221,7 @@ try {
|
||||
|
||||
<div class="more rv">
|
||||
<h3>And the rest of it</h3>
|
||||
<p class="more-hint">Fourteen more things it does.</p>
|
||||
<p class="more-hint">Sixteen more things it does.</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -199,6 +235,11 @@ try {
|
||||
<b class="fcard-t">Weekly plan</b>
|
||||
<span class="fcard-b">A routine per weekday. Any single day can be moved when life happens, without editing the plan itself.</span>
|
||||
</article>
|
||||
<article class="fcard">
|
||||
<span class="fcard-ic"><svg aria-hidden="true"><use href="#i-grid"/></svg></span>
|
||||
<b class="fcard-t">Weeks start where you say</b>
|
||||
<span class="fcard-b">Monday or Sunday. The plan, the day strip, the calendar and every “this week” total move with it, so the app reads like the calendar you already use.</span>
|
||||
</article>
|
||||
<article class="fcard">
|
||||
<span class="fcard-ic"><svg aria-hidden="true"><use href="#i-link"/></svg></span>
|
||||
<b class="fcard-t">Supersets and cardio</b>
|
||||
@@ -214,6 +255,11 @@ try {
|
||||
<b class="fcard-t">Warm-up sets</b>
|
||||
<span class="fcard-b">Mark the ramp-up rows and they stay out of your 1RM, your progression and the fatigue map. Present in the session, absent from the numbers.</span>
|
||||
</article>
|
||||
<article class="fcard">
|
||||
<span class="fcard-ic"><svg aria-hidden="true"><use href="#i-scale"/></svg></span>
|
||||
<b class="fcard-t">Plate math</b>
|
||||
<span class="fcard-b">Barbell work shows what goes on each side — <i>Bar 20 kg · 30 kg per side</i> — from the bar weight for that exercise. You still log the total.</span>
|
||||
</article>
|
||||
<article class="fcard">
|
||||
<span class="fcard-ic"><svg aria-hidden="true"><use href="#i-trend"/></svg></span>
|
||||
<b class="fcard-t">Estimated 1RM</b>
|
||||
@@ -242,8 +288,8 @@ try {
|
||||
</article>
|
||||
<article class="fcard">
|
||||
<span class="fcard-ic"><svg aria-hidden="true"><use href="#i-globe"/></svg></span>
|
||||
<b class="fcard-t">13 languages</b>
|
||||
<span class="fcard-b">The full interface, plus exercise instructions in 11 languages and bilingual Brazilian Portuguese names, all loaded on demand.</span>
|
||||
<b class="fcard-t">14 languages</b>
|
||||
<span class="fcard-b">The full interface, plus exercise instructions in 12 languages and bilingual Brazilian Portuguese and Hungarian names, all loaded on demand.</span>
|
||||
</article>
|
||||
<article class="fcard">
|
||||
<span class="fcard-ic"><svg aria-hidden="true"><use href="#i-key"/></svg></span>
|
||||
@@ -344,7 +390,7 @@ try {
|
||||
</ul>
|
||||
<div class="push">
|
||||
<a class="btn" href="openGym.apk" download>Download for Android</a>
|
||||
<p class="meta">v1.2.11 · 4.4 MB · Android 6.0+ · signed APK. Your browser will ask
|
||||
<p class="meta">v1.2.14 · 4.6 MB · Android 6.0+ · signed APK. Your browser will ask
|
||||
before installing; that is normal outside the Play Store.</p>
|
||||
<p class="meta">Every release is also built and signed by CI and attached to the
|
||||
<a href="https://gitlab.com/DuarteSantos8/opengym/-/releases" rel="noopener">GitLab
|
||||
@@ -395,12 +441,13 @@ try {
|
||||
<div class="specs rv">
|
||||
<div class="spec-head">
|
||||
<span>openGym in numbers</span>
|
||||
<span class="live">repo counts are live</span>
|
||||
<span class="live">counts are live</span>
|
||||
</div>
|
||||
<div class="spec-cells">
|
||||
<div><b data-gh="stars-n">–</b><span>stars</span></div>
|
||||
<div><b data-gh="forks-n">–</b><span>forks</span></div>
|
||||
<div><b data-gh="issues-n">–</b><span>open issues</span></div>
|
||||
<div><b data-dc="members-n">–</b><span>on Discord</span></div>
|
||||
<div><b>1,324</b><span>exercises</span></div>
|
||||
<div><b>13</b><span>languages</span></div>
|
||||
</div>
|
||||
@@ -433,15 +480,6 @@ try {
|
||||
<span class="pad-go">Open the repo</span>
|
||||
</a>
|
||||
|
||||
<a class="pad github dead" href="https://github.com/DuarteSantos8/openGym" rel="noopener">
|
||||
<span class="pad-ic"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="#i-github"/></svg></span>
|
||||
<span class="pad-body">
|
||||
<b>GitHub <span class="tag">404</span></b>
|
||||
<span>Where openGym was open-sourced — and where a lot of links still point.</span>
|
||||
<span class="rest">The account is suspended, so this one goes nowhere.</span>
|
||||
</span>
|
||||
<span class="pad-go">Dead link, kept honest</span>
|
||||
</a>
|
||||
|
||||
<a class="pad bmc" href="https://buymeacoffee.com/duartesantos" rel="noopener">
|
||||
<span class="pad-ic"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="#i-bmc"/></svg></span>
|
||||
@@ -479,6 +517,6 @@ try {
|
||||
</div>
|
||||
</div></footer>
|
||||
|
||||
<script src="site.js?v=9" defer></script>
|
||||
<script src="site.js?v=16" defer></script>
|
||||
</body>
|
||||
</html>
|
||||
+195
-34
@@ -1,44 +1,180 @@
|
||||
// Behaviour for the openGym site: the phone menu, the scroll reveals, the demo frame,
|
||||
// and the two things that come from the GitLab API (repo counts, release timeline).
|
||||
// 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).
|
||||
// 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'
|
||||
|
||||
/* ------------------------------------------------------------------ phone menu */
|
||||
;(() => {
|
||||
const btn = document.querySelector('.nav-toggle')
|
||||
const menu = document.getElementById('menu')
|
||||
if (!btn || !menu) return
|
||||
// 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
|
||||
// Origin, so the browser is allowed to read it. The code is the permanent invite in the
|
||||
// nav; if that invite is ever revoked this returns 404 and the count simply stays blank.
|
||||
const DC_INVITE = 'https://discord.com/api/v10/invites/e62jY6fwVb?with_counts=1'
|
||||
|
||||
const close = () => {
|
||||
menu.classList.remove('open')
|
||||
btn.setAttribute('aria-expanded', 'false')
|
||||
// menu-open drives the dimming scrim; overflow keeps the page still underneath.
|
||||
document.body.classList.remove('menu-open')
|
||||
document.body.style.overflow = ''
|
||||
/* ------------------------------------------------------- one panel controller
|
||||
The navigation sheet and the contents drawer are the same object with different
|
||||
contents: one opener, one close button, Escape, a tap outside, focus held inside
|
||||
while open and handed back to the opener on close. Writing it once is the only
|
||||
way the two of them can stay indistinguishable to a reader.
|
||||
|
||||
Both are CLOSED in CSS, so a panel is shut on first paint whatever this script
|
||||
does — and nothing is read back from storage to reopen one. */
|
||||
const FOCUSABLE = 'a[href],button:not([disabled]),input,select,textarea,[tabindex]:not([tabindex="-1"])'
|
||||
|
||||
function panel({ opener, panelEl, flag, closeBtn }) {
|
||||
if (!opener || !panelEl) return null
|
||||
const body = document.body
|
||||
let lastFocus = null
|
||||
|
||||
const isOpen = () => body.classList.contains(flag)
|
||||
|
||||
const set = open => {
|
||||
if (open === isOpen()) return
|
||||
if (open) lastFocus = document.activeElement
|
||||
body.classList.toggle(flag, open)
|
||||
opener.setAttribute('aria-expanded', String(open))
|
||||
panelEl.setAttribute('aria-hidden', String(!open))
|
||||
// The panel scrolls on its own; letting the page scroll behind it is the classic
|
||||
// menu bug where the reader loses their place on close.
|
||||
body.style.overflow = open ? 'hidden' : ''
|
||||
if (open) {
|
||||
// The close button first: it is the answer to "how do I get out of this".
|
||||
const first = panelEl.querySelector(closeBtn) || panelEl.querySelector(FOCUSABLE)
|
||||
first && first.focus({ preventScroll: true })
|
||||
} else if (lastFocus && document.contains(lastFocus)) {
|
||||
lastFocus.focus({ preventScroll: true })
|
||||
}
|
||||
}
|
||||
btn.addEventListener('click', () => {
|
||||
const open = menu.classList.toggle('open')
|
||||
btn.setAttribute('aria-expanded', String(open))
|
||||
document.body.classList.toggle('menu-open', open)
|
||||
// The sheet scrolls on its own; letting the page scroll behind it is the classic
|
||||
// mobile-menu bug where the reader loses their place on close.
|
||||
document.body.style.overflow = open ? 'hidden' : ''
|
||||
})
|
||||
// The scrim is body::after, so it has no element of its own to listen on — a tap
|
||||
// that lands outside both the sheet and the button is a tap on the scrim.
|
||||
document.addEventListener('click', e => {
|
||||
if (!document.body.classList.contains('menu-open')) return
|
||||
if (e.target.closest('#menu') || e.target.closest('.nav-toggle')) return
|
||||
close()
|
||||
})
|
||||
// Tapping a link inside the sheet navigates, so the sheet has to get out of the way —
|
||||
|
||||
opener.addEventListener('click', e => { e.stopPropagation(); set(!isOpen()) })
|
||||
panelEl.querySelector(closeBtn)?.addEventListener('click', () => set(false))
|
||||
// Tapping a link inside navigates, so the panel has to get out of the way —
|
||||
// in-page anchors especially, which do not reload anything.
|
||||
menu.addEventListener('click', e => { if (e.target.closest('a')) close() })
|
||||
document.addEventListener('keydown', e => { if (e.key === 'Escape') close() })
|
||||
// Rotating to landscape can widen past the breakpoint while the sheet is open, which
|
||||
// would leave the body scroll-locked with no visible sheet to close.
|
||||
addEventListener('resize', () => { if (innerWidth > 780) close() })
|
||||
panelEl.addEventListener('click', e => { if (e.target.closest('a')) set(false) })
|
||||
// The scrim is body::after, so it has no element of its own to listen on — a click
|
||||
// that lands outside both the panel and its opener is a click on the scrim.
|
||||
document.addEventListener('click', e => {
|
||||
if (!isOpen()) return
|
||||
if (e.target.closest('#' + panelEl.id) || e.target.closest('#' + opener.id)) return
|
||||
set(false)
|
||||
})
|
||||
document.addEventListener('keydown', e => {
|
||||
if (!isOpen()) return
|
||||
if (e.key === 'Escape') { e.preventDefault(); set(false); return }
|
||||
if (e.key !== 'Tab') return
|
||||
// Focus trap: Tab cycles inside the open panel instead of wandering the page
|
||||
// behind the scrim, where nothing is clickable anyway.
|
||||
const items = [...panelEl.querySelectorAll(FOCUSABLE)].filter(el => el.offsetParent !== null)
|
||||
if (!items.length) return
|
||||
const first = items[0]
|
||||
const last = items[items.length - 1]
|
||||
if (e.shiftKey && document.activeElement === first) { e.preventDefault(); last.focus() }
|
||||
else if (!e.shiftKey && document.activeElement === last) { e.preventDefault(); first.focus() }
|
||||
})
|
||||
return { set, isOpen }
|
||||
}
|
||||
|
||||
;(() => {
|
||||
const nav = panel({
|
||||
opener: document.querySelector('.nav-toggle'),
|
||||
panelEl: document.getElementById('sitemenu'),
|
||||
flag: 'menu-open',
|
||||
closeBtn: '.nl' // the hamburger itself is the ✕; focus the first link
|
||||
})
|
||||
const toc = panel({
|
||||
opener: document.querySelector('.toc-btn'),
|
||||
panelEl: document.getElementById('menu'),
|
||||
flag: 'contents-open',
|
||||
closeBtn: '.rail-close'
|
||||
})
|
||||
// Only one at a time: opening either closes the other, so there is never a
|
||||
// question of which panel a tap outside belongs to.
|
||||
document.querySelector('.nav-toggle')?.addEventListener('click', () => toc?.set(false))
|
||||
document.querySelector('.toc-btn')?.addEventListener('click', () => nav?.set(false))
|
||||
// Growing past the header breakpoint puts the links back in the bar, which would
|
||||
// leave the page scroll-locked behind a sheet nobody can see.
|
||||
addEventListener('resize', () => { if (innerWidth >= 1000) nav?.set(false) })
|
||||
|
||||
// An earlier build remembered an open rail across visits. It no longer does, and
|
||||
// the stale key would otherwise sit in the browser forever.
|
||||
try { localStorage.removeItem('og_rail') } catch (e) {}
|
||||
})()
|
||||
|
||||
/* --------------------------------------------------------------- you are here
|
||||
Marked at runtime rather than baked into each page: that is what lets all four
|
||||
pages ship the byte-identical header the whole site is built around. Only links
|
||||
to a page (not to a section of one) can be "the page you are on". */
|
||||
;(() => {
|
||||
const here = location.pathname.replace(/\/index\.html$/, '/')
|
||||
document.querySelectorAll('.nav-quick .ql, .navsheet .nl').forEach(a => {
|
||||
const href = a.getAttribute('href') || ''
|
||||
if (href.includes('#') || /^https?:/.test(href)) return
|
||||
if (new URL(a.href).pathname.replace(/\/index\.html$/, '/') === here) {
|
||||
a.setAttribute('aria-current', 'page')
|
||||
}
|
||||
})
|
||||
})()
|
||||
|
||||
/* ------------------------------------------------------------------- scrollspy
|
||||
The topic rail marks the section under the reader. Position math on scroll, not
|
||||
an IntersectionObserver: the sections differ wildly in height, and "the last
|
||||
heading that scrolled past a third of the screen" is the answer people expect. */
|
||||
;(() => {
|
||||
const links = [...document.querySelectorAll('.side-link[href^="#"]')]
|
||||
if (!links.length) return
|
||||
const pairs = links
|
||||
.map(a => [document.getElementById(a.getAttribute('href').slice(1)), a])
|
||||
.filter(([t]) => t)
|
||||
if (!pairs.length) return
|
||||
let lit = null
|
||||
let raf = 0
|
||||
const spy = () => {
|
||||
raf = 0
|
||||
const y = scrollY + innerHeight * .33
|
||||
let cur = null
|
||||
for (const [t, a] of pairs) {
|
||||
if (t.getBoundingClientRect().top + scrollY <= y) cur = a
|
||||
}
|
||||
if (cur === lit) return
|
||||
lit?.classList.remove('on')
|
||||
;(lit = cur)?.classList.add('on')
|
||||
}
|
||||
addEventListener('scroll', () => { if (!raf) raf = requestAnimationFrame(spy) }, { passive: true })
|
||||
addEventListener('resize', spy)
|
||||
spy()
|
||||
})()
|
||||
|
||||
/* ------------------------------------------------------------ chapter groups
|
||||
Where a rail has chapters with subchapters (.side-group / .side-subs), the group
|
||||
being read unfolds and the others stay closed, so a long contents list is never
|
||||
a wall. A no-op on the pages whose rail is a flat list. */
|
||||
;(() => {
|
||||
const groups = [...document.querySelectorAll('.side-group')]
|
||||
if (!groups.length) return
|
||||
const openGroup = g => groups.forEach(x => x.classList.toggle('open', x === g))
|
||||
groups.forEach(g => {
|
||||
g.querySelector('.side-link')?.addEventListener('click', () => openGroup(g))
|
||||
})
|
||||
const target = a => a && document.getElementById(a.getAttribute('href').slice(1))
|
||||
const chapPairs = groups
|
||||
.map(g => [target(g.querySelector('.side-link[href^="#"]')), g])
|
||||
.filter(([t]) => t)
|
||||
const subPairs = [...document.querySelectorAll('.side-sub[href^="#"]')]
|
||||
.map(a => [target(a), a])
|
||||
.filter(([t]) => t)
|
||||
let raf = 0
|
||||
const spy = () => {
|
||||
raf = 0
|
||||
const y = scrollY + innerHeight * .33
|
||||
let curG = null
|
||||
for (const [t, g] of chapPairs) if (t.getBoundingClientRect().top + scrollY <= y) curG = g
|
||||
if (curG && !curG.classList.contains('open')) openGroup(curG)
|
||||
let curS = null
|
||||
for (const [t, a] of subPairs) if (t.getBoundingClientRect().top + scrollY <= y) curS = a
|
||||
subPairs.forEach(([, a]) => a.classList.toggle('on', a === curS && !!curS && curS.closest('.side-group') === curG))
|
||||
}
|
||||
addEventListener('scroll', () => { if (!raf) raf = requestAnimationFrame(spy) }, { passive: true })
|
||||
spy()
|
||||
})()
|
||||
|
||||
/* --------------------------------------------------------------- scroll reveal */
|
||||
@@ -126,6 +262,31 @@ const GL_PROJECT = 'https://gitlab.com/api/v4/projects/DuarteSantos8%2Fopengym'
|
||||
} catch (e) { /* offline / rate-limited — leave placeholders */ }
|
||||
})()
|
||||
|
||||
/* --------------------------------------------------- Discord members (nav + specs)
|
||||
Same shape as the repo counts above, and just as optional: the placeholder next to
|
||||
the Discord link is empty, so a blocked or rate-limited request leaves the link
|
||||
reading exactly as it did before anyone counted anything. */
|
||||
;(async () => {
|
||||
const set = (id, v) => document.querySelectorAll('[data-dc="' + id + '"]').forEach(el => { el.textContent = v })
|
||||
try {
|
||||
let n = null
|
||||
const cached = sessionStorage.getItem('discord_members')
|
||||
if (cached) n = JSON.parse(cached)
|
||||
else {
|
||||
const r = await fetch(DC_INVITE)
|
||||
if (!r.ok) return
|
||||
const j = await r.json()
|
||||
n = j.approximate_member_count
|
||||
if (typeof n !== 'number') return
|
||||
sessionStorage.setItem('discord_members', JSON.stringify(n))
|
||||
}
|
||||
// Grouped like the other four-figure numbers on the page (1,324 exercises).
|
||||
const fmt = n.toLocaleString('en-US')
|
||||
set('members', fmt)
|
||||
set('members-n', fmt)
|
||||
} catch (e) { /* offline / blocked — the link keeps its plain label */ }
|
||||
})()
|
||||
|
||||
/* -------------------------------------------------------------- about timeline
|
||||
Built from the published GitLab releases, so the page updates itself with every
|
||||
release. The static entries marked data-fallback stay in place when the API is
|
||||
|
||||
+231
-104
@@ -12,13 +12,11 @@
|
||||
|
||||
--fg: #f5f5f7;
|
||||
--fg-2: #a1a1a6;
|
||||
--fg-3: #6e6e73;
|
||||
--fg-3: #7d7d85; /* >=4.5:1 on every panel — WCAG AA for small text */
|
||||
|
||||
--acc: #32d74b;
|
||||
--acc-ink: #04150a;
|
||||
--acc-soft: rgba(50, 215, 75, .13);
|
||||
--blurple: #5865f2;
|
||||
--amber: #ff9f0a;
|
||||
|
||||
--r-s: 12px;
|
||||
--r-m: 20px;
|
||||
@@ -130,8 +128,12 @@ h3 { font-size: clamp(19px, 2.3vw, 21px); letter-spacing: -.02em; line-height: 1
|
||||
|
||||
/* ----------------------------------------------------------------- nav bar */
|
||||
|
||||
/* The bar is the one fixed point of the site: the same links in the same order on
|
||||
every page, and nothing ever slides out of it. It therefore outranks the
|
||||
navigation sheet, the contents drawer and their scrim — none of them may cover
|
||||
it, so a reader always knows where they are and how to get out. */
|
||||
nav {
|
||||
position: sticky; top: 0; z-index: 60;
|
||||
position: sticky; top: 0; z-index: 90;
|
||||
background: rgba(0, 0, 0, .68);
|
||||
backdrop-filter: saturate(180%) blur(20px);
|
||||
-webkit-backdrop-filter: saturate(180%) blur(20px);
|
||||
@@ -147,27 +149,53 @@ nav {
|
||||
.brand:hover { text-decoration: none; }
|
||||
.brand img { width: 24px; height: 24px; border-radius: 6px; }
|
||||
|
||||
.nav-links { display: flex; align-items: center; gap: 26px; }
|
||||
.nav-links a {
|
||||
/* One header, everywhere. Every page carries this identical set of links in this
|
||||
identical order; which page you are on is marked at runtime with aria-current,
|
||||
never by adding or dropping links. Below 1000px they fold into the navigation
|
||||
sheet — the same links again, nothing lost. */
|
||||
.nav-quick { display: flex; align-items: center; gap: 20px; }
|
||||
.nav-quick .ql {
|
||||
color: var(--fg-2); font-size: 14px; font-weight: 400; letter-spacing: 0;
|
||||
transition: color .2s var(--ease);
|
||||
}
|
||||
.nav-links a:hover { color: var(--fg); text-decoration: none; }
|
||||
.nav-links a [data-gh] { font-variant-numeric: tabular-nums; color: var(--fg-3); }
|
||||
.nav-links a:hover [data-gh] { color: var(--fg-2); }
|
||||
.nav-links a.cta {
|
||||
color: var(--acc-ink); background: var(--acc); font-weight: 600;
|
||||
.nav-quick .ql:hover { color: var(--fg); text-decoration: none; }
|
||||
.nav-quick .ql [data-gh], .nav-quick .ql [data-dc] { font-variant-numeric: tabular-nums; color: var(--fg-3); }
|
||||
.nav-quick .ql:hover [data-gh], .nav-quick .ql:hover [data-dc] { color: var(--fg-2); }
|
||||
.nav-quick .cta {
|
||||
color: var(--acc-ink); background: var(--acc); font-weight: 600; font-size: 14px;
|
||||
padding: 7px 15px; border-radius: 999px;
|
||||
}
|
||||
.nav-links a.cta:hover { background: #4ade63; }
|
||||
.nav-quick .cta:hover { background: #4ade63; text-decoration: none; }
|
||||
.nav-quick .ql[aria-current="page"] { color: var(--fg); }
|
||||
|
||||
/* The one link up here that asks for something instead of offering it — but it
|
||||
looks like every other link in the bar: same grey, no pill, just the cup in
|
||||
front of the words. The only button up here is and stays the download. */
|
||||
.nav-quick .coffee { display: inline-flex; align-items: center; gap: 7px; }
|
||||
.nav-quick .coffee svg { width: 15px; height: 15px; fill: currentColor; flex: none; }
|
||||
|
||||
.nav-toggle {
|
||||
display: none;
|
||||
position: relative;
|
||||
width: 42px; height: 42px; margin-right: -9px;
|
||||
width: 44px; height: 44px; margin-right: -11px;
|
||||
align-items: center; justify-content: center;
|
||||
border-radius: 10px; cursor: pointer;
|
||||
}
|
||||
|
||||
/* One breakpoint for the whole header: above it the links are in the bar, below it
|
||||
they are in the sheet. No page has a second answer. Placed after .nav-toggle's
|
||||
own rule — same specificity, so the later one has to be the one that wins. */
|
||||
@media (max-width: 999.98px) {
|
||||
.nav-quick .ql { display: none; }
|
||||
.nav-toggle { display: flex; }
|
||||
|
||||
/* …except the coffee, which stays in the bar as its cup alone, on the right
|
||||
beside the download — same grey as everything else up here. It is in the
|
||||
sheet as well, spelled out; two ways to the same page is fine for this one. */
|
||||
.nav-quick .coffee { display: inline-flex; padding: 9px; margin: -9px -5px; }
|
||||
.nav-quick .coffee span { display: none; }
|
||||
.nav-quick .coffee svg { width: 21px; height: 21px; }
|
||||
}
|
||||
.nav-toggle span {
|
||||
position: absolute; width: 18px; height: 1.5px; border-radius: 2px; background: var(--fg);
|
||||
transition: transform .3s var(--ease);
|
||||
@@ -177,101 +205,165 @@ nav {
|
||||
.nav-toggle[aria-expanded="true"] span:first-child { transform: rotate(45deg); }
|
||||
.nav-toggle[aria-expanded="true"] span:last-child { transform: rotate(-45deg); }
|
||||
|
||||
@media (max-width: 780px) {
|
||||
.nav-toggle { display: flex; }
|
||||
.nav-links {
|
||||
position: fixed; left: 0; right: 0; top: 54px;
|
||||
flex-direction: column; align-items: stretch; gap: 0;
|
||||
padding: 6px var(--pad) calc(22px + env(safe-area-inset-bottom));
|
||||
background: #000;
|
||||
border-bottom: 1px solid var(--hair-soft);
|
||||
box-shadow: 0 30px 60px rgba(0, 0, 0, .8);
|
||||
max-height: calc(100dvh - 54px); overflow-y: auto;
|
||||
transform: translateY(-8px); opacity: 0; pointer-events: none;
|
||||
transition: opacity .28s var(--ease), transform .28s var(--ease);
|
||||
}
|
||||
.nav-links.open { transform: none; opacity: 1; pointer-events: auto; }
|
||||
.nav-links a {
|
||||
font-size: 19px; letter-spacing: -.02em; color: var(--fg);
|
||||
padding: 15px 2px; border-bottom: 1px solid var(--hair-soft);
|
||||
/* Each row drops in just behind the one above it, so the sheet unfolds instead
|
||||
of appearing. Closing runs with no delay at all, so it leaves in one piece —
|
||||
a staggered exit reads as sluggish. */
|
||||
opacity: 0; transform: translateY(-10px);
|
||||
transition: opacity .3s var(--ease), transform .3s var(--ease);
|
||||
}
|
||||
.nav-links.open a { opacity: 1; transform: none; }
|
||||
.nav-links.open a:nth-child(1) { transition-delay: .03s; }
|
||||
.nav-links.open a:nth-child(2) { transition-delay: .06s; }
|
||||
.nav-links.open a:nth-child(3) { transition-delay: .09s; }
|
||||
.nav-links.open a:nth-child(4) { transition-delay: .12s; }
|
||||
.nav-links.open a:nth-child(5) { transition-delay: .15s; }
|
||||
.nav-links.open a:nth-child(6) { transition-delay: .18s; }
|
||||
.nav-links.open a:nth-child(7) { transition-delay: .21s; }
|
||||
.nav-links.open a:nth-child(8) { transition-delay: .24s; }
|
||||
.nav-links a.cta {
|
||||
margin-top: 18px; border-bottom: 0; text-align: center;
|
||||
padding: 14px 20px; font-size: 17px;
|
||||
}
|
||||
/* ------------------------------------------------------- navigation sheet
|
||||
The header's links, for the widths where the bar shows only the brand and the
|
||||
download. Same links, same order — the sheet is the bar, folded. It drops from
|
||||
under the bar, and the hamburger it came from turns into the ✕ that closes it. */
|
||||
|
||||
/* Whatever the sheet does not cover is dimmed, so the page behind it stops
|
||||
competing for attention and a tap out there reads as "close". */
|
||||
body::after {
|
||||
content: ""; position: fixed; inset: 0; z-index: 50;
|
||||
background: rgba(0, 0, 0, .55);
|
||||
backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px);
|
||||
opacity: 0; pointer-events: none;
|
||||
transition: opacity .3s var(--ease);
|
||||
}
|
||||
body.menu-open::after { opacity: 1; pointer-events: auto; }
|
||||
.navsheet {
|
||||
position: fixed; left: 0; right: 0; top: 54px; z-index: 80;
|
||||
padding: 12px var(--pad) calc(20px + env(safe-area-inset-bottom));
|
||||
background: #000;
|
||||
border-bottom: 1px solid var(--hair-soft);
|
||||
box-shadow: 0 30px 60px rgba(0, 0, 0, .8);
|
||||
max-height: calc(100dvh - 54px); overflow-y: auto; overscroll-behavior: contain;
|
||||
transform: translateY(-8px); opacity: 0; visibility: hidden; pointer-events: none;
|
||||
/* visibility is switched at one instant, never interpolated: transitioning it
|
||||
leaves the panel hidden through its own opening animation — it would pop in
|
||||
at the end, and nothing inside it could take focus until then. Zero delay on
|
||||
the way in, the full duration on the way out. */
|
||||
transition: opacity .28s var(--ease), transform .28s var(--ease), visibility 0s linear .28s;
|
||||
}
|
||||
body.menu-open .navsheet {
|
||||
transform: none; opacity: 1; visibility: visible; pointer-events: auto;
|
||||
transition: opacity .28s var(--ease), transform .28s var(--ease), visibility 0s;
|
||||
}
|
||||
@media (min-width: 1000px) { .navsheet { display: none; } }
|
||||
|
||||
/* A row per link, comfortably past the 44px touch target. */
|
||||
.navsheet .nl {
|
||||
display: flex; align-items: center; justify-content: space-between; gap: 16px;
|
||||
min-height: 52px; padding: 0 12px; margin: 0 -12px; border-radius: 12px;
|
||||
color: var(--fg); font-size: 17px; font-weight: 500; letter-spacing: -.02em;
|
||||
border-bottom: 1px solid var(--hair-soft);
|
||||
transition: background-color .2s var(--ease);
|
||||
}
|
||||
.navsheet .nl:last-of-type { border-bottom: 0; }
|
||||
.navsheet .nl:hover { text-decoration: none; background: rgba(255, 255, 255, .05); }
|
||||
.navsheet .nl[aria-current="page"] { color: var(--acc); }
|
||||
.navsheet .nl [data-gh], .navsheet .nl [data-dc] { color: var(--fg-3); font-size: 14px; font-variant-numeric: tabular-nums; }
|
||||
/* The cup sits where the star count and the member count sit: hard right, in the
|
||||
same quiet grey — the row reads "Buy me a coffee ……… ☕". */
|
||||
.navsheet .coffee svg { width: 19px; height: 19px; fill: var(--fg-3); flex: none; }
|
||||
/* No second Download button in here: the bar keeps its own at every width, a
|
||||
finger-width above, and two identical green calls to action is one too many. */
|
||||
|
||||
/* -------------------------------------------------------- contents drawer
|
||||
Every page that has one gets the same one: closed on load, at every width,
|
||||
with no remembered state. The Contents pill opens it; the ✕ inside it, Escape,
|
||||
or a tap on the dimmed page closes it. Nothing else opens or closes it. */
|
||||
|
||||
.toc-btn {
|
||||
position: fixed; z-index: 62;
|
||||
left: max(16px, env(safe-area-inset-left));
|
||||
bottom: max(16px, env(safe-area-inset-bottom));
|
||||
display: inline-flex; align-items: center; gap: 9px;
|
||||
min-height: 44px; padding: 0 19px 0 16px; border-radius: 999px; cursor: pointer;
|
||||
/* Opaque enough to read against running text on its own, so the pill still works
|
||||
where backdrop-filter does not. */
|
||||
background: rgba(20, 21, 24, .94);
|
||||
backdrop-filter: saturate(180%) blur(20px); -webkit-backdrop-filter: saturate(180%) blur(20px);
|
||||
border: 1px solid var(--hair);
|
||||
color: var(--fg-2); font-size: 14px; font-weight: 500; letter-spacing: -.01em;
|
||||
box-shadow: 0 10px 30px rgba(0, 0, 0, .45);
|
||||
transition: color .2s var(--ease), background-color .2s var(--ease),
|
||||
border-color .2s var(--ease), opacity .2s var(--ease);
|
||||
}
|
||||
.toc-btn:hover { color: var(--fg); border-color: rgba(255, 255, 255, .25); background: rgba(32, 33, 37, .92); }
|
||||
.toc-btn svg { width: 16px; height: 16px; }
|
||||
/* The pill steps aside whenever a panel is up: with the drawer open the ✕ inside it
|
||||
is the control, and under the navigation sheet it is just a shape behind glass. */
|
||||
body.contents-open .toc-btn, body.menu-open .toc-btn { opacity: 0; pointer-events: none; }
|
||||
|
||||
.side {
|
||||
position: fixed; left: 0; top: 54px; bottom: 0; z-index: 80;
|
||||
width: min(340px, 88vw);
|
||||
padding: 0 24px calc(30px + env(safe-area-inset-bottom)) calc(24px + env(safe-area-inset-left));
|
||||
background: #0a0b0c;
|
||||
border-right: 1px solid var(--hair-soft);
|
||||
box-shadow: 40px 0 80px rgba(0, 0, 0, .5);
|
||||
overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin;
|
||||
transform: translateX(-102%); visibility: hidden;
|
||||
/* Same one-instant switch as the sheet above, for the same two reasons. */
|
||||
transition: transform .32s var(--ease), visibility 0s linear .32s;
|
||||
}
|
||||
body.contents-open .side {
|
||||
transform: none; visibility: visible;
|
||||
transition: transform .32s var(--ease), visibility 0s;
|
||||
}
|
||||
|
||||
/* The close button rides along at the top of a long chapter list, so it is never
|
||||
more than a glance away. */
|
||||
.side-top {
|
||||
position: sticky; top: 0; z-index: 1;
|
||||
display: flex; align-items: center; justify-content: space-between;
|
||||
margin: 0 -24px 8px calc(-24px - env(safe-area-inset-left));
|
||||
padding: 12px 14px 12px calc(24px + env(safe-area-inset-left));
|
||||
background: #0a0b0c;
|
||||
border-bottom: 1px solid var(--hair-soft);
|
||||
}
|
||||
.side-title { font-size: 15px; font-weight: 600; letter-spacing: -.02em; color: var(--fg); }
|
||||
.rail-close {
|
||||
flex: none;
|
||||
display: flex; align-items: center; justify-content: center;
|
||||
width: 44px; height: 44px; margin: -6px -8px -6px 0;
|
||||
border-radius: 11px; color: var(--fg-2); cursor: pointer;
|
||||
transition: color .2s var(--ease), background-color .2s var(--ease);
|
||||
}
|
||||
.rail-close:hover { color: var(--fg); background: rgba(255, 255, 255, .07); }
|
||||
.rail-close svg { width: 17px; height: 17px; }
|
||||
|
||||
/* Whatever the sheet or the drawer does not cover is dimmed, so the page behind
|
||||
stops competing for attention and a tap out there reads as "close". It starts
|
||||
below the bar: the header stays legible whatever is open. */
|
||||
body::after {
|
||||
content: ""; position: fixed; inset: 54px 0 0; z-index: 70;
|
||||
background: rgba(0, 0, 0, .55);
|
||||
backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px);
|
||||
opacity: 0; pointer-events: none;
|
||||
transition: opacity .3s var(--ease);
|
||||
}
|
||||
body.menu-open::after, body.contents-open::after { opacity: 1; pointer-events: auto; }
|
||||
|
||||
/* The panels still open and close, they just stop travelling. The delay has to go
|
||||
with the duration: it is what holds visibility back until a slide has finished,
|
||||
and there is no slide left to wait for. */
|
||||
@media (prefers-reduced-motion: reduce) {
|
||||
.nav-links, .nav-links a, body::after { transition-duration: .01ms !important; }
|
||||
.nav-links.open a { transition-delay: 0s !important; }
|
||||
.side, .navsheet, .toc-btn, body::after {
|
||||
transition-duration: .01ms !important;
|
||||
transition-delay: 0s !important;
|
||||
}
|
||||
}
|
||||
|
||||
/* ------------------------------------------------------------------- notice
|
||||
The GitHub account suspension. Deliberately a contained card, not a full-bleed
|
||||
banner: it has to be impossible to miss and still not be the first thing the
|
||||
page shouts. Remove the whole block once the account is restored. */
|
||||
/* --------------------------------------------------------------- rail contents
|
||||
One list per page — a title with a one-line subtitle per topic. */
|
||||
|
||||
.notice-wrap { padding: 22px 0 0; }
|
||||
.notice {
|
||||
position: relative;
|
||||
background: linear-gradient(180deg, rgba(255, 159, 10, .07), rgba(255, 159, 10, .02));
|
||||
border: 1px solid rgba(255, 159, 10, .26);
|
||||
border-radius: var(--r-m);
|
||||
padding: clamp(20px, 3.4vw, 28px);
|
||||
.side-label {
|
||||
font-size: 11.5px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase;
|
||||
color: var(--fg-3);
|
||||
margin: 28px 0 8px;
|
||||
}
|
||||
.notice-tag {
|
||||
display: inline-flex; align-items: center; gap: 8px;
|
||||
color: #ffb340; font-size: 13px; font-weight: 600;
|
||||
text-transform: uppercase; letter-spacing: .07em;
|
||||
margin-bottom: 12px;
|
||||
.side-label:first-child { margin-top: 0; }
|
||||
.side-link {
|
||||
display: flex; flex-direction: column; justify-content: center;
|
||||
min-height: 44px; /* a chapter without a subtitle is still tappable */
|
||||
padding: 8px 12px; margin: 0 -12px; border-radius: 10px;
|
||||
color: var(--fg);
|
||||
transition: background-color .2s var(--ease);
|
||||
}
|
||||
.notice-tag::before {
|
||||
content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--amber);
|
||||
box-shadow: 0 0 0 4px rgba(255, 159, 10, .16);
|
||||
.side-link:hover { text-decoration: none; background: rgba(255, 255, 255, .05); }
|
||||
.side-link b { display: block; font-size: 14.5px; font-weight: 600; letter-spacing: -.015em; }
|
||||
.side-link span {
|
||||
display: block; color: var(--fg-3); font-size: 12.5px; line-height: 1.4; margin-top: 2px;
|
||||
}
|
||||
.notice h2 {
|
||||
font-size: clamp(20px, 3vw, 26px); letter-spacing: -.025em; color: #ffdcae;
|
||||
margin-bottom: 12px;
|
||||
}
|
||||
.notice p { color: #cbbba6; font-size: 15.5px; max-width: 68ch; margin-bottom: 10px; }
|
||||
.notice p b { color: #fff8ee; font-weight: 600; }
|
||||
.notice .actions { margin-top: 18px; }
|
||||
.notice .btn { background: var(--amber); color: #1a1206; }
|
||||
.notice .btn:hover { background: #ffb340; }
|
||||
/* Named dc-btn, not dc: the `.dc` Discord card below owns that class, and a button
|
||||
carrying both picked up the card's 30px padding and 44px top margin. */
|
||||
.notice .btn.dc-btn { background: var(--blurple); color: #fff; }
|
||||
.notice .btn.dc-btn:hover { background: #6b76f5; }
|
||||
/* Two half-width buttons stacked with a ragged right edge look accidental; on a phone
|
||||
they read as one decision with two answers. */
|
||||
@media (max-width: 560px) {
|
||||
.notice .actions { display: grid; gap: 10px; }
|
||||
.notice .btn { width: 100%; }
|
||||
/* Scrollspy: the section under the reader, and on the other pages the page itself. */
|
||||
.side-link.on, .side-link[aria-current="page"] { background: rgba(255, 255, 255, .045); }
|
||||
.side-link.on b, .side-link[aria-current="page"] b { color: var(--acc); }
|
||||
|
||||
/* A wide sheet with one narrow column of links looks abandoned; two columns fill it. */
|
||||
@media (min-width: 640px) and (max-width: 999.98px) {
|
||||
.navsheet .nl { border-bottom: 0; }
|
||||
.navsheet .nl-rows { display: grid; grid-template-columns: 1fr 1fr; column-gap: 28px; }
|
||||
}
|
||||
|
||||
/* --------------------------------------------------------------------- hero */
|
||||
@@ -510,7 +602,7 @@ section { padding: var(--sec) 0 0; }
|
||||
/* The 1px gap is the divider: the panel background shows through between cells, so
|
||||
the rules land correctly however many columns the grid resolves to. */
|
||||
.spec-cells {
|
||||
display: grid; grid-template-columns: repeat(5, 1fr);
|
||||
display: grid; grid-template-columns: repeat(6, 1fr);
|
||||
gap: 1px; background: var(--hair-soft);
|
||||
}
|
||||
.spec-cells > div {
|
||||
@@ -522,11 +614,9 @@ section { padding: var(--sec) 0 0; }
|
||||
letter-spacing: -.035em; font-variant-numeric: tabular-nums; line-height: 1.1;
|
||||
}
|
||||
.spec-cells span { color: var(--fg-3); font-size: 13.5px; }
|
||||
@media (max-width: 760px) {
|
||||
.spec-cells { grid-template-columns: repeat(2, 1fr); }
|
||||
/* Five cells over two columns leaves a hole; the last one takes the whole row. */
|
||||
.spec-cells > div:last-child { grid-column: 1 / -1; }
|
||||
}
|
||||
/* Six across is too thin to read before the layout is wide; three, then two. */
|
||||
@media (max-width: 1000px) { .spec-cells { grid-template-columns: repeat(3, 1fr); } }
|
||||
@media (max-width: 620px) { .spec-cells { grid-template-columns: repeat(2, 1fr); } }
|
||||
|
||||
/* ------------------------------------------------------------- the link quad
|
||||
Four places openGym lives, as one block of four. Each pad is the whole link, so
|
||||
@@ -660,6 +750,10 @@ code { font-family: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, mo
|
||||
p code, li code, td code {
|
||||
background: var(--surface-2); border-radius: 6px; padding: 2px 6px;
|
||||
font-size: .88em; color: #e4e4e8;
|
||||
/* An env var or a URL in running text is one unbreakable word wider than a
|
||||
320px phone; without this it pushes the whole page sideways. A <pre> block is
|
||||
left alone — it scrolls inside its own box. */
|
||||
overflow-wrap: anywhere;
|
||||
}
|
||||
|
||||
.toc { display: flex; flex-wrap: wrap; gap: 8px; margin: 24px 0 4px; }
|
||||
@@ -669,6 +763,8 @@ p code, li code, td code {
|
||||
transition: border-color .25s var(--ease), color .25s var(--ease);
|
||||
}
|
||||
.toc a:hover { color: var(--fg); border-color: var(--hair); text-decoration: none; }
|
||||
/* The topic rail lists the same sections on a wide screen; twice is clutter. */
|
||||
@media (min-width: 1300px) { .toc { display: none; } }
|
||||
|
||||
/* config table on the docs page */
|
||||
table.cfg { width: 100%; border-collapse: collapse; margin: 18px 0 24px; font-size: 15.5px; }
|
||||
@@ -801,3 +897,34 @@ table.cfg td:first-child { white-space: nowrap; width: 1%; padding-right: 26px;
|
||||
.js.intro .hero .actions,
|
||||
.js.intro .hero-stage { opacity: 1; animation: none; }
|
||||
}
|
||||
|
||||
/* ------------------------------------------------------- rail: subchapters
|
||||
Chapters are .side-link rows inside a .side-group; the group's subchapters sit
|
||||
in .side-subs and unfold for the chapter being read (scrollspy) or on tap. */
|
||||
.side-group .side-subs {
|
||||
display: none;
|
||||
margin: 2px 0 6px;
|
||||
}
|
||||
.side-group.open .side-subs { display: block; }
|
||||
.side-sub {
|
||||
display: block; padding: 5px 12px 5px 24px; margin: 0 -12px; border-radius: 8px;
|
||||
color: var(--fg-2); font-size: 13px; line-height: 1.4;
|
||||
transition: color .2s var(--ease), background-color .2s var(--ease);
|
||||
}
|
||||
.side-sub:hover { text-decoration: none; color: var(--fg); background: rgba(255, 255, 255, .04); }
|
||||
.side-sub.on { color: var(--acc); }
|
||||
/* A subchapter is a tap target too, not just a line of text. */
|
||||
@media (pointer: coarse) { .side-sub { padding-top: 9px; padding-bottom: 9px; } }
|
||||
|
||||
/* --------------------------------------------------------- a11y: link affordance
|
||||
Links inside running text can't rely on color alone (WCAG 1.4.1 / Lighthouse
|
||||
link-in-text-block): give them a quiet underline. Nav, cards and the rail keep
|
||||
their color-only look — they are recognisable as controls by placement. */
|
||||
.prose p a, .prose li a, .prose td a, .foot .c a, .note a {
|
||||
text-decoration: underline;
|
||||
text-decoration-color: rgba(50, 215, 75, .45);
|
||||
text-underline-offset: 2.5px;
|
||||
}
|
||||
.prose p a:hover, .prose li a:hover, .prose td a:hover, .foot .c a:hover, .note a:hover {
|
||||
text-decoration-color: currentColor;
|
||||
}
|
||||
Reference in new issue
Block a user