Commit Graph

17 Commits

Author SHA1 Message Date
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
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
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
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
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
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
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
a426c03598 feat: Initial Shinkan setup
- Repository structure created
- Core backend files from Mitai (auth, db, db_init)
- Shinkan-specific: version.py, models.py, main.py
- Documentation: CLAUDE.md, README.md
- Environment: .env.example, .gitignore

version: 0.1.0
date: 2026-04-21
2026-04-21 14:26:12 +02:00