cbcb6a2a34
feat: Phase 4 Batch 1 - enable enforcement for data entries
...
Deploy Development / deploy (push) Successful in 36s
Build Test / lint-backend (push) Successful in 0s
Build Test / build-frontend (push) Successful in 13s
- Weight, Circumference, Caliper now BLOCK on limit exceeded
- Raise HTTPException(403) with user-friendly message
- Show used/limit and suggest contacting admin
- Phase 2 → Phase 4 transition
Phase 4: Enforcement (Batch 1/3)
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-21 06:57:05 +01:00
ddcd2f4350
feat: v9c Phase 2 - Backend Non-Blocking Logging (12 Endpoints)
...
Deploy Development / deploy (push) Successful in 34s
Build Test / lint-backend (push) Successful in 1s
Build Test / build-frontend (push) Successful in 13s
PHASE 2: Backend Non-Blocking Logging - KOMPLETT
Instrumentierte Endpoints (12):
- Data: weight, circumference, caliper, nutrition, activity, photos (6)
- AI: insights/run/{slug}, insights/pipeline (2)
- Export: csv, json, zip (3)
- Import: zip (1)
Pattern implementiert:
- check_feature_access() VOR Operation (non-blocking)
- [FEATURE-LIMIT] Logging wenn Limit überschritten
- increment_feature_usage() NACH Operation
- Alte Permission-Checks bleiben aktiv
Features geprüft:
- weight_entries, circumference_entries, caliper_entries
- nutrition_entries, activity_entries, photos
- ai_calls, ai_pipeline
- data_export, data_import
Monitoring: 1-2 Wochen Log-Only-Phase
Logs zeigen: Wie oft würde blockiert werden?
Nächste Phase: Frontend Display (Usage-Counter)
Phase 1 (Cleanup) + Phase 2 (Logging) vollständig!
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-20 21:59:33 +01:00
b4a1856f79
refactor: modular backend architecture with 14 router modules
...
Deploy Development / deploy (push) Successful in 58s
Build Test / lint-backend (push) Successful in 0s
Build Test / build-frontend (push) Successful in 13s
Phase 2 Complete - Backend Refactoring:
- Extracted all endpoints to dedicated router modules
- main.py: 1878 → 75 lines (-96% reduction)
- Created modular structure for maintainability
Router Structure (60 endpoints total):
├── auth.py - 7 endpoints (login, logout, password reset)
├── profiles.py - 7 endpoints (CRUD + current user)
├── weight.py - 5 endpoints (tracking + stats)
├── circumference.py - 4 endpoints (body measurements)
├── caliper.py - 4 endpoints (skinfold tracking)
├── activity.py - 6 endpoints (workouts + Apple Health import)
├── nutrition.py - 4 endpoints (diet + FDDB import)
├── photos.py - 3 endpoints (progress photos)
├── insights.py - 8 endpoints (AI analysis + pipeline)
├── prompts.py - 2 endpoints (AI prompt management)
├── admin.py - 7 endpoints (user management)
├── stats.py - 1 endpoint (dashboard stats)
├── exportdata.py - 3 endpoints (CSV/JSON/ZIP export)
└── importdata.py - 1 endpoint (ZIP import)
Core modules maintained:
- db.py: PostgreSQL connection + helpers
- auth.py: Auth functions (hash, verify, sessions)
- models.py: 11 Pydantic models
Benefits:
- Self-contained modules with clear responsibilities
- Easier to navigate and modify specific features
- Improved code organization and readability
- 100% functional compatibility maintained
- All syntax checks passed
Updated CLAUDE.md with new architecture documentation.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-19 11:15:35 +01:00