Implements complete placeholder registry for Activity & Training metrics following Phase 0c Multi-Layer Architecture pattern. SCOPE: 17 Activity Placeholders - Group 1 (3): Legacy Resolver - activity_summary, activity_detail, trainingstyp_verteilung - Group 2 (7): Basic Metrics - volume, frequency, quality, load, monotony, strain, rest compliance - Group 3 (7): Advanced Metrics - 5x ability_balance, vo2max_trend, activity_score IMPLEMENTATION: - File: backend/placeholder_registrations/activity_metrics.py (~1,100 lines) - Pattern: Nutrition Part A (common_metadata + evidence-based tagging) - Evidence: CODE_DERIVED (58%), DRAFT_DERIVED (16%), MIXED (15%), TO_VERIFY (6%), UNRESOLVED (5%) - Formulas: All documented in known_limitations (Load Model, Monotony, Strain, Ability Balance, Activity Score) CRITICAL ISSUES IDENTIFIED (NOT FIXED per NO LOGIC CHANGES): 1. quality_label field mismatch (quality_sessions_pct) - TO_VERIFY 2. RPE moderate quality mapping bug (proxy_internal_load_7d) - CODE_DERIVED 3. JSONB dependencies (6 placeholders) - ability_balance_*, rest_day_compliance 4. vo2max_trend_28d questionable category (Recovery vs. Activity) - TO_VERIFY TESTING: ✓ All 17 placeholders registered successfully ✓ Registry size: 48 (31 pre-existing + 17 new) ✓ Dev backend integration: no errors ✓ Auto-registration on module import: working ARCHITECTURE ALIGNMENT: - Phase 0c Multi-Layer: 14/17 aligned (Group 2 + 3) - Old Resolver Pattern: 3/17 (Group 1 - documented, should be refactored) - Layer separation: data_layer → resolver → export FILES: - NEW: backend/placeholder_registrations/activity_metrics.py - MODIFIED: backend/placeholder_registrations/__init__.py (added import) - MODIFIED: CLAUDE.md (placeholder registry rules) DOCUMENTATION: - Gap Analysis: .claude/task/rework_0b_placeholder/ACTIVITY_CLUSTER_GAP_ANALYSIS.md - Code Inspection: .claude/task/rework_0b_placeholder/ACTIVITY_CLUSTER_CODE_INSPECTION.md - Implementation Report: .claude/task/rework_0b_placeholder/ACTIVITY_CLUSTER_IMPLEMENTATION_REPORT.md Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> |
||
|---|---|---|
| .gitea/workflows | ||
| backend | ||
| docs | ||
| frontend | ||
| nginx | ||
| .env.example | ||
| .gitignore | ||
| CLAUDE.md | ||
| docker-compose.dev-env.yml | ||
| docker-compose.dev.yml | ||
| docker-compose.yml | ||
| find-container.sh | ||
| README.md | ||
| SETUP.md | ||
| test-pipeline-api.sh | ||
| test-pipeline-backend.sh | ||
| test-unified-migration.sh | ||
BodyTrack
Körpervermessung & Körperfett Tracker – selbst gehostet, PWA-fähig.
Features
- Umfänge & Caliper-Messungen (4 Methoden) mit Verlauf
- Abgeleitete Werte: WHR, WHtR, FFMI, Magermasse
- Verlaufsdiagramme (Gewicht, KF%, Taille, …)
- KI-Interpretationen via Claude (Anthropic)
- Fortschrittsfotos mit Galerie
- PDF & CSV Export
- PWA – installierbar auf iPhone-Homescreen
- Alle Daten lokal auf deinem Server (SQLite)
Schnellstart
1. Voraussetzungen
# Docker & Docker Compose installieren (Ubuntu)
curl -fsSL https://get.docker.com | sh
sudo usermod -aG docker $USER
# Neu einloggen
2. Projekt klonen / kopieren
mkdir ~/bodytrack && cd ~/bodytrack
# Dateien hierher kopieren
3. API Key setzen
cp .env.example .env
nano .env
# ANTHROPIC_API_KEY=sk-ant-... eintragen
4. Starten
docker compose up -d
App läuft auf: http://DEINE-IP:3000
5. iPhone – Als App installieren
- Safari öffnen →
http://DEINE-IP:3000 - Teilen-Button (□↑) → „Zum Home-Bildschirm"
- BodyTrack erscheint als App-Icon
6. Von außen erreichbar (optional)
# Tailscale (einfachste Lösung – VPN zu deinem MiniPC)
curl -fsSL https://tailscale.com/install.sh | sh
sudo tailscale up
# Dann: http://TAILSCALE-IP:3000
Updates
docker compose pull
docker compose up -d --build
Backup
# Datenbank & Fotos sichern
docker run --rm -v bodytrack-data:/data -v bodytrack-photos:/photos \
-v $(pwd):/backup alpine \
tar czf /backup/bodytrack_backup_$(date +%Y%m%d).tar.gz /data /photos
Konfiguration
| Variable | Beschreibung | Standard |
|---|---|---|
ANTHROPIC_API_KEY |
Claude API Key (für KI-Analyse) | – |
Ports
| Port | Dienst |
|---|---|
| 3000 | Frontend (Nginx) |
| 8000 | Backend API (intern) |