## Implemented
### DB-Schema (Migrations)
- Migration 013: training_parameters table (16 standard parameters)
- Migration 014: training_types.profile + activity_log.evaluation columns
- Performance metric calculations (avg_hr_percent, kcal_per_km)
### Backend - Rule Engine
- RuleEvaluator: Generic rule evaluation with 9 operators
- gte, lte, gt, lt, eq, neq, between, in, not_in
- Weighted scoring system
- Pass strategies: all_must_pass, weighted_score, at_least_n
- IntensityZoneEvaluator: HR zone analysis
- TrainingEffectsEvaluator: Abilities development
### Backend - Master Evaluator
- TrainingProfileEvaluator: 7-dimensional evaluation
1. Minimum Requirements (Quality Gates)
2. Intensity Zones (HR zones)
3. Training Effects (Abilities)
4. Periodization (Frequency & Recovery)
5. Performance Indicators (KPIs)
6. Safety (Warnings)
7. AI Context (simplified for MVP)
- evaluation_helper.py: Utilities for loading + saving
- routers/evaluation.py: API endpoints
- POST /api/evaluation/activity/{id}
- POST /api/evaluation/batch
- GET /api/evaluation/parameters
### Integration
- main.py: Router registration
## TODO (Phase 1.2)
- Auto-evaluation on activity INSERT/UPDATE
- Admin-UI for profile editing
- User-UI for results display
## Testing
- ✅ Syntax checks passed
- 🔲 Runtime testing pending (after auto-evaluation)
Part of Issue #15 - Training Type Profiles System
|
||
|---|---|---|
| .gitea/workflows | ||
| backend | ||
| docs | ||
| frontend | ||
| nginx | ||
| .env.example | ||
| .gitignore | ||
| CLAUDE.md | ||
| docker-compose.dev-env.yml | ||
| docker-compose.dev.yml | ||
| docker-compose.yml | ||
| README.md | ||
| SETUP.md | ||
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) |