shinkan-jinkendo/docs/HANDOVER.md
Lars cb11e39201
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
feat: enhance exercise management and media handling
- Introduced new API endpoints for managing exercise media, including upload, update, delete, and reorder functionalities.
- Updated the exercise creation and update logic to ensure goal and execution fields are validated and normalized.
- Refactored frontend components to support the new exercise media features, including a dedicated import section for complete stack files.
- Removed the deprecated ExercisesPage component and replaced it with a more modular structure for exercise management.
- Incremented database schema version to 20260427028 and updated changelog to reflect these changes.
2026-04-27 14:27:25 +02:00

5.3 KiB
Raw Blame History

Shinkan Jinkendo Entwicklungsstand & Handover

Stand: 2026-04-27
App-Version: 0.7.6 (backend/version.py)
DB-Schema-Version: 20260427027 (Migration 027)

Diese Datei ist die Einstiegs-Doku für neue Chat-Sessions: Anforderungen im Detail stehen in .claude/docs/ (siehe unten); hier der implementierte Stand und nächste Baustellen.


1. Pflichtlektüre (Kontext & Anforderungen)

Thema Pfad
Projekt-Setup, Domain grob .claude/docs/working/SHINKAN_PROJECT_SETUP.md
Projekt-Status (Skills, Wiki, Stats) .claude/docs/PROJECT_STATUS.md
Übungen: API, DB, Architektur, Routing .claude/docs/technical/EXERCISES_API_SPEC.md, EXERCISES_DATABASE_FINAL.md, EXERCISES_ARCHITECTURE.md, EXERCISES_FRONTEND_ROUTING.md
Media / Upload .claude/docs/technical/MEDIA_UPLOAD_SPEC.md
MediaWiki-Import .claude/docs/technical/MEDIAWIKI_IMPORT_SPEC.md

2. Implementierter Stand: Fähigkeiten & Reifegradmodelle

2.1 Datenbank

  • maturity_models, model_levels, model_skills, model_skill_levels: Matrix-Inhalt pro Modell.
  • Kontext am Modell (Legacy, M:N): maturity_model_focus_areas, maturity_model_style_directions, maturity_model_target_groups (Migration 025).
  • Hierarchische Kontext-Zuordnung (Resolve): maturity_model_context_bindings mit optional style_direction_id, training_type_id (Migration 026, 027).
  • 027: u. a. Fokus + Trainingsstil ohne Stilrichtung (partielle Unique-Indizes).

2.2 Resolve-Logik (Backend)

  • GET /api/maturity-models/resolve: Bindings zum Fokus, die zur Anfrage passen; Merge nach Spezifität (weniger spezifisch zuerst); spezifischere Zeilen überschreiben Zelltexte.
  • Matching: Gesetzte Spalten einer Binding-Zeile müssen mit der Anfrage übereinstimmen; NULL in der Zeile = Wildcard (z. B. Fokus+Trainingsstil gilt für alle Stilrichtungen, aber nur für diesen Trainingsstil).
  • Legacy-Fallback: Nur wenn für den Fokus keine einzige Zeile in maturity_model_context_bindings existiert. Sonst bei fehlendem Treffer null (kein stilles Legacy mit falschem Trainingsstil).

2.3 Export / Import (einzelnes Modell & aufgelöst)

  • GET /api/maturity-models/{id}/export: shinkan.maturity_model.v1 inkl. context_bindings_for_model (IDs).
  • GET /api/maturity-models/export-resolved: shinkan.maturity_matrix_resolved.v1 (Query: focus_area_id, optional style_direction_id, training_type_id).
  • POST /api/maturity-models/import: create | replace, optional import_bindings (nur bei maturity_model.v1).

2.4 Komplett-Stack Test → Prod

  • GET /api/admin/matrix-stack/export: shinkan.matrix_stack.v1 Katalog (skill_main_categories, skill_categories, skills, skill_level_definitions) + alle Reifegradmodelle + Bindings mit Namen (Fokus/Stil/Trainingsstil).
  • POST /api/admin/matrix-stack/import: Upsert Katalog per Slug; Skills per Kategorie+Name; Modelle neu anlegen; Bindings per Katalognamen. Optional replace_all_maturity_models + confirm_replace_all: "DELETE_MATURITY_STACK" (nur Superadmin).
  • Router: backend/routers/matrix_stack_bundle.py, in main.py registriert.

2.5 Frontend (Admin)

  • frontend/src/pages/AdminMaturityModelsPage.jsx: Tabs u. a. Katalog, Modelle, Kontext-Zuordnung, Matrix-Ansicht und Export.
  • MaturityModelBindingsAdmin.jsx: Bindings CRUD, Erklärung Merge/Legacy.
  • MaturityMatrixToolsAdmin.jsx: Kontext auflösen, hierarchische Matrix-Ansicht, Export einzelnes Modell / aufgelöst, Einzelmodell-Import; Komplett-Stack mit eigenem Export-Button und eigenem Dateifeld für Stack-Import (POST /api/admin/matrix-stack/import).
  • frontend/src/utils/api.js: u. a. exportMatrixStackBundle, importMatrixStackBundle, Reifegrad-APIs.

3. Stand: Übungen (Lücke für nächste Session)

Ist (laut Projektdoku und aktuellem Produktziel):

  • Backend: Übungen-CRUD, M:N, Suche, Blöcke, Medien-Struktur u. a. sind in PROJECT_STATUS.md als umgesetzt geführt; viele Übungen stammen aus MediaWiki-Import (Wiki-Tracking-Tabellen).
  • Soll / Nutzerfeedback: In der Praxis fehlt oder ist unzureichend: stabile Liste, gerenderte Detailansicht, Bearbeiten/Anlegen, Medien zuweisen/Upload konkrete Fehler (404, leere Liste, falsche Route) sind vor Ort zu verifizieren.

Nächste Session sollte:

  1. Aktuelle Routen und Seiten prüfen (App.jsx, EXERCISES_FRONTEND_ROUTING.md).
  2. GET /api/exercises (Filter, Auth) und eine Beispiel-Übung gegen die Dev-DB testen.
  3. UI schrittweise: Liste → Detail → Formular → Medien (an Specs in .claude/docs/technical/ ausrichten).

4. Technische Referenz (kurz)

Bereich Einstieg
Backend API backend/main.py, backend/routers/maturity_models.py, matrix_stack_bundle.py, exercises.py, catalogs.py, skills.py
Migrationen backend/migrations/ (u. a. 024027 Reifegrad/Bindings)
Frontend API frontend/src/utils/api.js
Version / Changelog backend/version.py

5. Veraltete Hinweise

Die Datei .claude/docs/working/HANDOVER_NEXT_SESSION.md (2026-04-22) ist historisch; für den aktuellen Stand gilt docs/HANDOVER.md.


Ende Handover-Dokument.