ef8008a75d
docs: update CLAUDE.md and add comprehensive membership system documentation
...
Deploy Development / deploy (push) Successful in 33s
Build Test / lint-backend (push) Successful in 0s
Build Test / build-frontend (push) Successful in 12s
Updates:
- CLAUDE.md: Reflect current v9c-dev status (enforcement disabled, history working)
- CLAUDE.md: Document simple AI limit system currently active
- CLAUDE.md: Update implementation status (admin UI complete, enforcement rolled back)
New Documentation:
- docs/MEMBERSHIP_SYSTEM.md: Complete v9c architecture documentation
- Design decisions and rationale
- Complete database schema (11 tables)
- Backend API overview (7 routers, 30+ endpoints)
- Frontend components (6 admin pages)
- Feature enforcement rollback analysis
- Lessons learned and next steps
- Testing strategy
- Deployment notes
- Troubleshooting guide
The new doc provides complete reference for:
- Feature-Registry-Pattern implementation
- Tier system architecture
- Coupon system (3 types with stacking logic)
- User-Override system
- Access-Grant mechanics
- What went wrong with enforcement attempt
- Roadmap for v9d/v9e
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-20 15:44:29 +01:00
3745ebd6cd
feat: implement v9c feature enforcement system
...
Deploy Development / deploy (push) Successful in 34s
Build Test / lint-backend (push) Successful in 0s
Build Test / build-frontend (push) Successful in 12s
Backend:
- Add feature access checks to insights, export, import endpoints
- Enforce ai_calls, ai_pipeline, data_export, csv_import limits
- Return HTTP 403 (disabled) or 429 (limit exceeded)
Frontend:
- Create useFeatureAccess hook for feature checking
- Create FeatureGate/FeatureBadge components
- Gate KI-Analysen in Analysis page
- Gate Export/Import in Settings page
- Show usage counters (e.g. "3/10")
Docs:
- Update CLAUDE.md with implementation status
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-20 12:43:41 +01:00
0210844522
docs: CRITICAL - document missing feature enforcement
...
Deploy Development / deploy (push) Successful in 52s
Build Test / lint-backend (push) Successful in 0s
Build Test / build-frontend (push) Successful in 12s
⚠️ MAJOR GAP IDENTIFIED: Feature limits don't work!
- Admin UI exists to configure limits
- But actual enforcement (check_feature_access) is NOT called in endpoints
- Users can exceed limits, use disabled features
Backend TODO (CRITICAL):
- Add feature checks to insights.py (AI analysis)
- Add feature checks to exportdata.py, importdata.py
- Add feature checks to nutrition.py, activity.py (imports)
- Add feature checks to photos.py, data entry endpoints
Frontend TODO (UX):
- Implement useFeatureAccess() hook
- Create <FeatureGate> component
- Hide disabled features
- Show limit counters & upgrade prompts
Estimated work: 2-3 hours
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-20 12:25:31 +01:00
5da18de708
docs: update CLAUDE.md - v9c Phase 3 status and lessons learned
...
Deploy Development / deploy (push) Successful in 54s
Build Test / lint-backend (push) Successful in 1s
Build Test / build-frontend (push) Successful in 12s
- Mark Phase 3 as "MOSTLY DONE" (core features complete)
- Document all implemented admin/user pages
- Add AdminUserRestrictionsPage solution to "Bekannte Probleme"
- Detail effective value system, auto-remove redundant overrides
- List remaining v9c tasks: self-registration, trial UI, app settings
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-20 12:14:45 +01:00
91c8a5332f
docs: update v9c status and document known issue
...
Deploy Development / deploy (push) Successful in 55s
Build Test / lint-backend (push) Successful in 0s
Build Test / build-frontend (push) Successful in 13s
Phase 2 Backend complete:
- ✅ 11 new tables (Feature-Registry Pattern)
- ✅ Feature-access middleware
- ✅ 7 new routers, 30+ endpoints
- ✅ Tested on dev, all endpoints functional
Known issue documented:
- Admin user creation missing email field (workaround available)
Phase 3 (Frontend UI) remains TODO.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-19 14:57:57 +01:00
26f8bcf86d
docs: add Feature-Registry Pattern architecture for v9c
...
Deploy Development / deploy (push) Successful in 54s
Build Test / lint-backend (push) Successful in 0s
Build Test / build-frontend (push) Successful in 12s
Replaced hardcoded tier limits with flexible Feature-Registry Pattern:
- features table: All limitable features (weight, AI, photos, export, etc.)
- tier_limits: Tier x Feature matrix (admin-configurable)
- user_feature_restrictions: Individual user overrides
- user_feature_usage: Usage tracking with configurable reset periods
Key capabilities:
- Add new limitable features without schema changes
- Admin UI for matrix-based limit configuration
- User-level overrides for specific restrictions
- Access hierarchy: User restriction > Tier limit > Feature default
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-19 12:40:25 +01:00
95c57de8d0
docs: comprehensive v9c architecture plan - Subscription & Coupon System
...
Deploy Development / deploy (push) Successful in 54s
Build Test / lint-backend (push) Successful in 0s
Build Test / build-frontend (push) Successful in 13s
Added detailed documentation for v9c features:
- Complete database schema (8 new tables)
- Backend architecture (6 new routers, middleware, cron jobs)
- Frontend extensions (pages, components, admin panels)
- Zugriffs-Hierarchie und Stacking-Logik
- Tier-System mit Admin-editierbaren Limits
- Coupon-System (Single-Use + Multi-Use Period)
- User Activity Tracking
- E-Mail Templates
- Migration roadmap (25 steps in 5 phases)
Spätere Features dokumentiert (v9d/v9e):
- Bonus-System & Gamification
- Stripe-Integration
- Partner-Verwaltung
- Admin-Benachrichtigungen
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-19 12:24:31 +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
115d975335
feat: add ZIP import functionality
...
Deploy Development / deploy (push) Successful in 52s
Build Test / lint-backend (push) Successful in 0s
Build Test / build-frontend (push) Successful in 11s
- Backend: POST /api/import/zip endpoint with validation and rollback
- CSV import with ON CONFLICT DO NOTHING for duplicate detection
- Photo import with existence check
- AI insights import
- Frontend: file upload UI in SettingsPage
- Import summary showing count per category
- Full transaction rollback on error
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-18 22:52:35 +01:00
8e25b54cc2
docs: update CLAUDE.md for v9b release
...
Deploy Development / deploy (push) Successful in 56s
Build Test / lint-backend (push) Successful in 0s
Build Test / build-frontend (push) Successful in 13s
Updated documentation to reflect v9b (PostgreSQL) release:
**Version Update:**
- v9a → v9b (PostgreSQL Migration complete)
- Tech Stack: SQLite → PostgreSQL 16 (Alpine)
- 60+ protected endpoints (was 44)
**New Features Documented:**
- ✅ PostgreSQL migration (auto-migrate from SQLite)
- ✅ Export: CSV, JSON, ZIP (with photos)
- ✅ Admin: Edit prompts, set email/PIN
- ✅ All API endpoints aligned (11 fixes)
**Environment Variables:**
- Added DB_* variables (PostgreSQL connection)
- Added ANTHROPIC_API_KEY (alternative to OpenRouter)
**Important Hints:**
- Updated: PostgreSQL migrations instead of SQLite safe_alters
- Added: RealDictCursor usage for dict-like row access
- Added: PostgreSQL boolean syntax (true/false not 1/0)
**New Section: v9b Migration – Lessons Learned**
- Docker build optimization (removed apt-get)
- Empty date string handling
- Boolean field conversion
- API endpoint consistency audit
**Roadmap Adjustment:**
- v9c: Tier System (was in v9b)
- v9d: OAuth2 Connectors (was in v9c)
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-18 21:39:14 +01:00
0a871fea22
9b
Deploy Development / deploy (push) Failing after 1s
Build Test / lint-backend (push) Successful in 0s
Build Test / build-frontend (push) Successful in 1m6s
2026-03-18 08:27:33 +01:00
c4cead9e27
docs: add comprehensive design system to CLAUDE.md
...
Deploy Development / deploy (push) Failing after 11m50s
Build Test / lint-backend (push) Successful in 0s
Build Test / build-frontend (push) Successful in 30s
Added detailed documentation for:
- Color system (CSS variables)
- CSS class conventions
- Spacing & sizing standards
- Component patterns (loading, error, empty states)
- Jinkendo logo system
- Available custom commands
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-18 06:13:58 +01:00
c36085daa4
md code aktualisiert V9
Deploy Development / deploy (push) Successful in 56s
Build Test / lint-backend (push) Successful in 0s
Build Test / build-frontend (push) Successful in 13s
2026-03-17 14:08:44 +01:00
89b6c0b072
feat: initial commit – Mitai Jinkendo v9a
Deploy to Raspberry Pi / deploy (push) Waiting to run
Build Test / build-frontend (push) Waiting to run
Build Test / lint-backend (push) Waiting to run
2026-03-16 13:35:11 +01:00