docs: Phase 0c completion + new issue #55
- Mark issue #53 as completed - Create issue #55: Dynamic Aggregation Methods - Update CLAUDE.md with Phase 0c achievements - Document 97 migrated functions + 20 new chart endpoints
This commit is contained in:
1 parent
782f79fe04
commit
f81171a1f5
3 files changed
+263
-4
No files matched your search
@@ -76,11 +76,94 @@ frontend/src/
|
||||
└── technical/ # MEMBERSHIP_SYSTEM.md
|
||||
```
|
||||
|
||||
## Aktuelle Version: v0.9g+ → v0.9h (Goals Complete + Dynamic Focus Areas) 🎯 27.03.2026
|
||||
## Aktuelle Version: v0.9h+ → v0.9i (Phase 0c Complete + Chart Endpoints) 🎯 28.03.2026
|
||||
|
||||
**Status:** BEREIT FÜR RELEASE v0.9h
|
||||
**Status:** Phase 0c Backend KOMPLETT - Frontend Charts in Arbeit
|
||||
**Branch:** develop
|
||||
**Nächster Schritt:** Testing → Prod Deploy → Code Splitting → Phase 0b (120+ Platzhalter)
|
||||
**Nächster Schritt:** Frontend Chart Integration → Testing → Prod Deploy v0.9i
|
||||
|
||||
### Updates (28.03.2026 - Phase 0c Multi-Layer Architecture Complete) 🆕
|
||||
|
||||
#### Phase 0c: Multi-Layer Data Architecture ✅ **COMPLETED**
|
||||
> **Gitea:** Issue #53 - CLOSED
|
||||
> **Dokumentation:** `docs/issues/issue-53-phase-0c-multi-layer-architecture.md`
|
||||
|
||||
**Ziel erreicht:** Single Source of Truth für Datenberechnungen - nutzbar für KI-Platzhalter UND Chart-Endpoints.
|
||||
|
||||
**1. Data Layer Migration (97 Funktionen)**
|
||||
- ✅ **body_metrics.py** (438 → 831 Zeilen, 20 Funktionen)
|
||||
- Weight trends: 7d/28d/90d slopes, goal projections
|
||||
- Body composition: FM/LBM changes, recomposition quadrants
|
||||
- Circumferences: Delta-Berechnungen, Fortschritts-Scores
|
||||
- ✅ **nutrition_metrics.py** (483 → 1093 Zeilen, 16 Funktionen)
|
||||
- Energy balance, protein adequacy, macro consistency
|
||||
- Intake volatility, nutrition scoring
|
||||
- ✅ **activity_metrics.py** (277 → 906 Zeilen, 20 Funktionen)
|
||||
- Training volume, quality sessions, load monitoring
|
||||
- Monotony/Strain scores, ability balance
|
||||
- ✅ **recovery_metrics.py** (291 → 879 Zeilen, 16 Funktionen)
|
||||
- Sleep metrics, HRV/RHR baselines, recovery scoring
|
||||
- ✅ **scores.py** (NEU, 584 Zeilen, 14 Funktionen)
|
||||
- Focus weights, goal progress, category scores
|
||||
- ✅ **correlations.py** (NEU, 504 Zeilen, 11 Funktionen)
|
||||
- Lag correlations, plateau detection, top drivers
|
||||
|
||||
**2. Chart Endpoints API (20 neue Endpoints)**
|
||||
- ✅ **Ernährung (E1-E5):** 4 Endpoints
|
||||
- `/charts/energy-balance` - Kalorien-Timeline vs. TDEE
|
||||
- `/charts/macro-distribution` - Protein/Carbs/Fat (Pie)
|
||||
- `/charts/protein-adequacy` - Protein vs. Ziel (Timeline)
|
||||
- `/charts/nutrition-consistency` - Konsistenz-Score (Bar)
|
||||
- ✅ **Aktivität (A1-A8):** 7 Endpoints
|
||||
- `/charts/training-volume` - Wöchentliches Volumen (Bar)
|
||||
- `/charts/training-type-distribution` - Typen-Verteilung (Pie)
|
||||
- `/charts/quality-sessions` - Qualitäts-Rate (Bar)
|
||||
- `/charts/load-monitoring` - Acute/Chronic Load + ACWR (Line)
|
||||
- `/charts/monotony-strain` - Monotonie & Strain (Bar)
|
||||
- `/charts/ability-balance` - Fähigkeiten-Balance (Radar)
|
||||
- `/charts/volume-by-ability` - Volumen pro Fähigkeit (Bar)
|
||||
- ✅ **Erholung (R1-R5):** 5 Endpoints
|
||||
- `/charts/recovery-score` - Recovery Timeline (Line)
|
||||
- `/charts/hrv-rhr-baseline` - HRV & RHR vs. Baseline (Multi-Line)
|
||||
- `/charts/sleep-duration-quality` - Schlaf Dauer + Qualität (Multi-Line)
|
||||
- `/charts/sleep-debt` - Kumulative Schlafschuld (Line)
|
||||
- `/charts/vital-signs-matrix` - Aktuelle Vitalwerte (Bar)
|
||||
- ✅ **Korrelationen (C1-C4):** 4 Endpoints
|
||||
- `/charts/weight-energy-correlation` - Gewicht ↔ Energie (Scatter)
|
||||
- `/charts/lbm-protein-correlation` - Magermasse ↔ Protein (Scatter)
|
||||
- `/charts/load-vitals-correlation` - Load ↔ HRV/RHR (Scatter)
|
||||
- `/charts/recovery-performance` - Top Treiber (Bar)
|
||||
|
||||
**3. Statistik**
|
||||
```
|
||||
Data Layer: +3140 Zeilen (6 Module, 97 Funktionen)
|
||||
Chart Endpoints: 329 → 2246 Zeilen (+1917 Zeilen, 20 neue Endpoints)
|
||||
Commits: 7 systematische Commits (6 Module + 1 Chart Expansion)
|
||||
```
|
||||
|
||||
**4. Technische Details**
|
||||
- Single Source of Truth: Alle Berechnungen in `data_layer/`, keine Duplikation
|
||||
- Chart.js Format: Alle Responses Chart.js-kompatibel
|
||||
- Confidence System: Jeder Endpoint prüft Datenqualität
|
||||
- Flexible Zeitfenster: Query-Parameter für 7-365 Tage
|
||||
- Metadata: Confidence, Data Points, Zusatzinfos pro Chart
|
||||
|
||||
**5. Commits**
|
||||
```
|
||||
5b7d7ec fix: Phase 0c - update all in-function imports to use data_layer
|
||||
285184b fix: add missing statistics import and update focus_weights function
|
||||
a441537 debug: add detailed logging to get_nutrition_avg
|
||||
ffa99f1 fix: correct confidence thresholds for 30-89 day range
|
||||
5b4688f chore: remove debug logging from placeholder_resolver
|
||||
782f79f feat: Phase 0c - Complete chart endpoints (E1-E5, A1-A8, R1-R5, C1-C4)
|
||||
```
|
||||
|
||||
**6. Betroffene Dateien**
|
||||
- `backend/data_layer/*.py` (6 Module komplett refactored)
|
||||
- `backend/routers/charts.py` (329 → 2246 Zeilen)
|
||||
- `backend/placeholder_resolver.py` (Imports aktualisiert, Debug-Logging entfernt)
|
||||
|
||||
---
|
||||
|
||||
### Updates (28.03.2026 - Goal System Enhancement Complete) 🆕
|
||||
|
||||
|
||||
Reference in new issue
Block a user