[FEAT] Ziele-System (Goals) - v9e Kernfeature #25

Open
opened 2026-03-23 18:05:02 +01:00 by Lars · 0 comments
Owner

Version: v9e
Priorit�t: High (Kernfeature!)
Aufwand: ~12-16h
Dokumentation: .claude/docs/functional/GOALS_VITALS.md

Problem

Aktuell: Nur Datensammlung ohne Zielsetzung.
Benutzer haben keine Motivation, keinen Fokus, keine Fortschrittsmessung.

L�sung: Ziele-System

Unterst�tzte Zieltypen

  • Gewichtsziel (kg, Zieldatum)
  • K�rperfett-Ziel (%)
  • Konditionsziel (VO2 Max)
  • Kraftziel (1RM, Wiederholungen)
  • Ruhepuls-Ziel (bpm)
  • Blutdruck-Ziel (mmHg)

Features

  1. Unbegrenzt viele Ziele gleichzeitig
  2. Prim�rziel bestimmt Dashboard-Fokus
  3. Fortschrittsbalken (aktuell vs. Ziel in %)
  4. Prognose (auf Kurs / X Tage Verz�gerung)
  5. Countdown bis Zieldatum
  6. KI-Zielvorschl�ge (realistisch basierend auf Daten)
  7. Ziel-Historie (alle vergangenen Ziele)

DB-Schema

CREATE TABLE goals (
    id SERIAL PRIMARY KEY,
    profile_id UUID NOT NULL,
    type VARCHAR(50), -- weight, bodyfat, vo2max, rhr, bp, etc.
    target_value DECIMAL,
    target_date DATE,
    start_value DECIMAL,
    start_date DATE DEFAULT NOW(),
    status VARCHAR(20), -- active, achieved, abandoned, expired
    is_primary BOOLEAN DEFAULT false,
    created_at TIMESTAMP DEFAULT NOW()
);

UI-Komponenten

1. Dashboard-Widget:

  • Kompakte Karten f�r alle aktiven Ziele
  • Fortschrittsbalken + Countdown
  • Prognose (? auf Kurs / ?? Verz�gerung)

2. Ziele-Seite (neue Navigation):

  • Tab 1: Aktive Ziele (Detail-Ansicht)
  • Tab 2: Ziel-Historie
  • Tab 3: Neues Ziel anlegen
  • KI-Vorschl�ge Button

3. KI-Integration:

  • Analysis.jsx: Ziel-fokussierte Empfehlungen
  • Platzhalter: {{primary_goal}}, {{goal_progress}}, {{days_to_goal}}

Betroffene Dateien

Backend:

  • migrations/016_goals.sql
  • routers/goals.py (CRUD + Progress-Berechnung)
  • routers/insights.py (Ziel-Platzhalter)

Frontend:

  • pages/GoalsPage.jsx (NEU)
  • components/GoalWidget.jsx (NEU - f�r Dashboard)
  • pages/Dashboard.jsx (Widget integrieren)
  • App.jsx (Navigation erweitern)
  • utils/api.js (Goals-Endpoints)

Akzeptanzkriterien

  • User kann Ziele anlegen/bearbeiten/l�schen
  • Dashboard zeigt aktive Ziele mit Fortschritt
  • Prognose berechnet basierend auf Trend
  • KI schl�gt realistische Ziele vor
  • Prim�rziel beeinflusst KI-Analyse-Fokus
**Version:** v9e **Priorit�t:** High (Kernfeature!) **Aufwand:** ~12-16h **Dokumentation:** .claude/docs/functional/GOALS_VITALS.md ## Problem Aktuell: Nur Datensammlung ohne Zielsetzung. Benutzer haben keine Motivation, keinen Fokus, keine Fortschrittsmessung. ## L�sung: Ziele-System ### Unterst�tzte Zieltypen - Gewichtsziel (kg, Zieldatum) - K�rperfett-Ziel (%) - Konditionsziel (VO2 Max) - Kraftziel (1RM, Wiederholungen) - Ruhepuls-Ziel (bpm) - Blutdruck-Ziel (mmHg) ### Features 1. **Unbegrenzt viele Ziele** gleichzeitig 2. **Prim�rziel** bestimmt Dashboard-Fokus 3. **Fortschrittsbalken** (aktuell vs. Ziel in %) 4. **Prognose** (auf Kurs / X Tage Verz�gerung) 5. **Countdown** bis Zieldatum 6. **KI-Zielvorschl�ge** (realistisch basierend auf Daten) 7. **Ziel-Historie** (alle vergangenen Ziele) ### DB-Schema ```sql CREATE TABLE goals ( id SERIAL PRIMARY KEY, profile_id UUID NOT NULL, type VARCHAR(50), -- weight, bodyfat, vo2max, rhr, bp, etc. target_value DECIMAL, target_date DATE, start_value DECIMAL, start_date DATE DEFAULT NOW(), status VARCHAR(20), -- active, achieved, abandoned, expired is_primary BOOLEAN DEFAULT false, created_at TIMESTAMP DEFAULT NOW() ); ``` ### UI-Komponenten **1. Dashboard-Widget:** - Kompakte Karten f�r alle aktiven Ziele - Fortschrittsbalken + Countdown - Prognose (? auf Kurs / ?? Verz�gerung) **2. Ziele-Seite (neue Navigation):** - Tab 1: Aktive Ziele (Detail-Ansicht) - Tab 2: Ziel-Historie - Tab 3: Neues Ziel anlegen - KI-Vorschl�ge Button **3. KI-Integration:** - Analysis.jsx: Ziel-fokussierte Empfehlungen - Platzhalter: {{primary_goal}}, {{goal_progress}}, {{days_to_goal}} ### Betroffene Dateien **Backend:** - migrations/016_goals.sql - routers/goals.py (CRUD + Progress-Berechnung) - routers/insights.py (Ziel-Platzhalter) **Frontend:** - pages/GoalsPage.jsx (NEU) - components/GoalWidget.jsx (NEU - f�r Dashboard) - pages/Dashboard.jsx (Widget integrieren) - App.jsx (Navigation erweitern) - utils/api.js (Goals-Endpoints) ### Akzeptanzkriterien - User kann Ziele anlegen/bearbeiten/l�schen - Dashboard zeigt aktive Ziele mit Fortschritt - Prognose berechnet basierend auf Trend - KI schl�gt realistische Ziele vor - Prim�rziel beeinflusst KI-Analyse-Fokus
Lars added the
feature
high
develop
labels 2026-03-23 18:05:02 +01:00
Sign in to join this conversation.
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: Lars/mitai-jinkendo#25
No description provided.