Rewrite frontend in React + Vite (organised component tree)

Ersetzt die 1900-Zeilen-Vanilla-SPA durch eine strukturierte React-App:
- frontend/src: views/ (9 Views), components/ (Modals, LineChart, Heatmap,
  TabBar, Media, Stepper, RestTimer, Toast), store/ (Zustand: State+Sync,
  UI), lib/ (format, history, exercises, api/WebAuthn, sound, nav)
- React Router (Hash), Zustand-Store mit localStorage + Server-Sync
- Reaktives DOM-Diffing löst das manuelle Re-Render-Ruckeln (GIF läuft beim
  Set-Abhaken flüssig weiter)

Self-Hosting bleibt ein Befehl: web/ ist jetzt ein Multi-Stage-Dockerfile,
das das Frontend IM Container baut und mit nginx ausliefert — keine lokale
Node/Build-Kette nötig. Übungsmedien nach ./media ausgelagert.

Voller Ablauf im Headless-Browser getestet (Login→Plan→Workout→Stats→
Library→Settings, Feature-Parität) und Standalone-Compose Ende-zu-Ende
(React-Build im Docker, /api-Proxy, geforgter Passkey-Login) verifiziert.
This commit is contained in:
Duarte Santos committed 2026-07-20 15:12:05 +02:00
1 parent 0c237f96dc
commit 7e1d27b218
49 files changed
+3014 -2014

No files matched your search

+13
View File
@@ -0,0 +1,13 @@
# Multi-stage: build the React app, then serve it with nginx.
# Self-hosters never need Node locally — `docker compose up` builds everything.
FROM node:22-alpine AS build
WORKDIR /app
COPY frontend/package.json frontend/package-lock.json* ./
RUN npm ci 2>/dev/null || npm install
COPY frontend/ ./
RUN npm run build
FROM nginx:alpine
COPY web/nginx.conf /etc/nginx/conf.d/default.conf
COPY --from=build /app/dist /usr/share/nginx/html
# exercise media (img/gif) is mounted at runtime from the media volume