Commit Graph

51 Commits

Author SHA1 Message Date
5e2820c63c feat: Trainer-Kontext-System & Exercise Training Characters (v0.5.0)
Some checks failed
Deploy Development / deploy (push) Successful in 33s
Test Suite / lint-backend (push) Successful in 0s
Test Suite / build-frontend (push) Successful in 5s
Test Suite / playwright-tests (push) Failing after 1m55s
Migration 012:
- exercise_training_characters (M:N junction table)
- trainer_contexts (Fokussierte Trainer-Ansichten)
- Indizes für Performance
- Example seed data

Backend (catalogs.py):
- GET /api/trainer-contexts (list own contexts)
- POST /api/trainer-contexts (create context)
- PUT /api/trainer-contexts/{id} (update own context)
- DELETE /api/trainer-contexts/{id} (delete own context)
- Enriched responses mit focus_area_name, style_direction_name, training_type_name
- Ownership-Validation (nur eigene Kontexte)

Frontend:
- TrainerContextsPage.jsx (vollständige CRUD-UI)
- Kaskadierende Dropdowns (Fokusbereich → Stilrichtung)
- is_style_independent Flag für stilunabhängige Kontexte
- api.js erweitert (listTrainerContexts, create, update, delete)

Architektur:
- Flat Catalogs mit M:N überall
- NULL = 'für alles geeignet'
- Trainer-Kontexte für fokussierte Ansichten
- Vorbereitung für 1000+ Übungen mit flexibler KI-Filterung

version: 0.5.0 (backend + frontend)
module: exercises 0.5.0, catalogs 1.5.0
page: TrainerContextsPage 1.0.0

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-04-23 14:22:17 +02:00
9ab2bd31fa fix: Update onClick handlers to use renamed functions
Some checks failed
Deploy Development / deploy (push) Successful in 37s
Test Suite / lint-backend (push) Successful in 0s
Test Suite / build-frontend (push) Successful in 5s
Test Suite / playwright-tests (push) Failing after 1m55s
- createTrainingStyle → createStyleDirection
- updateTrainingStyle → updateStyleDirection
- deleteTrainingStyle → deleteStyleDirection

Fixes: Stilrichtungen tab showed blank screen due to undefined function calls

version: 0.4.0 (frontend)
module: AdminCatalogsPage 2.2.0

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-04-23 12:57:23 +02:00
426efd4b83 fix: Frontend API Calls & Field Names für renamed tables
Some checks failed
Deploy Development / deploy (push) Successful in 36s
Test Suite / lint-backend (push) Successful in 0s
Test Suite / build-frontend (push) Successful in 6s
Test Suite / playwright-tests (push) Failing after 1m55s
- Updated api.js function names:
  - listTrainingStyles → listStyleDirections
  - createTrainingStyle → createStyleDirection
  - updateTrainingStyle → updateStyleDirection
  - deleteTrainingStyle → deleteStyleDirection
  - listTrainingStyleTargetGroups → listStyleDirectionTargetGroups
  - createTrainingStyleTargetGroup → createStyleDirectionTargetGroup
  - updateTrainingStyleTargetGroup → updateStyleDirectionTargetGroup
  - deleteTrainingStyleTargetGroup → deleteStyleDirectionTargetGroup
  - getTrainingStylesHierarchy → getStyleDirectionsHierarchy
- Updated AdminCatalogsPage.jsx:
  - loadData() uses renamed API functions
  - CRUD functions renamed (createStyleDirection, etc.)
  - Matrix uses style_direction_id parameter
  - Hierarchy renders style_directions array
- Fixes data binding between frontend and backend after table rename

version: 0.4.0 (frontend)
module: AdminCatalogsPage 2.2.0

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-04-23 12:27:09 +02:00
155c21f018 fix: Backend SQL Queries für renamed tables (Migration 010+011)
- Updated all SQL queries in catalogs.py to use renamed tables:
  - training_styles → style_directions
  - training_style_target_groups → style_direction_target_groups
  - exercise_styles → exercise_style_directions
- Updated API parameter names: training_style_id → style_direction_id
- Updated response field names: training_style_name → style_direction_name
- Updated array field names: training_styles → style_directions
- Fixes 'failed to fetch' errors on Stilrichtungen, Hierarchie, Zuordnungen tabs

version: 0.4.0 (backend)
module: catalogs 1.4.0

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-04-23 12:24:50 +02:00
a9a4c78a0e feat: Admin-UI Trainingsstil-Dimension + Umbenennung
Some checks failed
Deploy Development / deploy (push) Successful in 33s
Test Suite / lint-backend (push) Successful in 0s
Test Suite / build-frontend (push) Successful in 5s
Test Suite / playwright-tests (push) Failing after 1m54s
Admin-UI Erweiterung:

1. Tab "Trainingsstile" → "Stilrichtungen" umbenannt
   - Überschrift: "Neue Stilrichtung" (statt Trainingsstil)
   - Tab-Label: "Stilrichtungen"

2. Neuer Tab "Trainingsstil" (Breitensport/Leistungssport)
   - CRUD-UI: Create/Update/Delete
   - Felder: Name, Kürzel (abbreviation), Beschreibung
   - State: trainingTypes, editingTT, newTT
   - Funktionen: createTrainingType, updateTrainingType, deleteTrainingType
   - Load-Logik: activeTab === 'training-types'

Tab-Reihenfolge:
- Fokusbereiche → Stilrichtungen → Trainingsstil → Hierarchie → Zielgruppen → Zuordnungen

Pattern: Konsistent mit anderen Katalog-Tabs
Version: AdminCatalogsPage 2.1.0
2026-04-23 12:17:31 +02:00
72c927e69e feat: Backend API für training_types + Frontend api.js
Some checks failed
Deploy Development / deploy (push) Successful in 37s
Test Suite / lint-backend (push) Successful in 0s
Test Suite / build-frontend (push) Successful in 6s
Test Suite / playwright-tests (push) Failing after 1m55s
Backend (catalogs.py):
- GET /api/training-types (Liste)
- POST /api/training-types (Erstellen)
- PUT /api/training-types/{id} (Bearbeiten)
- DELETE /api/training-types/{id} (Löschen mit CASCADE-Check)
- Cascade-Protection: Fehler wenn Übungen zugeordnet

Frontend (api.js):
- listTrainingTypes(filters)
- createTrainingType(data)
- updateTrainingType(id, data)
- deleteTrainingType(id)
- Export zum api-Objekt hinzugefügt

Pattern: Konsistent mit anderen Katalog-Endpoints
CRUD: Volle Admin-Verwaltung

Version: 0.4.0
2026-04-23 12:12:48 +02:00
62b5b4c2fd feat: Migration 010+011 - Stilrichtungen + Trainingsstil-Dimension
Some checks failed
Deploy Development / deploy (push) Successful in 35s
Test Suite / lint-backend (push) Successful in 0s
Test Suite / build-frontend (push) Successful in 5s
Test Suite / playwright-tests (push) Has been cancelled
Migration 010: Umbenennung (konsistente Terminologie)
- training_styles → style_directions
- exercise_styles → exercise_style_directions
- training_style_target_groups → style_direction_target_groups
- training_style_id → style_direction_id (in Junction-Tabellen)
- Idempotent mit IF EXISTS checks

Migration 011: Neue Dimension "Trainingsstil"
- Neue Tabelle training_types (Breitensport, Leistungssport, Wettkampf)
- Seed-Daten: 3 Standard-Trainingsstile
- Junction-Tabelle exercise_training_types (M:N)
- Indizes für Performance
- ON DELETE RESTRICT: Training Types können nicht gelöscht werden wenn zugeordnet

Architektur:
- Fokusbereich (Karate) → Stilrichtung (Shotokan) → Trainingsstil (Breitensport) → Zielgruppe (Kinder)
- Alle M:N für maximale Flexibilität
- KI-freundlich: Flache Dimensionen, einfache Queries

Version: 0.4.0 (BREAKING - nur DB-Migrationen, Backend/Frontend folgen)
2026-04-23 12:10:27 +02:00
cedb97eb9b docs: Phase D - Dokumentation Migration 009
Some checks failed
Deploy Development / deploy (push) Successful in 40s
Test Suite / lint-backend (push) Successful in 0s
Test Suite / build-frontend (push) Successful in 5s
Test Suite / playwright-tests (push) Failing after 2m4s
Dokumentations-Updates:

DATABASE_SCHEMA.md:
- Version 0.3.4
- Migration 009 zur Historie hinzugefügt
- target_groups Struktur korrigiert (M:N statt 1:N)
- training_style_target_groups Junction-Tabelle dokumentiert
- Backend API Endpoints dokumentiert (5 neue)
- Frontend Admin-UI Änderungen dokumentiert

DOMAIN_MODEL.md:
- Version 0.3.4
- Dimension 3 (Zielgruppe) komplett überarbeitet
- Hierarchischer Kontext aktualisiert (M:N Architektur)
- Admin-UI Darstellung erklärt (Tree-View + Matrix + Global)
- BREAKING CHANGE klar gekennzeichnet

Fachlich:
- Zielgruppen sind jetzt GLOBAL (nicht mehr hierarchisch)
- M:N Zuordnung über Junction-Tabelle
- Wiederverwendbarkeit: Eine Zielgruppe → mehrere Stile

Version: 0.3.4
2026-04-23 11:00:50 +02:00
f243b236be feat: Phase C - Admin-UI M:N Hierarchie & Matrix
Some checks failed
Deploy Development / deploy (push) Successful in 35s
Test Suite / lint-backend (push) Successful in 0s
Test Suite / build-frontend (push) Successful in 5s
Test Suite / playwright-tests (push) Failing after 2m1s
Frontend Admin-UI Refactoring (komplett):

1. Target Groups Tab überarbeitet (Global):
   - training_style_id Dropdown entfernt (Create + Edit)
   - Hierarchie-Anzeige entfernt (jetzt global unabhängig)
   - Nur noch Name, Beschreibung, Altersbereich

2. Neuer Tab 'Hierarchie' (Tree-View):
   - Fokusbereich → Trainingsstil → Zielgruppen
   - Expandable/Collapsible Nodes (▶/▼)
   - is_primary Kennzeichnung (★)
   - Hierarchische Darstellung mit Einrückung

3. Neuer Tab 'Zuordnungen' (M:N Matrix):
   - Checkbox-Matrix: Stile × Zielgruppen
   - Live-Toggle (Checkbox on/off)
   - Focus Area Kontext bei jedem Stil
   - is_primary Flag Anzeige (★)

UX:
- Tab-Reihenfolge: Fokusbereiche → Stile → Hierarchie → Zielgruppen → Zuordnungen
- Responsive Tabelle mit Overflow-Scroll
- Konsistente Card-basierte Layouts

Version: 0.3.4
Page: AdminCatalogsPage 2.0.0
2026-04-23 10:55:35 +02:00
1891a4ab88 feat: Phase B - Frontend API für M:N Zielgruppen
Some checks failed
Deploy Development / deploy (push) Successful in 33s
Test Suite / lint-backend (push) Successful in 0s
Test Suite / build-frontend (push) Successful in 5s
Test Suite / playwright-tests (push) Failing after 2m2s
Frontend API Layer:
- 5 neue api.js Funktionen für M:N Management
- listTrainingStyleTargetGroups(filters) - Liste mit Filtern
- createTrainingStyleTargetGroup(data) - Neue Zuordnung
- updateTrainingStyleTargetGroup(id, data) - is_primary ändern
- deleteTrainingStyleTargetGroup(id) - Zuordnung löschen
- getTrainingStylesHierarchy() - Hierarchische Struktur für Tree-View

Pattern: Konsistent mit bestehenden Catalog-Funktionen
Export: Alle Funktionen zum api-Objekt hinzugefügt

Version: 0.3.4 (Phase B)
2026-04-23 10:45:14 +02:00
1e5e18c0b3 feat: Migration 009 - Zielgruppen M:N Refactoring
Some checks failed
Deploy Development / deploy (push) Successful in 33s
Test Suite / lint-backend (push) Successful in 0s
Test Suite / build-frontend (push) Successful in 5s
Test Suite / playwright-tests (push) Failing after 1m57s
Backend Phase A (Database + API):
- Migration 009: target_groups.training_style_id entfernt
- Migration 009: Neue Junction-Tabelle training_style_target_groups
- Migration 009: Datenmigration alte → neue Struktur (idempotent)
- API: 5 neue Endpoints für M:N Management
  * GET /training-style-target-groups (mit Enrichment)
  * POST /training-style-target-groups (Upsert-Logik)
  * PUT /training-style-target-groups/{id} (is_primary)
  * DELETE /training-style-target-groups/{id}
  * GET /training-styles/hierarchy (für Tree-View)
- API: GET/POST/PUT /target-groups jetzt global (ohne training_style_id)
- API: DELETE /target-groups prüft beide Tabellen (CASCADE-Schutz)

Architecture:
- Eine Zielgruppe kann mehreren Stilen zugeordnet werden
- Basis für Admin Tree-View + M:N Matrix UI

Version: 0.3.4
Module: catalogs 1.3.0
2026-04-23 10:37:56 +02:00
2a5f06a8f5 feat: Refactor target groups to M:N relationship and update related endpoints
Some checks failed
Deploy Development / deploy (push) Successful in 36s
Test Suite / lint-backend (push) Successful in 0s
Test Suite / build-frontend (push) Successful in 5s
Test Suite / playwright-tests (push) Failing after 1m55s
2026-04-23 09:27:13 +02:00
2186bb3a69 fix: Admin-Navigation - Redirect /admin → /admin/catalogs
Some checks failed
Deploy Development / deploy (push) Successful in 34s
Test Suite / lint-backend (push) Successful in 0s
Test Suite / build-frontend (push) Successful in 5s
Test Suite / playwright-tests (push) Failing after 2m1s
Problem: Navigation-Link zeigte /admin, aber Route war /admin/catalogs
Folge: Klick auf 'Admin' führte zu 404 (Catch-all Redirect zu /)

Fix: Redirect-Route von /admin zu /admin/catalogs hinzugefügt

version: 0.3.3
2026-04-23 09:00:28 +02:00
278d719e84 feat: Zielgruppen-Verwaltung (Target Groups CRUD + Admin UI)
Some checks failed
Deploy Development / deploy (push) Successful in 32s
Test Suite / lint-backend (push) Successful in 0s
Test Suite / build-frontend (push) Successful in 5s
Test Suite / playwright-tests (push) Failing after 1m54s
Backend:
- GET /api/target-groups: Liste mit hierarchischem Kontext (focus_area → training_style → target_group)
- POST /api/target-groups: Create (admin only)
- PUT /api/target-groups/{id}: Update (admin only)
- DELETE /api/target-groups/{id}: Delete (superadmin only) mit CASCADE-Schutz
- Filter: by training_style_id, status

Frontend:
- api.js: listTargetGroups, createTargetGroup, updateTargetGroup, deleteTargetGroup
- AdminCatalogsPage: Neuer Tab "Zielgruppen" (6. Tab)
- Create-Form: training_style_id, name, description, min_age, max_age
- List-View: Hierarchie-Anzeige (Fokusbereich → Stil → Zielgruppe + Altersbereich)
- Inline-Editing mit Stil-Auswahl-Dropdown
- Delete mit Confirmation Dialog

Architektur:
- Hierarchische Beziehung: target_groups.training_style_id → training_styles → focus_areas
- CASCADE-Protection: DELETE verweigert wenn exercise_target_groups Einträge existieren
- Backend liefert enriched data mit training_style_name + focus_area_name

version: 0.3.2
modules: catalogs 1.2.0
pages: AdminCatalogsPage 1.1.0
2026-04-23 08:55:54 +02:00
d67f659e97 feat: Exercises-Router M:N Zuordnungen
Some checks failed
Deploy Development / deploy (push) Successful in 34s
Test Suite / lint-backend (push) Successful in 1s
Test Suite / build-frontend (push) Successful in 4s
Test Suite / playwright-tests (push) Failing after 1m57s
Backend API erweitert um M:N Katalog-Zuordnungen:
- GET /exercises/{id}: Liefert focus_areas[], training_styles[], target_groups[], age_groups_catalog[]
- POST /exercises: Akzeptiert focus_areas_multi[], training_styles_multi[], target_groups_multi[], age_groups_catalog[]
- PUT /exercises/{id}: DELETE+INSERT Pattern für M:N Updates (konsistent mit skills)

Rückwärtskompatibilität:
- Legacy FK-Felder (focus_area_id, training_style_id, training_character_id) bleiben erhalten
- Alte Aufrufe funktionieren unverändert
- Neue M:N Felder sind optional

version: 0.3.1
modules: exercises 0.4.0
2026-04-23 08:51:45 +02:00
c7444ecaec docs: mark migration 008 as deployed
Some checks failed
Deploy Development / deploy (push) Successful in 34s
Test Suite / lint-backend (push) Successful in 0s
Test Suite / build-frontend (push) Successful in 5s
Test Suite / playwright-tests (push) Failing after 1m54s
2026-04-23 08:48:54 +02:00
63b1c09975 feat: Migration 008 - M:N Exercise Relations + Hierarchical Catalogs
Some checks failed
Deploy Development / deploy (push) Successful in 34s
Test Suite / lint-backend (push) Successful in 0s
Test Suite / build-frontend (push) Successful in 5s
Test Suite / playwright-tests (push) Has been cancelled
BREAKING CHANGE: Datenmodell-Umstellung von 1:1 auf M:N Beziehungen

Migration 008:
- Zielgruppen-Tabelle (target_groups) mit training_style_id Hierarchie
- M:N Zuordnungstabellen: exercise_focus_areas, exercise_styles, exercise_target_groups
- Altersgruppen-Dimension (exercise_age_groups) mit CHECK constraint
- Hierarchische Struktur: training_styles.focus_area_id → focus_areas
- Daten-Migration: Bestehende 1:1 Beziehungen zu M:N mit is_primary=true
- Seed-Daten: Beispiel-Zielgruppen für Shotokan

Architektur:
- Smart Cascade-Logik (RESTRICT, Rerouting, Move) vorbereitet
- Legacy-Spalten (focus_area_id, training_style_id) bleiben zur Rückwärtskompatibilität
- Primary/Secondary Assignments via is_primary Flag

Dokumentation:
- .claude/docs/technical/DATABASE_SCHEMA.md (kontinuierlich gepflegt)
- .claude/docs/functional/DOMAIN_MODEL.md (fachliche Anforderungen)
- Migrations-Historie aktualisiert

version: 0.3.0 (backend + frontend)
modules: exercises 0.3.0, catalogs 1.1.0
DB_SCHEMA_VERSION: 20260423

Konzept: shinkan_anforderungsdokument_entwurf.md (§8.1, §8.3, §10.7)
2026-04-23 08:46:56 +02:00
d0e9b9b764 fix: Make migration 007 idempotent (IF NOT EXISTS + ON CONFLICT)
Some checks failed
Deploy Development / deploy (push) Successful in 35s
Test Suite / lint-backend (push) Successful in 0s
Test Suite / build-frontend (push) Successful in 5s
Test Suite / playwright-tests (push) Failing after 1m54s
CRITICAL FIX: Migration 007 failed beim Startup wegen existierendem Index

Problem:
- Migration 007 wurde teilweise angewendet (Spalten + Indexes erstellt)
- Bei erneutem Versuch: 'idx_skills_category already exists' → Abbruch
- Tabellen (training_styles, training_characters, etc.) nicht erstellt
- Katalog-Endpoints → 500 Error (UndefinedTable)

Lösung:
- Alle CREATE TABLE → CREATE TABLE IF NOT EXISTS
- Alle CREATE INDEX → CREATE INDEX IF NOT EXISTS
- ALTER TABLE → DO $$ BEGIN IF NOT EXISTS ... END $$
- Alle INSERT → ON CONFLICT (name) DO NOTHING

Migration kann jetzt beliebig oft ausgeführt werden ohne Fehler.
2026-04-23 08:10:44 +02:00
0c7caea847 version: Bump to 0.2.0 + Changelog (Admin-Kataloge)
Some checks failed
Deploy Development / deploy (push) Successful in 33s
Test Suite / lint-backend (push) Successful in 0s
Test Suite / build-frontend (push) Successful in 5s
Test Suite / playwright-tests (push) Failing after 1m56s
CRITICAL FIX: Versions-Bump nachgeholt (war Pflicht laut ARCHITECTURE.md §2.5)

Backend:
- APP_VERSION: 0.1.0 → 0.2.0
- BUILD_DATE: 2026-04-21 → 2026-04-23
- DB_SCHEMA_VERSION: 20260421 → 20260422 (Migration 007)
- MODULE_VERSIONS: catalogs 1.0.0 (neu), exercises 0.2.0

Frontend:
- version.js neu erstellt
- PAGE_VERSIONS: ExercisesPage 1.1.0, AdminCatalogsPage 1.0.0

Changelog:
- Admin-Kataloge Feature komplett dokumentiert
- Migration 007, Frontend-Integration, Formular-Standardisierung

Deployment sollte jetzt korrekte Version zeigen + Katalog-Endpoints funktionieren.
2026-04-23 08:05:11 +02:00
c7cda03201 feat: Admin-managed exercise catalogs + frontend integration
Some checks failed
Deploy Development / deploy (push) Successful in 41s
Test Suite / lint-backend (push) Successful in 0s
Test Suite / build-frontend (push) Successful in 6s
Test Suite / playwright-tests (push) Failing after 1m57s
Backend (already committed):
- Migration 007: focus_areas, training_styles, training_characters, skill_categories tables
- routers/catalogs.py: 20 CRUD endpoints for all catalogs
- routers/exercises.py: Updated to support new FK fields
- Trainer focus area assignment for role-based filtering

Frontend (new):
- AdminCatalogsPage: Comprehensive admin UI with 5 tabs
  - Focus Areas (with color + icon)
  - Training Styles (hierarchical with parent_style_id)
  - Training Characters
  - Skill Categories (hierarchical)
  - Trainer Assignments (trainer → focus area mapping)
- ExercisesPage: Updated to use catalog dropdowns
  - Focus area dropdown now loads from API
  - Added missing Training Style dropdown
  - Training character dropdown now loads from API
  - Uses IDs instead of hard-coded text values
- App.jsx: Added /admin/catalogs route
- api.js: Added all catalog endpoints

All form fields standardized: labels on top, full width, left-aligned
Ready for testing via /admin/catalogs
2026-04-23 07:52:03 +02:00
74a92439eb fix: Use Chromium instead of Chrome for Playwright tests
Some checks failed
Deploy Development / deploy (push) Successful in 36s
Test Suite / lint-backend (push) Successful in 0s
Test Suite / build-frontend (push) Successful in 5s
Test Suite / playwright-tests (push) Failing after 1m54s
Problem: Tests schlagen fehl mit 'chrome not found at /opt/google/chrome/chrome'

Root Cause: playwright.config.js hatte 'channel: chrome' konfiguriert,
was Google Chrome erwartet statt Playwright's eingebautes Chromium

Lösung: channel: 'chrome' entfernt → nutzt Standard-Chromium

Tests sollten jetzt durchlaufen!
2026-04-22 22:09:17 +02:00
43c6abce4a feat: Exercise Catalogs - Admin-verwaltbare Stammdaten (Backend)
Some checks failed
Deploy Development / deploy (push) Successful in 35s
Test Suite / lint-backend (push) Successful in 1s
Test Suite / build-frontend (push) Successful in 5s
Test Suite / playwright-tests (push) Failing after 26s
Problem: Hard-codierte Werte (Fokusbereich, Trainingscharakter) + fehlende
Dimensionen (Stil, Fähigkeiten-Matrix) + keine Rollen-basierte Sichtbarkeit

Lösung: Dynamische Kataloge mit Admin-CRUD

Migration 007_exercise_catalogs.sql:
- focus_areas (statt hard-coded 'karate', 'selbstverteidigung', 'gewaltschutz')
- training_styles (NEU: Shotokan, Goju-Ryu, Wado-Ryu, etc. mit Hierarchie)
- training_characters (statt hard-coded 'grundlage', 'aufbau', etc.)
- skill_categories (Matrix: Kategorien → Einzelfähigkeiten)
- trainer_focus_areas (Zuordnung: Trainer → Fokusbereiche)
- exercises erweitert: training_style_id, training_character_id, focus_area_id
- skills erweitert: category_id, parent_skill_id, level, sort_order
- Seed-Daten für alle Kataloge

Backend (routers/catalogs.py):
- CRUD für focus_areas (admin only)
- CRUD für training_styles (admin only, mit parent_style_id)
- CRUD für training_characters (admin only)
- CRUD für skill_categories (admin only, mit parent_category_id)
- CRUD für trainer_focus_areas (admin: assign, trainer: read own)
- Alle mit status-Filter (active/inactive)

Backend (routers/exercises.py):
- CREATE/UPDATE erweitert um training_style_id, training_character_id, focus_area_id
- Legacy-Felder (focus_area text, training_character text) bleiben parallel

Backend (main.py):
- catalogs Router registriert

Nächster Schritt: Frontend-UI (Admin-Kataloge + Exercise-Formular-Update)
2026-04-22 22:06:11 +02:00
32f716304e fix: Install Playwright with system dependencies
Some checks failed
Deploy Development / deploy (push) Successful in 36s
Test Suite / lint-backend (push) Successful in 0s
Test Suite / build-frontend (push) Successful in 5s
Test Suite / playwright-tests (push) Failing after 35s
Problem: Tests schlagen fehl mit 'Chromium distribution not found'

Lösung: npx playwright install --with-deps chromium
(installiert Chromium + alle benötigten System-Libraries)

Vorher: npx playwright install chromium (nur Browser, keine Deps)
Nachher: npx playwright install --with-deps chromium (Browser + Deps)
2026-04-22 17:14:48 +02:00
cbb783222c refactor: Standardisiere Formular-Layout (Label oben, volle Breite, linksbündig)
Some checks failed
Deploy Development / deploy (push) Successful in 36s
Test Suite / lint-backend (push) Successful in 0s
Test Suite / build-frontend (push) Successful in 5s
Test Suite / playwright-tests (push) Failing after 14s
CSS (frontend/src/app.css):
- .form-row: flex-direction column, volle Breite, margin-bottom 16px
- .form-label: display block, font-weight 600, linksbündig
- .form-input: width 100%, text-align left (statt right 90px), padding 10px 12px
- textarea.form-input: resize vertical, min-height 80px
- select.form-input: cursor pointer
- .form-row--inline: Neue Variante für Ausnahmen (kurze Werte + Einheit)

Dokumentation (.claude/rules/CODING_RULES.md):
- Neue Regel Frontend §6: Formular-Standard (VERBINDLICH ab 2026-04-22)
- Code-Beispiele für Standard-Layout (input, textarea, select)
- Klare Regeln: Label = <label>, Pflichtfelder mit *, volle Breite, linksbündig
- Inline-Variante nur für Ausnahmen (Zahlen mit Einheit)

WICHTIG: Bestehende Formulare (Exercises, Clubs, Skills, TrainingPlanning)
nutzen bereits größtenteils diese Struktur und profitieren automatisch
von den CSS-Änderungen.

Vorteile:
- Konsistente UX über alle Formulare
- Mobile-friendly (volle Breite, kein horizontal scrolling)
- Bessere Lesbarkeit (Label als Überschrift)
- Einfacher wartbar (ein Standard für alle)

Nächster Schritt: Bestehende Formulare testen, ggf. kleine Anpassungen
2026-04-22 17:11:40 +02:00
7f156ba085 feat: Training Planning (core feature) complete
Some checks failed
Deploy Development / deploy (push) Successful in 37s
Test Suite / lint-backend (push) Successful in 1s
Test Suite / build-frontend (push) Successful in 4s
Test Suite / playwright-tests (push) Failing after 14s
Backend:
- Created migration 006_training_planning.sql
  - training_units table (planned vs actual, status, notes)
  - training_unit_exercises M:N (order, duration, modifications)
- Created routers/training_planning.py with full CRUD
  - List with filters (group, date range, status)
  - Get detail with exercises
  - Create/Update/Delete with access control
  - Quick create endpoint (auto-fills from group defaults)
  - Permission: trainer for own groups, admin for all
- Registered training_planning router in main.py

Frontend:
- Complete TrainingPlanningPage with full planning workflow
  - Group selector + date range picker
  - List view with status badges (planned/completed/cancelled)
  - Create/Edit modal with exercise management
  - Drag to reorder exercises (▲▼)
  - Quick create button (one-click with group defaults)
  - Durchführung section (actual date/time, attendance, status)
  - Public notes + trainer-only notes
- Updated api.js with deleteTrainingUnit and quickCreateTrainingUnit
- Added /planning route to App.jsx
- Navigation already configured (Calendar icon)

This is the CORE feature - trainers can now plan and document training sessions.

Next: Admin routes, role system refinement, testing
2026-04-22 16:54:34 +02:00
505a8e5e38 feat: Skills & Methods catalog complete
Some checks failed
Deploy Development / deploy (push) Successful in 34s
Test Suite / lint-backend (push) Successful in 0s
Test Suite / build-frontend (push) Successful in 5s
Test Suite / playwright-tests (push) Failing after 14s
Backend:
- Created routers/skills.py with full CRUD
  - Skills: list (with category filter), get, create, update, delete
  - Methods: list (with category filter), get, create, update, delete
  - Default: only show active items
  - Read access: all authenticated users
  - Write access: admin only
- Registered skills router in main.py

Frontend:
- Complete SkillsPage with 2 tabs (Fähigkeiten, Trainingsmethoden)
- Browse by category with cards layout
- Admin CRUD forms (importance rating for skills, duration/group size for methods)
- Mobile-responsive grid layout
- Updated api.js with all skill/method functions
- Added /skills route to App.jsx

Migration already exists: 003_catalogs.sql (skills, training_methods + seed data)

Next: Training Planning (core feature)
2026-04-22 16:50:31 +02:00
8e027e02bb feat: Clubs & Organization Management complete
Some checks failed
Deploy Development / deploy (push) Successful in 35s
Test Suite / lint-backend (push) Successful in 0s
Test Suite / build-frontend (push) Successful in 5s
Test Suite / playwright-tests (push) Failing after 14s
Backend:
- Created routers/clubs.py with full CRUD
  - Clubs: list, get, create, update, delete (admin only)
  - Divisions: list, create, update, delete (admin only)
  - Training Groups: list, get, create, update, delete (admin/trainer)
- Registered clubs router in main.py
- Permission checks: admin for clubs/divisions, trainer for groups

Frontend:
- Complete ClubsPage with 3 tabs (Vereine, Sparten, Gruppen)
- Role-based UI (admin sees all actions, trainer can manage groups)
- Full CRUD forms with modals
- Mobile-responsive card layouts
- Updated api.js with all club/division/group functions

Migration already exists: 002_organization.sql (clubs, divisions, training_groups)

Next: Skills & Methods display (read-only)
2026-04-22 16:48:02 +02:00
8c7cf91cef feat: Exercise CRUD complete
Some checks failed
Deploy Development / deploy (push) Successful in 36s
Test Suite / lint-backend (push) Successful in 0s
Test Suite / build-frontend (push) Successful in 12s
Test Suite / playwright-tests (push) Failing after 14s
Backend:
- Registered exercises router in main.py
- Migration 005 already created (exercises, exercise_skills, exercise_variants, exercise_media)
- Full CRUD endpoints with visibility logic

Frontend:
- Complete ExercisesPage with list/create/edit/delete
- Filter controls (focus_area, visibility, status)
- Modal form with all fields
- Skills multi-select
- Mobile-responsive card layout

Next: Clubs Management
2026-04-22 16:44:32 +02:00
de53ba3f66 fix: Add lucide-react dependency for navigation icons
Some checks failed
Deploy Development / deploy (push) Successful in 36s
Test Suite / lint-backend (push) Successful in 0s
Test Suite / build-frontend (push) Successful in 6s
Test Suite / playwright-tests (push) Failing after 54s
CRITICAL FIX: Build was failing because lucide-react was not in package.json
- Added lucide-react ^0.344.0 to dependencies
- Required for appNav.js and DesktopSidebar.jsx icon imports
- Build should now succeed

Apologies for missing this in initial design foundation commit!
2026-04-22 16:40:05 +02:00
c44bbefc5e feat: Add comprehensive test suite with Playwright
Some checks failed
Deploy Development / deploy (push) Failing after 35s
Test Suite / lint-backend (push) Successful in 0s
Test Suite / build-frontend (push) Failing after 1m7s
Test Suite / playwright-tests (push) Has been skipped
Test Suite:
- playwright.config.js: Config for dev environment (http://192.168.2.49:3098)
- tests/dev-smoke-test.spec.js: 8 tests covering:
  * Login functionality
  * Dashboard loading
  * Navigation to Exercises/Clubs
  * Desktop-Sidebar visibility (≥1024px)
  * Bottom-Nav visibility (Mobile)
  * Session persistence after reload
  * Console error checking

Gitea CI/CD:
- .gitea/workflows/test.yml: Automated testing after deploy
  * Backend syntax check
  * Frontend build test
  * Playwright E2E tests
  * Screenshot upload on failure

Test Coverage:
- Auth flow (login, session persistence)
- Responsive navigation (mobile + desktop)
- Page navigation (dashboard, exercises, clubs)
- Error detection (console errors)

Next: Run tests locally, then implement Exercise CRUD
2026-04-22 16:33:03 +02:00
46a90ae910 feat: Complete design foundation with responsive navigation
Some checks failed
Deploy Development / deploy (push) Failing after 26s
Design System:
- app.css already exists with full design tokens, dark mode, responsive breakpoints
- CSS variables for colors, spacing, typography
- Mobile-first layout with safe-area support (iOS notch)

Navigation System:
- config/appNav.js: Single source of truth for navigation items
- Bottom-Nav for mobile (<1024px) with horizontal scrolling
- DesktopSidebar for desktop (≥1024px) with fixed left sidebar
- Role-based navigation (isAdmin adds Admin link)

App.jsx Restructure:
- Responsive layout: Bottom-Nav (mobile) + DesktopSidebar (desktop)
- Protected/Public routes with loading states
- Logout handler with confirmation

PWA Setup:
- viewport-fit=cover for notch support
- apple-mobile-web-app meta tags
- Icon links prepared (icons pending)

Architecture:
- Follows Mitai design patterns
- Responsive breakpoint at 1024px
- Single source of truth for navigation config

Next: Icons, Exercise CRUD, Clubs/Groups Management
2026-04-22 16:25:36 +02:00
edb33b8fc3 fix: Use api.js in AuthContext for session persistence
All checks were successful
Deploy Development / deploy (push) Successful in 43s
- AuthContext was using fetch() directly with relative URLs
- Relative URLs went to nginx port (3098) instead of backend (8098)
- Now uses api.getCurrentProfile() which has correct API_URL
- Session persistence should work after browser refresh
2026-04-22 15:56:20 +02:00
356ab18ec0 fix: Add /profiles/me endpoint for session persistence
All checks were successful
Deploy Development / deploy (push) Successful in 39s
- AuthContext checks /profiles/me on mount to restore session
- Without this endpoint, users had to re-login on every refresh
- Returns current user's profile based on auth token

Issue: Session persistence broken
2026-04-22 15:46:40 +02:00
b1142070e9 docs: Add comprehensive session handover document
All checks were successful
Deploy Development / deploy (push) Successful in 35s
2026-04-22 15:09:07 +02:00
08326bdcc6 fix: Remove Mitai-specific columns from session query
All checks were successful
Deploy Development / deploy (push) Successful in 33s
2026-04-22 06:56:57 +02:00
c4b1b54f61 feat: Add navigation and basic pages structure
All checks were successful
Deploy Development / deploy (push) Successful in 34s
2026-04-22 06:48:18 +02:00
3b2c3605fd Add Playwright tests for Shinkan login page
All checks were successful
Deploy Development / deploy (push) Successful in 47s
- Created test-login.js to automate testing of the Shinkan login page, including waiting for deployment, capturing page title, heading, and counting elements (buttons, forms, inputs).
- Implemented functionality to log button texts and input placeholders, and take a full-page screenshot.
- Created test-shinkan.js to streamline the login page testing process, removing the deployment wait and adding a preview of the page content.
2026-04-22 06:45:48 +02:00
33032ac6c2 fix: Change created to created_at in sessions INSERT
All checks were successful
Deploy Development / deploy (push) Successful in 32s
2026-04-21 21:18:09 +02:00
88677ea29f fix: Add missing auth columns to profiles table
All checks were successful
Deploy Development / deploy (push) Successful in 43s
2026-04-21 21:07:52 +02:00
9cd85266f6 fix: Remove duplicate /api from VITE_API_URL
All checks were successful
Deploy Development / deploy (push) Successful in 37s
2026-04-21 16:33:18 +02:00
e4d052f182 fix: Add nginx SPA routing config
All checks were successful
Deploy Development / deploy (push) Successful in 33s
2026-04-21 16:30:11 +02:00
b1c5999f6e fix: Use Pi IP instead of localhost
All checks were successful
Deploy Development / deploy (push) Successful in 32s
2026-04-21 16:24:43 +02:00
495cebd915 fix: Configure localhost URLs for dev environment
All checks were successful
Deploy Development / deploy (push) Successful in 32s
2026-04-21 16:17:40 +02:00
9feead99ac fix: Remove double prefix in router registration
All checks were successful
Deploy Development / deploy (push) Successful in 41s
2026-04-21 16:12:25 +02:00
da634d813c fix: Add ProfileCreate and ProfileUpdate models
All checks were successful
Deploy Development / deploy (push) Successful in 41s
2026-04-21 16:05:42 +02:00
e1397277a7 fix: Add missing password reset models to models.py
All checks were successful
Deploy Development / deploy (push) Successful in 41s
2026-04-21 16:04:22 +02:00
efc2a11a76 feat: Add Auth system with Login UI
All checks were successful
Deploy Development / deploy (push) Successful in 39s
Backend:
- Auth router (login, register, logout)
- Profiles router (get current profile)
- Registered in main.py

Frontend:
- LoginPage with login/register tabs
- Dashboard with welcome screen
- Simplified AuthContext for Shinkan
- Protected routes in App.jsx
- Public routes redirect when logged in

Ready for testing!

version: 0.1.0
2026-04-21 14:56:16 +02:00
fd5efa8662 feat: Add automatic migrations system
All checks were successful
Deploy Development / deploy (push) Successful in 36s
- New run_migrations.py script
- Runs all SQL files in migrations/ on startup
- Tracks executed migrations in schema_migrations table
- Retries database connection (30 attempts)
- Separate Shinkan DB (shinkan_dev / shinkan)

This ensures a clean separation from Mitai database.
2026-04-21 14:49:28 +02:00
91e665c960 fix: Use direct deployment instead of SSH action
All checks were successful
Deploy Development / deploy (push) Successful in 34s
- Runner runs on same server (192.168.2.49)
- No SSH secrets needed
- Same pattern as Mitai deployment
- Health check on port 8098 (dev) / 8003 (prod)
2026-04-21 14:41:29 +02:00
b2bc8590c4 feat: Complete MVP setup - Docker, Frontend, Migrations, CI/CD
Some checks failed
Deploy Development / deploy (push) Failing after 4s
Docker & Deployment:
- docker-compose.yml (Prod: Port 3003/8003)
- docker-compose.dev-env.yml (Dev: Port 3098/8098)
- Backend Dockerfile (Python 3.12-slim)
- Frontend Dockerfile (Node 20 + Nginx)
- Gitea Actions (deploy-dev.yml, deploy-prod.yml)

Frontend:
- React 18 + Vite setup
- package.json, vite.config.js, index.html
- App.jsx (minimal with version display)
- api.js (complete API client)
- app.css + AuthContext from Mitai
- main.jsx entry point

Backend Migrations:
- 001_auth_membership.sql (Auth + Features + Tier Limits)
- 002_organization.sql (Clubs, Divisions, Training Groups)
- 003_catalogs.sql (Skills + Methods with sample data)

Documentation:
- .claude/rules/ (ARCHITECTURE, CODING_RULES, etc.)
- SHINKAN_PROJECT_SETUP.md (technical setup guide)

Server:
- Directories created on Pi: /home/lars/docker/shinkan[-dev]
- Gitea Runner configured and running

Ready for first deployment to dev.shinkan.jinkendo.de

version: 0.1.0
date: 2026-04-21
2026-04-21 14:36:52 +02:00