Files
kuentagym/CONTRIBUTING.md
T
Duarte Santos 925190109f Umzug nach GitLab: CI/CD fuer Tests, Images, APK, Pages und Releases
gitea.com hat keinen Actions-Runner, also gab es dort seit dem Umzug weder
Container-Images noch einen gebauten APK noch gruene Tests auf Merge Requests.
GitLab kann alles vier, also zieht das Projekt dorthin um.

.gitlab-ci.yml deckt die komplette Kette ab:
- test: Frontend-Suite (346 Tests), Locale-Checks, Fatigue-Probe, MCP-Suite
- build: api- und web-Image nach registry.gitlab.com/duartesantos8/opengym/*,
  auf v*-Tags amd64+arm64 mit latest/X.Y/X.Y.Z, sonst amd64 als edge
- package: signierter APK (zipalign + apksigner) plus Upload in die Generic
  Package Registry; der Key liegt in geschuetzten CI-Variablen und existiert
  damit nur auf main und v*-Tags
- deploy: der Browser-Demo-Build auf GitLab Pages
- release: GitLab-Release mit dem passenden CHANGELOG-Abschnitt und Links auf
  APK und Images

GitHub konnte "Tag gepusht" von "Release veroeffentlicht" unterscheiden und hat
Images nur aus letzterem gebaut (Issue #87). GitLab kann das nicht - dort ist die
Tag-Pipeline das, was das Release anlegt. Die Regel steht deshalb als Kommentar
im CI-File, und v*-Tags sind geschuetzt.

Ausserdem: Issue-/MR-Vorlagen unter .gitlab/, und saemtliche Repo-Links in
README, Docs, App, Dockerfile-Labels, docker-compose und Website zeigen auf
GitLab. site.js liest Sterne und Releases jetzt aus der GitLab-API (andere
Feldnamen, deshalb neue sessionStorage-Keys). SECURITY.md hat wieder einen
privaten Meldeweg: ein vertrauliches Issue.

.github/ und .gitea/ bleiben liegen - Spiegel bzw. fuer den Tag, an dem das
GitHub-Konto zurueckkommt.
2026-08-23 20:10:07 +02:00

3.6 KiB
Raw Blame History

Contributing to openGym

Thanks for taking a look! openGym is intentionally small and dependency-light, and the goal is to keep it that way — easy to read, easy to self-host.

Project layout

frontend/  React + Vite app (src/views, src/components, src/store, src/lib). Builds to static files.
           android/ + ios/ are the Capacitor shells for the standalone mobile app (docs/MOBILE.md).
api/       backend — server.js (Node, no framework), one dependency (@simplewebauthn/server).
web/       multi-stage Dockerfile (builds frontend → nginx) + nginx.conf (serves app, proxies /api).
media/     exercise img/gif (gitignored, fetched at runtime).
docs/      self-hosting guide.
mcp/       optional Model Context Protocol server — read-only stdio bridge for LLM apps
           (Claude Desktop, Cursor, …) to query a user's workouts/1RM/muscle balance. Not in
           the Docker build; only runs when an LLM client spawns it. See mcp/README.md.

Running for development

cp .env.example .env
docker compose up -d --build      # api + web + media on :8080
# frontend hot reload:
cd frontend && npm install && npm run dev
# training logic (progression rules, 1RM, how a session is read back):
cd frontend && npm test

Guidelines

  • Keep it dependency-light. The frontend uses React + Router + Zustand and nothing else; new deps (front or back) are a hard sell. api/ has two (@simplewebauthn/server for passkeys, web-push for notifications) — keep it near that.
  • Match the style. Small components, clear names, comments only where the "why" isn't obvious. State lives in the Zustand store (src/store); pure helpers in src/lib.
  • Don't commit the exercise media (media/) or data/ — they're gitignored.
  • Test the flow you touched — click through the affected screens (and the workout flow) in a browser before opening a merge request.
  • Training logic gets a unit test. Anything deciding what you lift next, or reading a logged session back, belongs in a pure helper in src/lib with tests beside it (npm test). These rules are easy to get subtly wrong and nearly impossible to verify by clicking — the progression engine grew two real bugs that only a test pinned down.

Good first issues

  • Additional starter plans (upper/lower, full-body, 5×5…)
  • More languages for the exercise instructions (the dataset ships several)
  • Percentage / training-max programming (5/3/1-style) on top of the progression engine in src/lib/progression.js — the policy interface is already there
  • Accessibility passes on the workout and chart screens

Where to ask what

You have Goes to
A question, or self-hosting that won't behave An issue labelled question
An idea you're not sure about yet An issue labelled idea
A reproducible bug Issues
A change you've already built A merge request

GitLab has no Discussions, so questions and ideas are issues too — just labelled, so nobody mistakes a question for agreed-on work. An answered question is worth more than the same answer in a chat log: the next person searching "passkey login fails behind my reverse proxy" finds it.

Reporting bugs

Open an issue with: what you did, what you expected, what happened, and your browser/OS. If it's about login/passkeys, include your RP_ID/ORIGIN (not the data/ contents) — most login issues are an origin mismatch.

By contributing you agree your work is licensed under the project's GNU AGPL v3.0.