ROOT ARCHITECTURAL CHANGE:
Multiple questions with same type are now supported!
Problem:
- question_augmenter used q.type as LLM key
- If two questions had type="unsicherheit":
- LLM saw duplicate keys: "- unsicherheit: [ja/nein]"
- Could only answer one
- Signals were ambiguous
Solution:
- Use question.id as LLM key (unique by design)
- Keep type for normalization logic
- Map id → type internally
Backend question_augmenter.py:
- format_question_list() now uses q.id as key
- Format: "- **q21**: [ja/nein] # Question text"
- Question text as comment for LLM context
Backend workflow_executor.py:
- Removed type→id mapping (no longer needed)
- decision_signals now keyed by id (from LLM)
- Build id→type catalog for normalization
- NormalizedSignal.question_type stores id (not type!)
- End Node template: signal_{id} directly available
Flow:
1. Questions sent to LLM: "- q21: [ja/nein] # Ist Protein unsicher?"
2. LLM answers: "- q21: nein"
3. Normalization: id→type lookup for spectrum/rules
4. Template: {{ node_4.signal_q21 }} = "nein"
Example (TWO unsicherheit questions):
Questions:
- q21: type=unsicherheit, question="Ist Protein unsicher?"
- q22: type=unsicherheit, question="Ist Energie unsicher?"
LLM Prompt:
```
## Entscheidungsfragen
- **q21**: [ja/nein] # Ist Protein unsicher?
- **q22**: [ja/nein] # Ist Energie unsicher?
```
LLM Response:
```
- q21: nein
- q22: ja
```
Template:
```
{{ node_4.signal_q21 }} → "nein"
{{ node_4.signal_q22 }} → "ja"
```
BREAKING CHANGE:
- Old workflows with decision_signals keyed by type will break
- Need to re-execute workflows after update
Issue: Cannot have multiple questions with same type
Version: 0.9p (workflow module)
Part 3: End Node Template Engine - ARCHITECTURAL 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) |