2026-03-16 13:35:11 +01:00
|
|
|
|
# Mitai Jinkendo – Entwickler-Kontext für Claude Code
|
|
|
|
|
|
|
|
|
|
|
|
## Projekt-Übersicht
|
feat: v9c Phase 1 - Feature consolidation & cleanup migration
PHASE 1: Cleanup & Analyse
- Feature-Konsolidierung: export_csv/json/zip → data_export (1 Feature)
- Umbenennung: csv_import → data_import
- Auto-Migration bei Container-Start (apply_v9c_migration.py)
- Diagnose-Script (check_features.sql)
Lessons Learned angewendet:
- Ein Feature für Export, nicht drei
- Migration ist idempotent (kann mehrfach laufen)
- Zeigt BEFORE/AFTER State im Log
Finaler Feature-Katalog (10 statt 13):
- Data: weight, circumference, caliper, nutrition, activity, photos
- AI: ai_calls, ai_pipeline
- Export/Import: data_export, data_import
Tier Limits:
- FREE: 30 data entries, 0 AI/export/import
- BASIC: unlimited data, 3 AI/month, 5 export/month, 3 import/month
- PREMIUM/SELFHOSTED: unlimited
Migration läuft automatisch auf dev UND prod beim Container-Start.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-20 18:57:39 +01:00
|
|
|
|
**Mitai Jinkendo** (身体 Jinkendo) – selbst-gehostete PWA für Körper-Tracking mit KI-Auswertung.
|
|
|
|
|
|
Teil der **Jinkendo**-App-Familie (人拳道). Domains: jinkendo.de / .com / .life
|
2026-03-16 13:35:11 +01:00
|
|
|
|
|
|
|
|
|
|
## Tech-Stack
|
feat: v9c Phase 1 - Feature consolidation & cleanup migration
PHASE 1: Cleanup & Analyse
- Feature-Konsolidierung: export_csv/json/zip → data_export (1 Feature)
- Umbenennung: csv_import → data_import
- Auto-Migration bei Container-Start (apply_v9c_migration.py)
- Diagnose-Script (check_features.sql)
Lessons Learned angewendet:
- Ein Feature für Export, nicht drei
- Migration ist idempotent (kann mehrfach laufen)
- Zeigt BEFORE/AFTER State im Log
Finaler Feature-Katalog (10 statt 13):
- Data: weight, circumference, caliper, nutrition, activity, photos
- AI: ai_calls, ai_pipeline
- Export/Import: data_export, data_import
Tier Limits:
- FREE: 30 data entries, 0 AI/export/import
- BASIC: unlimited data, 3 AI/month, 5 export/month, 3 import/month
- PREMIUM/SELFHOSTED: unlimited
Migration läuft automatisch auf dev UND prod beim Container-Start.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-20 18:57:39 +01:00
|
|
|
|
| Komponente | Technologie |
|
|
|
|
|
|
|-----------|-------------|
|
|
|
|
|
|
| Frontend | React 18 + Vite + PWA (Node 20) |
|
|
|
|
|
|
| Backend | FastAPI Python 3.12 |
|
|
|
|
|
|
| Datenbank | PostgreSQL 16 Alpine |
|
|
|
|
|
|
| Container | Docker + Docker Compose |
|
|
|
|
|
|
| Auth | Token-basiert + bcrypt |
|
|
|
|
|
|
| KI | OpenRouter API (claude-sonnet-4) |
|
2026-03-16 13:35:11 +01:00
|
|
|
|
|
feat: v9c Phase 1 - Feature consolidation & cleanup migration
PHASE 1: Cleanup & Analyse
- Feature-Konsolidierung: export_csv/json/zip → data_export (1 Feature)
- Umbenennung: csv_import → data_import
- Auto-Migration bei Container-Start (apply_v9c_migration.py)
- Diagnose-Script (check_features.sql)
Lessons Learned angewendet:
- Ein Feature für Export, nicht drei
- Migration ist idempotent (kann mehrfach laufen)
- Zeigt BEFORE/AFTER State im Log
Finaler Feature-Katalog (10 statt 13):
- Data: weight, circumference, caliper, nutrition, activity, photos
- AI: ai_calls, ai_pipeline
- Export/Import: data_export, data_import
Tier Limits:
- FREE: 30 data entries, 0 AI/export/import
- BASIC: unlimited data, 3 AI/month, 5 export/month, 3 import/month
- PREMIUM/SELFHOSTED: unlimited
Migration läuft automatisch auf dev UND prod beim Container-Start.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-20 18:57:39 +01:00
|
|
|
|
**Ports:** Prod 3002/8002 · Dev 3099/8099 – nie ändern!
|
2026-03-16 13:35:11 +01:00
|
|
|
|
|
|
|
|
|
|
## Verzeichnisstruktur
|
|
|
|
|
|
```
|
feat: v9c Phase 1 - Feature consolidation & cleanup migration
PHASE 1: Cleanup & Analyse
- Feature-Konsolidierung: export_csv/json/zip → data_export (1 Feature)
- Umbenennung: csv_import → data_import
- Auto-Migration bei Container-Start (apply_v9c_migration.py)
- Diagnose-Script (check_features.sql)
Lessons Learned angewendet:
- Ein Feature für Export, nicht drei
- Migration ist idempotent (kann mehrfach laufen)
- Zeigt BEFORE/AFTER State im Log
Finaler Feature-Katalog (10 statt 13):
- Data: weight, circumference, caliper, nutrition, activity, photos
- AI: ai_calls, ai_pipeline
- Export/Import: data_export, data_import
Tier Limits:
- FREE: 30 data entries, 0 AI/export/import
- BASIC: unlimited data, 3 AI/month, 5 export/month, 3 import/month
- PREMIUM/SELFHOSTED: unlimited
Migration läuft automatisch auf dev UND prod beim Container-Start.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-20 18:57:39 +01:00
|
|
|
|
backend/
|
|
|
|
|
|
├── main.py # App-Setup + Router-Registration (~75 Zeilen)
|
|
|
|
|
|
├── db.py # PostgreSQL Connection Pool
|
2026-03-20 22:43:29 +01:00
|
|
|
|
├── auth.py # Hash, Verify, Sessions, Feature-Access-Control
|
feat: v9c Phase 1 - Feature consolidation & cleanup migration
PHASE 1: Cleanup & Analyse
- Feature-Konsolidierung: export_csv/json/zip → data_export (1 Feature)
- Umbenennung: csv_import → data_import
- Auto-Migration bei Container-Start (apply_v9c_migration.py)
- Diagnose-Script (check_features.sql)
Lessons Learned angewendet:
- Ein Feature für Export, nicht drei
- Migration ist idempotent (kann mehrfach laufen)
- Zeigt BEFORE/AFTER State im Log
Finaler Feature-Katalog (10 statt 13):
- Data: weight, circumference, caliper, nutrition, activity, photos
- AI: ai_calls, ai_pipeline
- Export/Import: data_export, data_import
Tier Limits:
- FREE: 30 data entries, 0 AI/export/import
- BASIC: unlimited data, 3 AI/month, 5 export/month, 3 import/month
- PREMIUM/SELFHOSTED: unlimited
Migration läuft automatisch auf dev UND prod beim Container-Start.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-20 18:57:39 +01:00
|
|
|
|
├── models.py # Pydantic Models
|
2026-03-20 22:43:29 +01:00
|
|
|
|
├── feature_logger.py # Strukturiertes JSON-Logging (Phase 2)
|
feat: v9c Phase 1 - Feature consolidation & cleanup migration
PHASE 1: Cleanup & Analyse
- Feature-Konsolidierung: export_csv/json/zip → data_export (1 Feature)
- Umbenennung: csv_import → data_import
- Auto-Migration bei Container-Start (apply_v9c_migration.py)
- Diagnose-Script (check_features.sql)
Lessons Learned angewendet:
- Ein Feature für Export, nicht drei
- Migration ist idempotent (kann mehrfach laufen)
- Zeigt BEFORE/AFTER State im Log
Finaler Feature-Katalog (10 statt 13):
- Data: weight, circumference, caliper, nutrition, activity, photos
- AI: ai_calls, ai_pipeline
- Export/Import: data_export, data_import
Tier Limits:
- FREE: 30 data entries, 0 AI/export/import
- BASIC: unlimited data, 3 AI/month, 5 export/month, 3 import/month
- PREMIUM/SELFHOSTED: unlimited
Migration läuft automatisch auf dev UND prod beim Container-Start.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-20 18:57:39 +01:00
|
|
|
|
└── routers/ # 14 Router-Module
|
|
|
|
|
|
auth · profiles · weight · circumference · caliper
|
|
|
|
|
|
activity · nutrition · photos · insights · prompts
|
|
|
|
|
|
admin · stats · exportdata · importdata
|
|
|
|
|
|
|
|
|
|
|
|
frontend/src/
|
|
|
|
|
|
├── App.jsx # Root, Auth-Gates, Navigation
|
|
|
|
|
|
├── app.css # CSS-Variablen + globale Styles
|
|
|
|
|
|
├── context/ # AuthContext · ProfileContext
|
|
|
|
|
|
├── pages/ # Alle Screens
|
|
|
|
|
|
└── utils/
|
|
|
|
|
|
api.js # ALLE API-Calls – Token automatisch injiziert
|
|
|
|
|
|
calc.js · interpret.js · Markdown.jsx · guideData.js
|
|
|
|
|
|
|
|
|
|
|
|
.claude/
|
|
|
|
|
|
├── settings.json
|
|
|
|
|
|
├── commands/ # /deploy /merge-to-prod /refactor /ui-responsive etc.
|
|
|
|
|
|
└── docs/
|
|
|
|
|
|
├── BACKLOG.md
|
|
|
|
|
|
├── functional/ # Fachliche Specs (TRAINING_TYPES, AI_PROMPTS, RESPONSIVE_UI)
|
|
|
|
|
|
└── technical/ # MEMBERSHIP_SYSTEM.md
|
|
|
|
|
|
```
|
|
|
|
|
|
|
2026-03-21 08:47:04 +01:00
|
|
|
|
## Aktuelle Version: v9c (komplett)
|
feat: v9c Phase 1 - Feature consolidation & cleanup migration
PHASE 1: Cleanup & Analyse
- Feature-Konsolidierung: export_csv/json/zip → data_export (1 Feature)
- Umbenennung: csv_import → data_import
- Auto-Migration bei Container-Start (apply_v9c_migration.py)
- Diagnose-Script (check_features.sql)
Lessons Learned angewendet:
- Ein Feature für Export, nicht drei
- Migration ist idempotent (kann mehrfach laufen)
- Zeigt BEFORE/AFTER State im Log
Finaler Feature-Katalog (10 statt 13):
- Data: weight, circumference, caliper, nutrition, activity, photos
- AI: ai_calls, ai_pipeline
- Export/Import: data_export, data_import
Tier Limits:
- FREE: 30 data entries, 0 AI/export/import
- BASIC: unlimited data, 3 AI/month, 5 export/month, 3 import/month
- PREMIUM/SELFHOSTED: unlimited
Migration läuft automatisch auf dev UND prod beim Container-Start.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-20 18:57:39 +01:00
|
|
|
|
|
|
|
|
|
|
### Implementiert ✅
|
|
|
|
|
|
- Login (E-Mail + bcrypt), Auth-Middleware alle Endpoints, Rate Limiting
|
|
|
|
|
|
- Gewicht · Umfänge · Caliper · Ernährung · Aktivität + CSV-Imports
|
|
|
|
|
|
- KI-Analyse: 6 Prompts + 3-stufige Pipeline
|
|
|
|
|
|
- Dashboard · Verlauf · Assistent-Modus · Fotos
|
|
|
|
|
|
- Admin-Panel · E-Mail (SMTP) · PWA
|
|
|
|
|
|
- PostgreSQL 16 · Modulare Router-Architektur
|
|
|
|
|
|
- Membership-System: Tiers · Coupons · Access-Grants · Admin-UI
|
|
|
|
|
|
- Export: CSV · JSON · ZIP
|
2026-03-21 07:44:51 +01:00
|
|
|
|
- **Feature-Enforcement (komplett):** Alle 11 Features mit Monitoring, UI-Badges + Blocking
|
2026-03-21 08:47:04 +01:00
|
|
|
|
- **Ernährungs-Modul (erweitert):**
|
|
|
|
|
|
- Manuelles Erfassungsformular mit Upsert-Logik (verhindert Duplikate)
|
|
|
|
|
|
- Import-Historie (CSV-Importe gruppiert nach Datum)
|
|
|
|
|
|
- Bearbeiten/Löschen von Einträgen (inline)
|
|
|
|
|
|
- Datumsfilter (7/30/90/365 Tage, Alle)
|
|
|
|
|
|
- Zwei-Ebenen-Layout: Eingabe (Einzelerfassung/Import) + Auswertung (Charts)
|
2026-03-20 22:43:29 +01:00
|
|
|
|
|
|
|
|
|
|
### Feature-Enforcement Status (4-Phasen-Modell)
|
|
|
|
|
|
- ✅ **Phase 1:** Cleanup (Feature-Konsolidierung, Migration)
|
2026-03-21 07:44:51 +01:00
|
|
|
|
- ✅ **Phase 2:** Non-blocking Monitoring (JSON-Logs, alle 11 Features)
|
|
|
|
|
|
- ✅ **Phase 3:** Frontend Display (Usage-Badges, Quota-Übersicht, Hover-Tooltips)
|
|
|
|
|
|
- ✅ **Phase 4:** Enforcement (HTTP 403 bei Limit-Überschreitung, alle Features)
|
|
|
|
|
|
|
|
|
|
|
|
**Abgedeckte Features:** weight_entries, circumference_entries, caliper_entries, activity_entries, nutrition_entries, photos, ai_calls, ai_pipeline, data_export, data_import
|
feat: v9c Phase 1 - Feature consolidation & cleanup migration
PHASE 1: Cleanup & Analyse
- Feature-Konsolidierung: export_csv/json/zip → data_export (1 Feature)
- Umbenennung: csv_import → data_import
- Auto-Migration bei Container-Start (apply_v9c_migration.py)
- Diagnose-Script (check_features.sql)
Lessons Learned angewendet:
- Ein Feature für Export, nicht drei
- Migration ist idempotent (kann mehrfach laufen)
- Zeigt BEFORE/AFTER State im Log
Finaler Feature-Katalog (10 statt 13):
- Data: weight, circumference, caliper, nutrition, activity, photos
- AI: ai_calls, ai_pipeline
- Export/Import: data_export, data_import
Tier Limits:
- FREE: 30 data entries, 0 AI/export/import
- BASIC: unlimited data, 3 AI/month, 5 export/month, 3 import/month
- PREMIUM/SELFHOSTED: unlimited
Migration läuft automatisch auf dev UND prod beim Container-Start.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-20 18:57:39 +01:00
|
|
|
|
|
2026-03-21 08:47:04 +01:00
|
|
|
|
### Bug-Fixes (v9c)
|
|
|
|
|
|
- ✅ **BUG-001:** TypeError in `/api/nutrition/weekly` (datetime.date vs string handling)
|
|
|
|
|
|
- ✅ **BUG-002:** Ernährungs-Daten Tab fehlte – importierte Einträge nicht sichtbar
|
|
|
|
|
|
|
|
|
|
|
|
### Offen v9d 🔲
|
feat: v9c Phase 1 - Feature consolidation & cleanup migration
PHASE 1: Cleanup & Analyse
- Feature-Konsolidierung: export_csv/json/zip → data_export (1 Feature)
- Umbenennung: csv_import → data_import
- Auto-Migration bei Container-Start (apply_v9c_migration.py)
- Diagnose-Script (check_features.sql)
Lessons Learned angewendet:
- Ein Feature für Export, nicht drei
- Migration ist idempotent (kann mehrfach laufen)
- Zeigt BEFORE/AFTER State im Log
Finaler Feature-Katalog (10 statt 13):
- Data: weight, circumference, caliper, nutrition, activity, photos
- AI: ai_calls, ai_pipeline
- Export/Import: data_export, data_import
Tier Limits:
- FREE: 30 data entries, 0 AI/export/import
- BASIC: unlimited data, 3 AI/month, 5 export/month, 3 import/month
- PREMIUM/SELFHOSTED: unlimited
Migration läuft automatisch auf dev UND prod beim Container-Start.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-20 18:57:39 +01:00
|
|
|
|
- Selbst-Registrierung + E-Mail-Verifizierung
|
|
|
|
|
|
- Trial-System UI
|
2026-03-21 08:47:04 +01:00
|
|
|
|
- Schlaf-Modul
|
|
|
|
|
|
- Trainingstypen + Herzfrequenz
|
feat: v9c Phase 1 - Feature consolidation & cleanup migration
PHASE 1: Cleanup & Analyse
- Feature-Konsolidierung: export_csv/json/zip → data_export (1 Feature)
- Umbenennung: csv_import → data_import
- Auto-Migration bei Container-Start (apply_v9c_migration.py)
- Diagnose-Script (check_features.sql)
Lessons Learned angewendet:
- Ein Feature für Export, nicht drei
- Migration ist idempotent (kann mehrfach laufen)
- Zeigt BEFORE/AFTER State im Log
Finaler Feature-Katalog (10 statt 13):
- Data: weight, circumference, caliper, nutrition, activity, photos
- AI: ai_calls, ai_pipeline
- Export/Import: data_export, data_import
Tier Limits:
- FREE: 30 data entries, 0 AI/export/import
- BASIC: unlimited data, 3 AI/month, 5 export/month, 3 import/month
- PREMIUM/SELFHOSTED: unlimited
Migration läuft automatisch auf dev UND prod beim Container-Start.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-20 18:57:39 +01:00
|
|
|
|
|
2026-03-21 07:44:51 +01:00
|
|
|
|
📚 Details: `.claude/docs/technical/MEMBERSHIP_SYSTEM.md` · `.claude/docs/architecture/FEATURE_ENFORCEMENT.md`
|
feat: v9c Phase 1 - Feature consolidation & cleanup migration
PHASE 1: Cleanup & Analyse
- Feature-Konsolidierung: export_csv/json/zip → data_export (1 Feature)
- Umbenennung: csv_import → data_import
- Auto-Migration bei Container-Start (apply_v9c_migration.py)
- Diagnose-Script (check_features.sql)
Lessons Learned angewendet:
- Ein Feature für Export, nicht drei
- Migration ist idempotent (kann mehrfach laufen)
- Zeigt BEFORE/AFTER State im Log
Finaler Feature-Katalog (10 statt 13):
- Data: weight, circumference, caliper, nutrition, activity, photos
- AI: ai_calls, ai_pipeline
- Export/Import: data_export, data_import
Tier Limits:
- FREE: 30 data entries, 0 AI/export/import
- BASIC: unlimited data, 3 AI/month, 5 export/month, 3 import/month
- PREMIUM/SELFHOSTED: unlimited
Migration läuft automatisch auf dev UND prod beim Container-Start.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-20 18:57:39 +01:00
|
|
|
|
|
|
|
|
|
|
## Feature-Roadmap
|
|
|
|
|
|
|
|
|
|
|
|
> Vollständiges Backlog: `.claude/docs/BACKLOG.md`
|
|
|
|
|
|
> Beim Implementieren: verlinkte Dok-Datei zuerst lesen!
|
|
|
|
|
|
|
|
|
|
|
|
| Version | Feature | Dokumentation |
|
|
|
|
|
|
|---------|---------|---------------|
|
|
|
|
|
|
| v9c | Membership (aktiv) | `technical/MEMBERSHIP_SYSTEM.md` ✅ |
|
|
|
|
|
|
| v9d | Schlaf-Modul | `functional/SLEEP_MODULE.md` (ausstehend) |
|
|
|
|
|
|
| v9d | Trainingstypen + HF | `functional/TRAINING_TYPES.md` ✅ |
|
|
|
|
|
|
| v9e | Ziele + Vitalwerte | `functional/GOALS_VITALS.md` (ausstehend) |
|
|
|
|
|
|
| v9f | KI-Prompt Flexibilisierung | `functional/AI_PROMPTS.md` ✅ |
|
|
|
|
|
|
| v9g | Meditation + Selbstwahrnehmung | `functional/MEDITATION.md` (ausstehend) |
|
|
|
|
|
|
| v9h | Connectoren + Stripe | ausstehend |
|
|
|
|
|
|
| — | Responsive UI | `functional/RESPONSIVE_UI.md` ✅ |
|
2026-03-19 12:24:31 +01:00
|
|
|
|
|
feat: v9c Phase 1 - Feature consolidation & cleanup migration
PHASE 1: Cleanup & Analyse
- Feature-Konsolidierung: export_csv/json/zip → data_export (1 Feature)
- Umbenennung: csv_import → data_import
- Auto-Migration bei Container-Start (apply_v9c_migration.py)
- Diagnose-Script (check_features.sql)
Lessons Learned angewendet:
- Ein Feature für Export, nicht drei
- Migration ist idempotent (kann mehrfach laufen)
- Zeigt BEFORE/AFTER State im Log
Finaler Feature-Katalog (10 statt 13):
- Data: weight, circumference, caliper, nutrition, activity, photos
- AI: ai_calls, ai_pipeline
- Export/Import: data_export, data_import
Tier Limits:
- FREE: 30 data entries, 0 AI/export/import
- BASIC: unlimited data, 3 AI/month, 5 export/month, 3 import/month
- PREMIUM/SELFHOSTED: unlimited
Migration läuft automatisch auf dev UND prod beim Container-Start.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-20 18:57:39 +01:00
|
|
|
|
## Deployment
|
2026-03-19 12:24:31 +01:00
|
|
|
|
|
2026-03-19 12:40:25 +01:00
|
|
|
|
```
|
feat: v9c Phase 1 - Feature consolidation & cleanup migration
PHASE 1: Cleanup & Analyse
- Feature-Konsolidierung: export_csv/json/zip → data_export (1 Feature)
- Umbenennung: csv_import → data_import
- Auto-Migration bei Container-Start (apply_v9c_migration.py)
- Diagnose-Script (check_features.sql)
Lessons Learned angewendet:
- Ein Feature für Export, nicht drei
- Migration ist idempotent (kann mehrfach laufen)
- Zeigt BEFORE/AFTER State im Log
Finaler Feature-Katalog (10 statt 13):
- Data: weight, circumference, caliper, nutrition, activity, photos
- AI: ai_calls, ai_pipeline
- Export/Import: data_export, data_import
Tier Limits:
- FREE: 30 data entries, 0 AI/export/import
- BASIC: unlimited data, 3 AI/month, 5 export/month, 3 import/month
- PREMIUM/SELFHOSTED: unlimited
Migration läuft automatisch auf dev UND prod beim Container-Start.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-20 18:57:39 +01:00
|
|
|
|
Internet → Fritz!Box (privat.stommer.com) → Synology NAS → Raspberry Pi 5 (192.168.2.49)
|
2026-03-19 12:40:25 +01:00
|
|
|
|
|
feat: v9c Phase 1 - Feature consolidation & cleanup migration
PHASE 1: Cleanup & Analyse
- Feature-Konsolidierung: export_csv/json/zip → data_export (1 Feature)
- Umbenennung: csv_import → data_import
- Auto-Migration bei Container-Start (apply_v9c_migration.py)
- Diagnose-Script (check_features.sql)
Lessons Learned angewendet:
- Ein Feature für Export, nicht drei
- Migration ist idempotent (kann mehrfach laufen)
- Zeigt BEFORE/AFTER State im Log
Finaler Feature-Katalog (10 statt 13):
- Data: weight, circumference, caliper, nutrition, activity, photos
- AI: ai_calls, ai_pipeline
- Export/Import: data_export, data_import
Tier Limits:
- FREE: 30 data entries, 0 AI/export/import
- BASIC: unlimited data, 3 AI/month, 5 export/month, 3 import/month
- PREMIUM/SELFHOSTED: unlimited
Migration läuft automatisch auf dev UND prod beim Container-Start.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-20 18:57:39 +01:00
|
|
|
|
Git Workflow:
|
|
|
|
|
|
develop → Auto-Deploy → dev.mitai.jinkendo.de (bodytrack-dev/, Port 3099/8099)
|
|
|
|
|
|
main → Auto-Deploy → mitai.jinkendo.de (bodytrack/, Port 3002/8002)
|
2026-03-19 12:40:25 +01:00
|
|
|
|
|
feat: v9c Phase 1 - Feature consolidation & cleanup migration
PHASE 1: Cleanup & Analyse
- Feature-Konsolidierung: export_csv/json/zip → data_export (1 Feature)
- Umbenennung: csv_import → data_import
- Auto-Migration bei Container-Start (apply_v9c_migration.py)
- Diagnose-Script (check_features.sql)
Lessons Learned angewendet:
- Ein Feature für Export, nicht drei
- Migration ist idempotent (kann mehrfach laufen)
- Zeigt BEFORE/AFTER State im Log
Finaler Feature-Katalog (10 statt 13):
- Data: weight, circumference, caliper, nutrition, activity, photos
- AI: ai_calls, ai_pipeline
- Export/Import: data_export, data_import
Tier Limits:
- FREE: 30 data entries, 0 AI/export/import
- BASIC: unlimited data, 3 AI/month, 5 export/month, 3 import/month
- PREMIUM/SELFHOSTED: unlimited
Migration läuft automatisch auf dev UND prod beim Container-Start.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-20 18:57:39 +01:00
|
|
|
|
Gitea: http://192.168.2.144:3000/Lars/mitai-jinkendo
|
|
|
|
|
|
Runner: Raspberry Pi (/home/lars/gitea-runner/)
|
2026-03-19 12:40:25 +01:00
|
|
|
|
|
feat: v9c Phase 1 - Feature consolidation & cleanup migration
PHASE 1: Cleanup & Analyse
- Feature-Konsolidierung: export_csv/json/zip → data_export (1 Feature)
- Umbenennung: csv_import → data_import
- Auto-Migration bei Container-Start (apply_v9c_migration.py)
- Diagnose-Script (check_features.sql)
Lessons Learned angewendet:
- Ein Feature für Export, nicht drei
- Migration ist idempotent (kann mehrfach laufen)
- Zeigt BEFORE/AFTER State im Log
Finaler Feature-Katalog (10 statt 13):
- Data: weight, circumference, caliper, nutrition, activity, photos
- AI: ai_calls, ai_pipeline
- Export/Import: data_export, data_import
Tier Limits:
- FREE: 30 data entries, 0 AI/export/import
- BASIC: unlimited data, 3 AI/month, 5 export/month, 3 import/month
- PREMIUM/SELFHOSTED: unlimited
Migration läuft automatisch auf dev UND prod beim Container-Start.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-20 18:57:39 +01:00
|
|
|
|
Manuell:
|
|
|
|
|
|
cd /home/lars/docker/bodytrack[-dev]
|
|
|
|
|
|
docker compose -f docker-compose[.dev-env].yml build --no-cache && up -d
|
2026-03-19 12:40:25 +01:00
|
|
|
|
```
|
|
|
|
|
|
|
feat: v9c Phase 1 - Feature consolidation & cleanup migration
PHASE 1: Cleanup & Analyse
- Feature-Konsolidierung: export_csv/json/zip → data_export (1 Feature)
- Umbenennung: csv_import → data_import
- Auto-Migration bei Container-Start (apply_v9c_migration.py)
- Diagnose-Script (check_features.sql)
Lessons Learned angewendet:
- Ein Feature für Export, nicht drei
- Migration ist idempotent (kann mehrfach laufen)
- Zeigt BEFORE/AFTER State im Log
Finaler Feature-Katalog (10 statt 13):
- Data: weight, circumference, caliper, nutrition, activity, photos
- AI: ai_calls, ai_pipeline
- Export/Import: data_export, data_import
Tier Limits:
- FREE: 30 data entries, 0 AI/export/import
- BASIC: unlimited data, 3 AI/month, 5 export/month, 3 import/month
- PREMIUM/SELFHOSTED: unlimited
Migration läuft automatisch auf dev UND prod beim Container-Start.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-20 18:57:39 +01:00
|
|
|
|
## Datenbank-Schema (PostgreSQL 16)
|
2026-03-19 12:24:31 +01:00
|
|
|
|
```
|
feat: v9c Phase 1 - Feature consolidation & cleanup migration
PHASE 1: Cleanup & Analyse
- Feature-Konsolidierung: export_csv/json/zip → data_export (1 Feature)
- Umbenennung: csv_import → data_import
- Auto-Migration bei Container-Start (apply_v9c_migration.py)
- Diagnose-Script (check_features.sql)
Lessons Learned angewendet:
- Ein Feature für Export, nicht drei
- Migration ist idempotent (kann mehrfach laufen)
- Zeigt BEFORE/AFTER State im Log
Finaler Feature-Katalog (10 statt 13):
- Data: weight, circumference, caliper, nutrition, activity, photos
- AI: ai_calls, ai_pipeline
- Export/Import: data_export, data_import
Tier Limits:
- FREE: 30 data entries, 0 AI/export/import
- BASIC: unlimited data, 3 AI/month, 5 export/month, 3 import/month
- PREMIUM/SELFHOSTED: unlimited
Migration läuft automatisch auf dev UND prod beim Container-Start.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-20 18:57:39 +01:00
|
|
|
|
profiles – Nutzer (role, pin_hash/bcrypt, email, tier)
|
|
|
|
|
|
sessions – Auth-Tokens
|
|
|
|
|
|
weight_log – Gewicht (profile_id, date, weight)
|
|
|
|
|
|
circumference_log – 8 Umfangspunkte
|
|
|
|
|
|
caliper_log – Hautfalten, 4 Methoden
|
|
|
|
|
|
nutrition_log – Kalorien + Makros
|
|
|
|
|
|
activity_log – Training
|
|
|
|
|
|
photos – Progress-Fotos
|
|
|
|
|
|
ai_insights – KI-Auswertungen (scope = prompt-slug)
|
|
|
|
|
|
ai_prompts – Konfigurierbare Prompts (11 Standard)
|
|
|
|
|
|
ai_usage – KI-Calls pro Tag pro Profil
|
2026-03-19 12:24:31 +01:00
|
|
|
|
|
feat: v9c Phase 1 - Feature consolidation & cleanup migration
PHASE 1: Cleanup & Analyse
- Feature-Konsolidierung: export_csv/json/zip → data_export (1 Feature)
- Umbenennung: csv_import → data_import
- Auto-Migration bei Container-Start (apply_v9c_migration.py)
- Diagnose-Script (check_features.sql)
Lessons Learned angewendet:
- Ein Feature für Export, nicht drei
- Migration ist idempotent (kann mehrfach laufen)
- Zeigt BEFORE/AFTER State im Log
Finaler Feature-Katalog (10 statt 13):
- Data: weight, circumference, caliper, nutrition, activity, photos
- AI: ai_calls, ai_pipeline
- Export/Import: data_export, data_import
Tier Limits:
- FREE: 30 data entries, 0 AI/export/import
- BASIC: unlimited data, 3 AI/month, 5 export/month, 3 import/month
- PREMIUM/SELFHOSTED: unlimited
Migration läuft automatisch auf dev UND prod beim Container-Start.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-20 18:57:39 +01:00
|
|
|
|
v9c neu (Membership):
|
|
|
|
|
|
subscriptions · coupons · coupon_redemptions · features
|
2026-03-20 22:43:29 +01:00
|
|
|
|
tier_limits · user_feature_restrictions · user_feature_usage
|
|
|
|
|
|
access_grants · user_activity_log
|
|
|
|
|
|
|
|
|
|
|
|
Feature-Logging (Phase 2):
|
|
|
|
|
|
/app/logs/feature-usage.log # JSON-Format, alle Feature-Zugriffe
|
2026-03-19 12:24:31 +01:00
|
|
|
|
|
feat: v9c Phase 1 - Feature consolidation & cleanup migration
PHASE 1: Cleanup & Analyse
- Feature-Konsolidierung: export_csv/json/zip → data_export (1 Feature)
- Umbenennung: csv_import → data_import
- Auto-Migration bei Container-Start (apply_v9c_migration.py)
- Diagnose-Script (check_features.sql)
Lessons Learned angewendet:
- Ein Feature für Export, nicht drei
- Migration ist idempotent (kann mehrfach laufen)
- Zeigt BEFORE/AFTER State im Log
Finaler Feature-Katalog (10 statt 13):
- Data: weight, circumference, caliper, nutrition, activity, photos
- AI: ai_calls, ai_pipeline
- Export/Import: data_export, data_import
Tier Limits:
- FREE: 30 data entries, 0 AI/export/import
- BASIC: unlimited data, 3 AI/month, 5 export/month, 3 import/month
- PREMIUM/SELFHOSTED: unlimited
Migration läuft automatisch auf dev UND prod beim Container-Start.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-20 18:57:39 +01:00
|
|
|
|
Schema-Datei: backend/schema.sql
|
2026-03-19 12:24:31 +01:00
|
|
|
|
```
|
|
|
|
|
|
|
feat: v9c Phase 1 - Feature consolidation & cleanup migration
PHASE 1: Cleanup & Analyse
- Feature-Konsolidierung: export_csv/json/zip → data_export (1 Feature)
- Umbenennung: csv_import → data_import
- Auto-Migration bei Container-Start (apply_v9c_migration.py)
- Diagnose-Script (check_features.sql)
Lessons Learned angewendet:
- Ein Feature für Export, nicht drei
- Migration ist idempotent (kann mehrfach laufen)
- Zeigt BEFORE/AFTER State im Log
Finaler Feature-Katalog (10 statt 13):
- Data: weight, circumference, caliper, nutrition, activity, photos
- AI: ai_calls, ai_pipeline
- Export/Import: data_export, data_import
Tier Limits:
- FREE: 30 data entries, 0 AI/export/import
- BASIC: unlimited data, 3 AI/month, 5 export/month, 3 import/month
- PREMIUM/SELFHOSTED: unlimited
Migration läuft automatisch auf dev UND prod beim Container-Start.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-20 18:57:39 +01:00
|
|
|
|
## API & Auth
|
2026-03-19 12:24:31 +01:00
|
|
|
|
```
|
feat: v9c Phase 1 - Feature consolidation & cleanup migration
PHASE 1: Cleanup & Analyse
- Feature-Konsolidierung: export_csv/json/zip → data_export (1 Feature)
- Umbenennung: csv_import → data_import
- Auto-Migration bei Container-Start (apply_v9c_migration.py)
- Diagnose-Script (check_features.sql)
Lessons Learned angewendet:
- Ein Feature für Export, nicht drei
- Migration ist idempotent (kann mehrfach laufen)
- Zeigt BEFORE/AFTER State im Log
Finaler Feature-Katalog (10 statt 13):
- Data: weight, circumference, caliper, nutrition, activity, photos
- AI: ai_calls, ai_pipeline
- Export/Import: data_export, data_import
Tier Limits:
- FREE: 30 data entries, 0 AI/export/import
- BASIC: unlimited data, 3 AI/month, 5 export/month, 3 import/month
- PREMIUM/SELFHOSTED: unlimited
Migration läuft automatisch auf dev UND prod beim Container-Start.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-20 18:57:39 +01:00
|
|
|
|
Alle Endpoints: /api/...
|
|
|
|
|
|
Auth-Header: X-Auth-Token: <token>
|
|
|
|
|
|
Fehler: {"detail": "Fehlermeldung"}
|
|
|
|
|
|
Rate Limit: HTTP 429
|
2026-03-19 12:24:31 +01:00
|
|
|
|
|
feat: v9c Phase 1 - Feature consolidation & cleanup migration
PHASE 1: Cleanup & Analyse
- Feature-Konsolidierung: export_csv/json/zip → data_export (1 Feature)
- Umbenennung: csv_import → data_import
- Auto-Migration bei Container-Start (apply_v9c_migration.py)
- Diagnose-Script (check_features.sql)
Lessons Learned angewendet:
- Ein Feature für Export, nicht drei
- Migration ist idempotent (kann mehrfach laufen)
- Zeigt BEFORE/AFTER State im Log
Finaler Feature-Katalog (10 statt 13):
- Data: weight, circumference, caliper, nutrition, activity, photos
- AI: ai_calls, ai_pipeline
- Export/Import: data_export, data_import
Tier Limits:
- FREE: 30 data entries, 0 AI/export/import
- BASIC: unlimited data, 3 AI/month, 5 export/month, 3 import/month
- PREMIUM/SELFHOSTED: unlimited
Migration läuft automatisch auf dev UND prod beim Container-Start.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-20 18:57:39 +01:00
|
|
|
|
Auth-Flow:
|
|
|
|
|
|
Login → E-Mail + Passwort → Token in localStorage
|
|
|
|
|
|
Token → X-Auth-Token Header → require_auth()
|
|
|
|
|
|
Profile-Id → immer aus Session, nie aus Header!
|
|
|
|
|
|
SHA256 → automatisch zu bcrypt migriert beim Login
|
2026-03-19 12:24:31 +01:00
|
|
|
|
```
|
|
|
|
|
|
|
2026-03-16 13:35:11 +01:00
|
|
|
|
## Umgebungsvariablen (.env)
|
|
|
|
|
|
```
|
feat: v9c Phase 1 - Feature consolidation & cleanup migration
PHASE 1: Cleanup & Analyse
- Feature-Konsolidierung: export_csv/json/zip → data_export (1 Feature)
- Umbenennung: csv_import → data_import
- Auto-Migration bei Container-Start (apply_v9c_migration.py)
- Diagnose-Script (check_features.sql)
Lessons Learned angewendet:
- Ein Feature für Export, nicht drei
- Migration ist idempotent (kann mehrfach laufen)
- Zeigt BEFORE/AFTER State im Log
Finaler Feature-Katalog (10 statt 13):
- Data: weight, circumference, caliper, nutrition, activity, photos
- AI: ai_calls, ai_pipeline
- Export/Import: data_export, data_import
Tier Limits:
- FREE: 30 data entries, 0 AI/export/import
- BASIC: unlimited data, 3 AI/month, 5 export/month, 3 import/month
- PREMIUM/SELFHOSTED: unlimited
Migration läuft automatisch auf dev UND prod beim Container-Start.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-20 18:57:39 +01:00
|
|
|
|
DB_HOST/PORT/NAME/USER/PASSWORD # PostgreSQL
|
|
|
|
|
|
OPENROUTER_API_KEY # KI
|
2026-03-16 13:35:11 +01:00
|
|
|
|
OPENROUTER_MODEL=anthropic/claude-sonnet-4
|
feat: v9c Phase 1 - Feature consolidation & cleanup migration
PHASE 1: Cleanup & Analyse
- Feature-Konsolidierung: export_csv/json/zip → data_export (1 Feature)
- Umbenennung: csv_import → data_import
- Auto-Migration bei Container-Start (apply_v9c_migration.py)
- Diagnose-Script (check_features.sql)
Lessons Learned angewendet:
- Ein Feature für Export, nicht drei
- Migration ist idempotent (kann mehrfach laufen)
- Zeigt BEFORE/AFTER State im Log
Finaler Feature-Katalog (10 statt 13):
- Data: weight, circumference, caliper, nutrition, activity, photos
- AI: ai_calls, ai_pipeline
- Export/Import: data_export, data_import
Tier Limits:
- FREE: 30 data entries, 0 AI/export/import
- BASIC: unlimited data, 3 AI/month, 5 export/month, 3 import/month
- PREMIUM/SELFHOSTED: unlimited
Migration läuft automatisch auf dev UND prod beim Container-Start.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-20 18:57:39 +01:00
|
|
|
|
SMTP_HOST/PORT/USER/PASS/FROM # E-Mail
|
2026-03-17 14:08:44 +01:00
|
|
|
|
APP_URL=https://mitai.jinkendo.de
|
|
|
|
|
|
ALLOWED_ORIGINS=https://mitai.jinkendo.de
|
2026-03-16 13:35:11 +01:00
|
|
|
|
PHOTOS_DIR=/app/photos
|
2026-03-18 06:13:58 +01:00
|
|
|
|
```
|
|
|
|
|
|
|
feat: v9c Phase 1 - Feature consolidation & cleanup migration
PHASE 1: Cleanup & Analyse
- Feature-Konsolidierung: export_csv/json/zip → data_export (1 Feature)
- Umbenennung: csv_import → data_import
- Auto-Migration bei Container-Start (apply_v9c_migration.py)
- Diagnose-Script (check_features.sql)
Lessons Learned angewendet:
- Ein Feature für Export, nicht drei
- Migration ist idempotent (kann mehrfach laufen)
- Zeigt BEFORE/AFTER State im Log
Finaler Feature-Katalog (10 statt 13):
- Data: weight, circumference, caliper, nutrition, activity, photos
- AI: ai_calls, ai_pipeline
- Export/Import: data_export, data_import
Tier Limits:
- FREE: 30 data entries, 0 AI/export/import
- BASIC: unlimited data, 3 AI/month, 5 export/month, 3 import/month
- PREMIUM/SELFHOSTED: unlimited
Migration läuft automatisch auf dev UND prod beim Container-Start.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-20 18:57:39 +01:00
|
|
|
|
## Kritische Regeln für Claude Code
|
2026-03-18 06:13:58 +01:00
|
|
|
|
|
feat: v9c Phase 1 - Feature consolidation & cleanup migration
PHASE 1: Cleanup & Analyse
- Feature-Konsolidierung: export_csv/json/zip → data_export (1 Feature)
- Umbenennung: csv_import → data_import
- Auto-Migration bei Container-Start (apply_v9c_migration.py)
- Diagnose-Script (check_features.sql)
Lessons Learned angewendet:
- Ein Feature für Export, nicht drei
- Migration ist idempotent (kann mehrfach laufen)
- Zeigt BEFORE/AFTER State im Log
Finaler Feature-Katalog (10 statt 13):
- Data: weight, circumference, caliper, nutrition, activity, photos
- AI: ai_calls, ai_pipeline
- Export/Import: data_export, data_import
Tier Limits:
- FREE: 30 data entries, 0 AI/export/import
- BASIC: unlimited data, 3 AI/month, 5 export/month, 3 import/month
- PREMIUM/SELFHOSTED: unlimited
Migration läuft automatisch auf dev UND prod beim Container-Start.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-20 18:57:39 +01:00
|
|
|
|
### Must-Do:
|
|
|
|
|
|
1. `api.js` für ALLE API-Calls nutzen – nie direktes `fetch()` ohne Token
|
|
|
|
|
|
2. `session: dict = Depends(require_auth)` als **separater** Parameter – nie in `Header()` einbetten
|
|
|
|
|
|
3. `bcrypt` für alle Passwort-Operationen
|
|
|
|
|
|
4. Neue DB-Spalten nur via Schema-Migration, nicht direkt
|
|
|
|
|
|
5. `npm install` (nicht npm ci) – kein package-lock.json
|
2026-03-18 06:13:58 +01:00
|
|
|
|
|
feat: v9c Phase 1 - Feature consolidation & cleanup migration
PHASE 1: Cleanup & Analyse
- Feature-Konsolidierung: export_csv/json/zip → data_export (1 Feature)
- Umbenennung: csv_import → data_import
- Auto-Migration bei Container-Start (apply_v9c_migration.py)
- Diagnose-Script (check_features.sql)
Lessons Learned angewendet:
- Ein Feature für Export, nicht drei
- Migration ist idempotent (kann mehrfach laufen)
- Zeigt BEFORE/AFTER State im Log
Finaler Feature-Katalog (10 statt 13):
- Data: weight, circumference, caliper, nutrition, activity, photos
- AI: ai_calls, ai_pipeline
- Export/Import: data_export, data_import
Tier Limits:
- FREE: 30 data entries, 0 AI/export/import
- BASIC: unlimited data, 3 AI/month, 5 export/month, 3 import/month
- PREMIUM/SELFHOSTED: unlimited
Migration läuft automatisch auf dev UND prod beim Container-Start.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-20 18:57:39 +01:00
|
|
|
|
### Bekannte Fallstricke:
|
2026-03-18 08:27:33 +01:00
|
|
|
|
```python
|
feat: v9c Phase 1 - Feature consolidation & cleanup migration
PHASE 1: Cleanup & Analyse
- Feature-Konsolidierung: export_csv/json/zip → data_export (1 Feature)
- Umbenennung: csv_import → data_import
- Auto-Migration bei Container-Start (apply_v9c_migration.py)
- Diagnose-Script (check_features.sql)
Lessons Learned angewendet:
- Ein Feature für Export, nicht drei
- Migration ist idempotent (kann mehrfach laufen)
- Zeigt BEFORE/AFTER State im Log
Finaler Feature-Katalog (10 statt 13):
- Data: weight, circumference, caliper, nutrition, activity, photos
- AI: ai_calls, ai_pipeline
- Export/Import: data_export, data_import
Tier Limits:
- FREE: 30 data entries, 0 AI/export/import
- BASIC: unlimited data, 3 AI/month, 5 export/month, 3 import/month
- PREMIUM/SELFHOSTED: unlimited
Migration läuft automatisch auf dev UND prod beim Container-Start.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-20 18:57:39 +01:00
|
|
|
|
# ❌ FALSCH – führt zu ungeschütztem Endpoint:
|
|
|
|
|
|
def endpoint(x: str = Header(default=None, session=Depends(require_auth))):
|
2026-03-18 08:27:33 +01:00
|
|
|
|
|
feat: v9c Phase 1 - Feature consolidation & cleanup migration
PHASE 1: Cleanup & Analyse
- Feature-Konsolidierung: export_csv/json/zip → data_export (1 Feature)
- Umbenennung: csv_import → data_import
- Auto-Migration bei Container-Start (apply_v9c_migration.py)
- Diagnose-Script (check_features.sql)
Lessons Learned angewendet:
- Ein Feature für Export, nicht drei
- Migration ist idempotent (kann mehrfach laufen)
- Zeigt BEFORE/AFTER State im Log
Finaler Feature-Katalog (10 statt 13):
- Data: weight, circumference, caliper, nutrition, activity, photos
- AI: ai_calls, ai_pipeline
- Export/Import: data_export, data_import
Tier Limits:
- FREE: 30 data entries, 0 AI/export/import
- BASIC: unlimited data, 3 AI/month, 5 export/month, 3 import/month
- PREMIUM/SELFHOSTED: unlimited
Migration läuft automatisch auf dev UND prod beim Container-Start.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-20 18:57:39 +01:00
|
|
|
|
# ✅ RICHTIG:
|
|
|
|
|
|
def endpoint(x: str = Header(default=None), session: dict = Depends(require_auth)):
|
2026-03-18 08:27:33 +01:00
|
|
|
|
```
|
|
|
|
|
|
|
feat: v9c Phase 1 - Feature consolidation & cleanup migration
PHASE 1: Cleanup & Analyse
- Feature-Konsolidierung: export_csv/json/zip → data_export (1 Feature)
- Umbenennung: csv_import → data_import
- Auto-Migration bei Container-Start (apply_v9c_migration.py)
- Diagnose-Script (check_features.sql)
Lessons Learned angewendet:
- Ein Feature für Export, nicht drei
- Migration ist idempotent (kann mehrfach laufen)
- Zeigt BEFORE/AFTER State im Log
Finaler Feature-Katalog (10 statt 13):
- Data: weight, circumference, caliper, nutrition, activity, photos
- AI: ai_calls, ai_pipeline
- Export/Import: data_export, data_import
Tier Limits:
- FREE: 30 data entries, 0 AI/export/import
- BASIC: unlimited data, 3 AI/month, 5 export/month, 3 import/month
- PREMIUM/SELFHOSTED: unlimited
Migration läuft automatisch auf dev UND prod beim Container-Start.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-20 18:57:39 +01:00
|
|
|
|
```javascript
|
|
|
|
|
|
// ❌ FALSCH – dayjs.week() existiert nicht ohne Plugin:
|
|
|
|
|
|
dayjs(date).week()
|
2026-03-18 21:39:14 +01:00
|
|
|
|
|
feat: v9c Phase 1 - Feature consolidation & cleanup migration
PHASE 1: Cleanup & Analyse
- Feature-Konsolidierung: export_csv/json/zip → data_export (1 Feature)
- Umbenennung: csv_import → data_import
- Auto-Migration bei Container-Start (apply_v9c_migration.py)
- Diagnose-Script (check_features.sql)
Lessons Learned angewendet:
- Ein Feature für Export, nicht drei
- Migration ist idempotent (kann mehrfach laufen)
- Zeigt BEFORE/AFTER State im Log
Finaler Feature-Katalog (10 statt 13):
- Data: weight, circumference, caliper, nutrition, activity, photos
- AI: ai_calls, ai_pipeline
- Export/Import: data_export, data_import
Tier Limits:
- FREE: 30 data entries, 0 AI/export/import
- BASIC: unlimited data, 3 AI/month, 5 export/month, 3 import/month
- PREMIUM/SELFHOSTED: unlimited
Migration läuft automatisch auf dev UND prod beim Container-Start.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-20 18:57:39 +01:00
|
|
|
|
// ✅ RICHTIG – native ISO-Wochenberechnung:
|
|
|
|
|
|
const w = (d => Math.ceil(((new Date(d.setDate(d.getDate()+4-(d.getDay()||7)))-
|
|
|
|
|
|
new Date(d.getFullYear(),0,1))/86400000+1)/7))(new Date(date))
|
2026-03-18 08:27:33 +01:00
|
|
|
|
```
|
2026-03-18 21:39:14 +01:00
|
|
|
|
|
|
|
|
|
|
```python
|
feat: v9c Phase 1 - Feature consolidation & cleanup migration
PHASE 1: Cleanup & Analyse
- Feature-Konsolidierung: export_csv/json/zip → data_export (1 Feature)
- Umbenennung: csv_import → data_import
- Auto-Migration bei Container-Start (apply_v9c_migration.py)
- Diagnose-Script (check_features.sql)
Lessons Learned angewendet:
- Ein Feature für Export, nicht drei
- Migration ist idempotent (kann mehrfach laufen)
- Zeigt BEFORE/AFTER State im Log
Finaler Feature-Katalog (10 statt 13):
- Data: weight, circumference, caliper, nutrition, activity, photos
- AI: ai_calls, ai_pipeline
- Export/Import: data_export, data_import
Tier Limits:
- FREE: 30 data entries, 0 AI/export/import
- BASIC: unlimited data, 3 AI/month, 5 export/month, 3 import/month
- PREMIUM/SELFHOSTED: unlimited
Migration läuft automatisch auf dev UND prod beim Container-Start.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-20 18:57:39 +01:00
|
|
|
|
# PostgreSQL Boolean (nicht SQLite 0/1):
|
|
|
|
|
|
WHERE active = true # ✅
|
|
|
|
|
|
WHERE active = 1 # ❌
|
2026-03-18 22:52:35 +01:00
|
|
|
|
```
|
|
|
|
|
|
|
feat: v9c Phase 1 - Feature consolidation & cleanup migration
PHASE 1: Cleanup & Analyse
- Feature-Konsolidierung: export_csv/json/zip → data_export (1 Feature)
- Umbenennung: csv_import → data_import
- Auto-Migration bei Container-Start (apply_v9c_migration.py)
- Diagnose-Script (check_features.sql)
Lessons Learned angewendet:
- Ein Feature für Export, nicht drei
- Migration ist idempotent (kann mehrfach laufen)
- Zeigt BEFORE/AFTER State im Log
Finaler Feature-Katalog (10 statt 13):
- Data: weight, circumference, caliper, nutrition, activity, photos
- AI: ai_calls, ai_pipeline
- Export/Import: data_export, data_import
Tier Limits:
- FREE: 30 data entries, 0 AI/export/import
- BASIC: unlimited data, 3 AI/month, 5 export/month, 3 import/month
- PREMIUM/SELFHOSTED: unlimited
Migration läuft automatisch auf dev UND prod beim Container-Start.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-20 18:57:39 +01:00
|
|
|
|
## Design-System (Kurzreferenz)
|
|
|
|
|
|
```css
|
|
|
|
|
|
/* Farben */
|
|
|
|
|
|
--accent: #1D9E75 --accent-dark: #085041 --danger: #D85A30
|
|
|
|
|
|
--bg · --surface · --surface2 · --border · --text1 · --text2 · --text3
|
2026-03-18 22:52:35 +01:00
|
|
|
|
|
feat: v9c Phase 1 - Feature consolidation & cleanup migration
PHASE 1: Cleanup & Analyse
- Feature-Konsolidierung: export_csv/json/zip → data_export (1 Feature)
- Umbenennung: csv_import → data_import
- Auto-Migration bei Container-Start (apply_v9c_migration.py)
- Diagnose-Script (check_features.sql)
Lessons Learned angewendet:
- Ein Feature für Export, nicht drei
- Migration ist idempotent (kann mehrfach laufen)
- Zeigt BEFORE/AFTER State im Log
Finaler Feature-Katalog (10 statt 13):
- Data: weight, circumference, caliper, nutrition, activity, photos
- AI: ai_calls, ai_pipeline
- Export/Import: data_export, data_import
Tier Limits:
- FREE: 30 data entries, 0 AI/export/import
- BASIC: unlimited data, 3 AI/month, 5 export/month, 3 import/month
- PREMIUM/SELFHOSTED: unlimited
Migration läuft automatisch auf dev UND prod beim Container-Start.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-20 18:57:39 +01:00
|
|
|
|
/* Klassen */
|
|
|
|
|
|
.card · .btn · .btn-primary · .btn-secondary · .btn-full
|
|
|
|
|
|
.form-input · .form-label · .form-row · .spinner
|
2026-03-18 22:52:35 +01:00
|
|
|
|
|
feat: v9c Phase 1 - Feature consolidation & cleanup migration
PHASE 1: Cleanup & Analyse
- Feature-Konsolidierung: export_csv/json/zip → data_export (1 Feature)
- Umbenennung: csv_import → data_import
- Auto-Migration bei Container-Start (apply_v9c_migration.py)
- Diagnose-Script (check_features.sql)
Lessons Learned angewendet:
- Ein Feature für Export, nicht drei
- Migration ist idempotent (kann mehrfach laufen)
- Zeigt BEFORE/AFTER State im Log
Finaler Feature-Katalog (10 statt 13):
- Data: weight, circumference, caliper, nutrition, activity, photos
- AI: ai_calls, ai_pipeline
- Export/Import: data_export, data_import
Tier Limits:
- FREE: 30 data entries, 0 AI/export/import
- BASIC: unlimited data, 3 AI/month, 5 export/month, 3 import/month
- PREMIUM/SELFHOSTED: unlimited
Migration läuft automatisch auf dev UND prod beim Container-Start.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-20 18:57:39 +01:00
|
|
|
|
/* Abstände */
|
|
|
|
|
|
Seiten-Padding: 16px · Card-Padding: 16-20px · Border-Radius: 12px/8px
|
|
|
|
|
|
Bottom-Padding Mobile: 80px (Navigation)
|
2026-03-18 22:52:35 +01:00
|
|
|
|
```
|
|
|
|
|
|
|
feat: v9c Phase 1 - Feature consolidation & cleanup migration
PHASE 1: Cleanup & Analyse
- Feature-Konsolidierung: export_csv/json/zip → data_export (1 Feature)
- Umbenennung: csv_import → data_import
- Auto-Migration bei Container-Start (apply_v9c_migration.py)
- Diagnose-Script (check_features.sql)
Lessons Learned angewendet:
- Ein Feature für Export, nicht drei
- Migration ist idempotent (kann mehrfach laufen)
- Zeigt BEFORE/AFTER State im Log
Finaler Feature-Katalog (10 statt 13):
- Data: weight, circumference, caliper, nutrition, activity, photos
- AI: ai_calls, ai_pipeline
- Export/Import: data_export, data_import
Tier Limits:
- FREE: 30 data entries, 0 AI/export/import
- BASIC: unlimited data, 3 AI/month, 5 export/month, 3 import/month
- PREMIUM/SELFHOSTED: unlimited
Migration läuft automatisch auf dev UND prod beim Container-Start.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-20 18:57:39 +01:00
|
|
|
|
> Vollständige CSS-Variablen und Komponenten-Muster: `frontend/src/app.css`
|
|
|
|
|
|
> Responsive Layout-Spec: `.claude/docs/functional/RESPONSIVE_UI.md`
|
2026-03-18 22:52:35 +01:00
|
|
|
|
|
feat: v9c Phase 1 - Feature consolidation & cleanup migration
PHASE 1: Cleanup & Analyse
- Feature-Konsolidierung: export_csv/json/zip → data_export (1 Feature)
- Umbenennung: csv_import → data_import
- Auto-Migration bei Container-Start (apply_v9c_migration.py)
- Diagnose-Script (check_features.sql)
Lessons Learned angewendet:
- Ein Feature für Export, nicht drei
- Migration ist idempotent (kann mehrfach laufen)
- Zeigt BEFORE/AFTER State im Log
Finaler Feature-Katalog (10 statt 13):
- Data: weight, circumference, caliper, nutrition, activity, photos
- AI: ai_calls, ai_pipeline
- Export/Import: data_export, data_import
Tier Limits:
- FREE: 30 data entries, 0 AI/export/import
- BASIC: unlimited data, 3 AI/month, 5 export/month, 3 import/month
- PREMIUM/SELFHOSTED: unlimited
Migration läuft automatisch auf dev UND prod beim Container-Start.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-20 18:57:39 +01:00
|
|
|
|
## Dokumentations-Referenzen
|
2026-03-18 22:52:35 +01:00
|
|
|
|
|
feat: v9c Phase 1 - Feature consolidation & cleanup migration
PHASE 1: Cleanup & Analyse
- Feature-Konsolidierung: export_csv/json/zip → data_export (1 Feature)
- Umbenennung: csv_import → data_import
- Auto-Migration bei Container-Start (apply_v9c_migration.py)
- Diagnose-Script (check_features.sql)
Lessons Learned angewendet:
- Ein Feature für Export, nicht drei
- Migration ist idempotent (kann mehrfach laufen)
- Zeigt BEFORE/AFTER State im Log
Finaler Feature-Katalog (10 statt 13):
- Data: weight, circumference, caliper, nutrition, activity, photos
- AI: ai_calls, ai_pipeline
- Export/Import: data_export, data_import
Tier Limits:
- FREE: 30 data entries, 0 AI/export/import
- BASIC: unlimited data, 3 AI/month, 5 export/month, 3 import/month
- PREMIUM/SELFHOSTED: unlimited
Migration läuft automatisch auf dev UND prod beim Container-Start.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-20 18:57:39 +01:00
|
|
|
|
> **Für Claude Code:** Beim Arbeiten an einem Thema die entsprechende Datei lesen:
|
2026-03-18 22:52:35 +01:00
|
|
|
|
|
feat: v9c Phase 1 - Feature consolidation & cleanup migration
PHASE 1: Cleanup & Analyse
- Feature-Konsolidierung: export_csv/json/zip → data_export (1 Feature)
- Umbenennung: csv_import → data_import
- Auto-Migration bei Container-Start (apply_v9c_migration.py)
- Diagnose-Script (check_features.sql)
Lessons Learned angewendet:
- Ein Feature für Export, nicht drei
- Migration ist idempotent (kann mehrfach laufen)
- Zeigt BEFORE/AFTER State im Log
Finaler Feature-Katalog (10 statt 13):
- Data: weight, circumference, caliper, nutrition, activity, photos
- AI: ai_calls, ai_pipeline
- Export/Import: data_export, data_import
Tier Limits:
- FREE: 30 data entries, 0 AI/export/import
- BASIC: unlimited data, 3 AI/month, 5 export/month, 3 import/month
- PREMIUM/SELFHOSTED: unlimited
Migration läuft automatisch auf dev UND prod beim Container-Start.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-20 18:57:39 +01:00
|
|
|
|
| Thema | Datei |
|
|
|
|
|
|
|-------|-------|
|
|
|
|
|
|
| Backend-Architektur, Router, DB-Zugriff | `.claude/docs/architecture/BACKEND.md` |
|
|
|
|
|
|
| Frontend-Architektur, api.js, Komponenten | `.claude/docs/architecture/FRONTEND.md` |
|
2026-03-21 07:44:51 +01:00
|
|
|
|
| **Feature-Enforcement (neue Features hinzufügen)** | `.claude/docs/architecture/FEATURE_ENFORCEMENT.md` |
|
feat: v9c Phase 1 - Feature consolidation & cleanup migration
PHASE 1: Cleanup & Analyse
- Feature-Konsolidierung: export_csv/json/zip → data_export (1 Feature)
- Umbenennung: csv_import → data_import
- Auto-Migration bei Container-Start (apply_v9c_migration.py)
- Diagnose-Script (check_features.sql)
Lessons Learned angewendet:
- Ein Feature für Export, nicht drei
- Migration ist idempotent (kann mehrfach laufen)
- Zeigt BEFORE/AFTER State im Log
Finaler Feature-Katalog (10 statt 13):
- Data: weight, circumference, caliper, nutrition, activity, photos
- AI: ai_calls, ai_pipeline
- Export/Import: data_export, data_import
Tier Limits:
- FREE: 30 data entries, 0 AI/export/import
- BASIC: unlimited data, 3 AI/month, 5 export/month, 3 import/month
- PREMIUM/SELFHOSTED: unlimited
Migration läuft automatisch auf dev UND prod beim Container-Start.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-20 18:57:39 +01:00
|
|
|
|
| Coding Rules (Pflichtregeln) | `.claude/docs/rules/CODING_RULES.md` |
|
|
|
|
|
|
| Lessons Learned (Fehler vermeiden) | `.claude/docs/rules/LESSONS_LEARNED.md` |
|
|
|
|
|
|
| Feature Backlog (Übersicht) | `.claude/docs/BACKLOG.md` |
|
2026-03-21 07:55:04 +01:00
|
|
|
|
| **Pending Features (noch nicht enforced)** | `.claude/docs/PENDING_FEATURES.md` |
|
|
|
|
|
|
| **Known Issues (Bugs & Tech Debt)** | `.claude/docs/KNOWN_ISSUES.md` |
|
feat: v9c Phase 1 - Feature consolidation & cleanup migration
PHASE 1: Cleanup & Analyse
- Feature-Konsolidierung: export_csv/json/zip → data_export (1 Feature)
- Umbenennung: csv_import → data_import
- Auto-Migration bei Container-Start (apply_v9c_migration.py)
- Diagnose-Script (check_features.sql)
Lessons Learned angewendet:
- Ein Feature für Export, nicht drei
- Migration ist idempotent (kann mehrfach laufen)
- Zeigt BEFORE/AFTER State im Log
Finaler Feature-Katalog (10 statt 13):
- Data: weight, circumference, caliper, nutrition, activity, photos
- AI: ai_calls, ai_pipeline
- Export/Import: data_export, data_import
Tier Limits:
- FREE: 30 data entries, 0 AI/export/import
- BASIC: unlimited data, 3 AI/month, 5 export/month, 3 import/month
- PREMIUM/SELFHOSTED: unlimited
Migration läuft automatisch auf dev UND prod beim Container-Start.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-20 18:57:39 +01:00
|
|
|
|
| Membership-System (v9c, technisch) | `.claude/docs/technical/MEMBERSHIP_SYSTEM.md` |
|
|
|
|
|
|
| Trainingstypen + HF (v9d, fachlich) | `.claude/docs/functional/TRAINING_TYPES.md` |
|
|
|
|
|
|
| KI-Prompt Flexibilisierung (v9f, fachlich) | `.claude/docs/functional/AI_PROMPTS.md` |
|
|
|
|
|
|
| Responsive UI (fachlich) | `.claude/docs/functional/RESPONSIVE_UI.md` |
|
2026-03-18 22:52:35 +01:00
|
|
|
|
|
feat: v9c Phase 1 - Feature consolidation & cleanup migration
PHASE 1: Cleanup & Analyse
- Feature-Konsolidierung: export_csv/json/zip → data_export (1 Feature)
- Umbenennung: csv_import → data_import
- Auto-Migration bei Container-Start (apply_v9c_migration.py)
- Diagnose-Script (check_features.sql)
Lessons Learned angewendet:
- Ein Feature für Export, nicht drei
- Migration ist idempotent (kann mehrfach laufen)
- Zeigt BEFORE/AFTER State im Log
Finaler Feature-Katalog (10 statt 13):
- Data: weight, circumference, caliper, nutrition, activity, photos
- AI: ai_calls, ai_pipeline
- Export/Import: data_export, data_import
Tier Limits:
- FREE: 30 data entries, 0 AI/export/import
- BASIC: unlimited data, 3 AI/month, 5 export/month, 3 import/month
- PREMIUM/SELFHOSTED: unlimited
Migration läuft automatisch auf dev UND prod beim Container-Start.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-20 18:57:39 +01:00
|
|
|
|
## Jinkendo App-Familie
|
2026-03-18 22:52:35 +01:00
|
|
|
|
```
|
feat: v9c Phase 1 - Feature consolidation & cleanup migration
PHASE 1: Cleanup & Analyse
- Feature-Konsolidierung: export_csv/json/zip → data_export (1 Feature)
- Umbenennung: csv_import → data_import
- Auto-Migration bei Container-Start (apply_v9c_migration.py)
- Diagnose-Script (check_features.sql)
Lessons Learned angewendet:
- Ein Feature für Export, nicht drei
- Migration ist idempotent (kann mehrfach laufen)
- Zeigt BEFORE/AFTER State im Log
Finaler Feature-Katalog (10 statt 13):
- Data: weight, circumference, caliper, nutrition, activity, photos
- AI: ai_calls, ai_pipeline
- Export/Import: data_export, data_import
Tier Limits:
- FREE: 30 data entries, 0 AI/export/import
- BASIC: unlimited data, 3 AI/month, 5 export/month, 3 import/month
- PREMIUM/SELFHOSTED: unlimited
Migration läuft automatisch auf dev UND prod beim Container-Start.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-20 18:57:39 +01:00
|
|
|
|
mitai.jinkendo.de → Körper-Tracker (diese App)
|
|
|
|
|
|
miken.jinkendo.de → Meditation (眉間)
|
|
|
|
|
|
ikigai.jinkendo.de → Lebenssinn (生き甲斐)
|
|
|
|
|
|
shinkan.jinkendo.de → Kampfsport (真観)
|
2026-03-18 22:52:35 +01:00
|
|
|
|
```
|