4a11d20c4d10fae512787046a2358bd21575eae5
BREAKING: Replaces single 'primary goal' with weighted multi-goal system Migration 027: - New table: focus_areas (6 dimensions with percentages) - Constraint: Sum must equal 100% - Auto-migration: goal_mode → focus_areas for existing users - Unique constraint: One active focus_areas per profile Backend: - get_focus_weights() V2: Reads from focus_areas table - Fallback: Uses goal_mode if focus_areas not set - New endpoints: GET/PUT /api/goals/focus-areas - Validation: Sum=100, range 0-100 API: - getFocusAreas() - Get current weights - updateFocusAreas(data) - Update weights (upsert) Focus dimensions: 1. weight_loss_pct (Fettabbau) 2. muscle_gain_pct (Muskelaufbau) 3. strength_pct (Kraftsteigerung) 4. endurance_pct (Ausdauer) 5. flexibility_pct (Beweglichkeit) 6. health_pct (Allgemeine Gesundheit) Benefits: - Multiple goals with custom priorities - More flexible than single primary goal - KI can use weighted scores - Ready for Phase 0b placeholder integration UI: Coming in next commit (slider interface)
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) |
Releases
5
Languages
Python
59.7%
JavaScript
38.1%
CSS
0.9%
PLpgSQL
0.9%
Shell
0.4%