Root Cause: - Previous index-based mapping assumed signals come in same order as questions - But LLM response order can differ from question configuration order - Led to signal values being assigned to wrong question IDs Old Logic (BUGGY): 1. Build question_type → [list of IDs] 2. Track index per type 3. Get Nth ID from list → Assumes LLM answers in question definition order ❌ New Logic (CORRECT): 1. Build question_type → question_id (direct mapping) 2. For each signal: lookup type → get ID → Order-independent ✅ Backend workflow_executor.py: - Removed index tracking (type_counts) - Direct lookup: question_type_to_id[signal.question_type] - Added ERROR log if duplicate question types found - Added INFO log for each mapped signal (debugging) Important: - Each question MUST have a UNIQUE type - If two questions share same type: ERROR logged - System designed for unique types (LLM can't answer duplicates) Example Debug Output: ``` Mapped signal: protein_ausreichend → signal_q21 = 'nein' Mapped signal: kohlenhydrate_strategie → signal_q1775... = 'von Proteinen' ``` Issue: Signal values assigned to wrong question IDs Version: 0.9p (workflow module) Part 3: End Node Template Engine - Signal Mapping Fix Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> |
||
|---|---|---|
| .claude | ||
| .gitea/workflows | ||
| backend | ||
| docs | ||
| frontend | ||
| nginx | ||
| scripts/gitea | ||
| tests | ||
| .env.example | ||
| .gitignore | ||
| CLAUDE.md | ||
| create_issue_no_jq.sh | ||
| create_metadaten_review_issue.sh | ||
| docker-compose.dev-env.yml | ||
| docker-compose.dev.yml | ||
| docker-compose.yml | ||
| find-container.sh | ||
| nutrition_cluster_final_check.json | ||
| nutrition_cluster_final.json | ||
| package-lock.json | ||
| package.json | ||
| playwright.config.js | ||
| README.md | ||
| registry_export_final.json | ||
| registry_export_fixed.json | ||
| registry_export_new_data.json | ||
| registry_export_part_c_fixed.json | ||
| registry_export_part_c.json | ||
| registry_export_partb.json | ||
| SETUP.md | ||
| test_activity_registration.py | ||
| 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) |