Go to file
Lars 47a268f426
All checks were successful
Deploy Development / deploy (push) Successful in 55s
Build Test / lint-backend (push) Successful in 0s
Build Test / build-frontend (push) Successful in 13s
fix: comprehensive PostgreSQL Decimal handling across all endpoints
Fixed all remaining Decimal → float conversion issues found by audit.

**Fixed Endpoints:**
1. Weight Stats: min/max/avg calculations
2. Activity Stats: kcal/duration accumulation
3. Nutrition Weekly: average calculations
4. Template Variables: all f-string Decimal formatting
5. CSV Export: all numeric value formatting
6. JSON Export: added Decimal handler
7. ZIP Export: added Decimal handler
8. Correlations: weight, nutrition, caliper values

**Changes:**
- Added `from decimal import Decimal` import
- Weight stats: convert to float for min/max/avg
- Activity: float() in sum() and accumulation
- Nutrition: float() in averages
- Template vars: float() for weight_aktuell, kf_aktuell, goals
- CSV: float() in all f-strings (weight, circ, caliper, nutrition, activity)
- JSON/ZIP: custom decimal_handler for json.dumps()
- Correlations: float() for all numeric DB values

Prevents:
- TypeError in math operations
- "Decimal('X')" strings in exports
- JSON serialization failures

All numeric values from PostgreSQL now properly converted to float.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-18 21:52:57 +01:00
.gitea/workflows ci: fix workflows - prod deploys to bodytrack/, dev to bodytrack-dev/ 2026-03-17 13:11:53 +01:00
backend fix: comprehensive PostgreSQL Decimal handling across all endpoints 2026-03-18 21:52:57 +01:00
frontend fix: send 'password' instead of 'pin' in login request 2026-03-18 12:04:36 +01:00
nginx feat: initial commit – Mitai Jinkendo v9a 2026-03-16 13:35:11 +01:00
.env.example small update 2026-03-18 09:07:08 +01:00
.gitignore 9b 2026-03-18 08:27:33 +01:00
CLAUDE.md docs: update CLAUDE.md for v9b release 2026-03-18 21:39:14 +01:00
docker-compose.dev-env.yml fix: add missing /app/data volume for SQLite migration 2026-03-18 12:11:37 +01:00
docker-compose.dev.yml feat: initial commit – Mitai Jinkendo v9a 2026-03-16 13:35:11 +01:00
docker-compose.yml feat: add PostgreSQL to production setup (v9b) 2026-03-18 12:14:25 +01:00
README.md feat: initial commit – Mitai Jinkendo v9a 2026-03-16 13:35:11 +01:00
SETUP.md feat: initial commit – Mitai Jinkendo v9a 2026-03-16 13:35:11 +01:00

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

  1. Safari öffnen → http://DEINE-IP:3000
  2. Teilen-Button (□↑) → „Zum Home-Bildschirm"
  3. 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)