mitai-jinkendo/docs
Lars 65ee5f898f
All checks were successful
Deploy Development / deploy (push) Successful in 43s
Build Test / lint-backend (push) Successful in 1s
Build Test / build-frontend (push) Successful in 13s
feat: Phase 1.5 - Flexible Goal System (DB-Registry) Part 1/2
KRITISCHE ARCHITEKTUR-ÄNDERUNG vor Phase 0b:
Ermöglicht dynamische Goal Types ohne Code-Änderungen.

Backend:
- Migration 024: goal_type_definitions Tabelle
  → 8 existierende Typen als Seed-Data migriert
  → Flexible Schema: source_table, aggregation_method, calculation_formula
  → System vs. Custom Types (is_system flag)
- goal_utils.py: Universal Value Fetcher
  → get_current_value_for_goal() ersetzt hardcoded if/elif chain
  → Unterstützt: latest, avg_7d, avg_30d, sum_30d, count_7d, etc.
  → Komplexe Formeln (lean_mass) via calculation_formula JSON
- goals.py: CRUD API für Goal Type Definitions
  → GET /goals/goal-types (public)
  → POST/PUT/DELETE /goals/goal-types (admin-only)
  → Schutz für System-Types (nicht löschbar)
- goals.py: _get_current_value_for_goal_type() delegiert zu Universal Fetcher

Frontend:
- api.js: 4 neue Funktionen (listGoalTypeDefinitions, create, update, delete)

Dokumentation:
- TODO_GOAL_SYSTEM.md: Phase 1.5 hinzugefügt, Roadmap aktualisiert

Part 2/2 (nächster Commit):
- Frontend: Dynamic Goal Types Dropdown
- Admin UI: Goal Type Management Page
- Testing

Warum JETZT (vor Phase 0b)?
- Phase 0b Platzhalter (120+) nutzen Goals für Score-Berechnungen
- Flexible Goals → automatisch in Platzhaltern verfügbar
- Später umbauen = Doppelarbeit (alle Platzhalter anpassen)

Zukünftige Custom Goals möglich:
- 🧘 Meditation (min/Tag)
- 📅 Trainingshäufigkeit (x/Woche)
- 📊 Planabweichung (%)
- 🎯 Ritual-Adherence (%)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-27 06:45:05 +01:00
..
issues docs: Phase 0a completion - comprehensive documentation 2026-03-26 21:49:07 +01:00
GOAL_SYSTEM_PRIORITY_ANALYSIS.md docs: goal system priority analysis - hybrid approach 2026-03-26 16:08:00 +01:00
GOAL_SYSTEM_REDESIGN_v2.md docs: Goal System Redesign v2.0 - comprehensive concept 2026-03-26 22:05:05 +01:00
GOALS_SYSTEM_UNIFIED_ANALYSIS.md feat: Phase 0a - Minimal Goal System (Strategic + Tactical) 2026-03-26 16:20:35 +01:00
KONZEPT_ANALYSE_2026-03-26.md docs: comprehensive functional concept analysis 2026-03-26 15:26:12 +01:00
MEMBERSHIP_SYSTEM.md docs: update CLAUDE.md and add comprehensive membership system documentation 2026-03-20 15:44:29 +01:00
NEXT_STEPS_2026-03-26.md docs: Phase 0a completion - comprehensive documentation 2026-03-26 21:49:07 +01:00
STATUS_REPORT_2026-03-26.md docs: comprehensive status report 26.03.2026 2026-03-26 14:53:45 +01:00
TODO_GOAL_SYSTEM.md feat: Phase 1.5 - Flexible Goal System (DB-Registry) Part 1/2 2026-03-27 06:45:05 +01:00