1.2-B: Frontend useFeatureFlag() composable + auth store bovites #240

Open
opened 2026-06-08 20:03:44 +02:00 by kincses · 0 comments
Owner

Merfoldko: Frontend Architektura 2.0 & Dinamikus Megjelenitesi Rendszer
Cel: useFeatureFlag() Vue composable letrehozasa es auth store bovitese feature flag tamogatassal.

Fuggosegek (Dependencies)

  • Bemenet: #239 (Backend subscription_service)
  • Kimenet: #234 (Temavaltó - a feature flag-ek alapjan engedelyezi a skin/animacio funkciokat)

Implementacios Reszletek

  1. auth store bovites (frontend/src/stores/auth.ts)

    • userFeatures: Record<string, any> state
    • fetchUserFeatures() action - GET /api/v1/users/me/features
    • hasFeature(feature: string): boolean getter
  2. useFeatureFlag() composable (frontend/src/composables/useFeatureFlag.ts)

    • featureEnabled(feature: string): Ref - reaktiv boolean ref
    • Automatikusan frissul, ha a user subscription_plan valtozik

Erintett fajlok

  • frontend/src/stores/auth.ts
  • frontend/src/composables/useFeatureFlag.ts (uj)
**Merfoldko:** Frontend Architektura 2.0 & Dinamikus Megjelenitesi Rendszer **Cel:** useFeatureFlag() Vue composable letrehozasa es auth store bovitese feature flag tamogatassal. ### Fuggosegek (Dependencies) - **Bemenet:** #239 (Backend subscription_service) - **Kimenet:** #234 (Temavaltó - a feature flag-ek alapjan engedelyezi a skin/animacio funkciokat) ### Implementacios Reszletek 1. **auth store bovites** (frontend/src/stores/auth.ts) - userFeatures: Record<string, any> state - fetchUserFeatures() action - GET /api/v1/users/me/features - hasFeature(feature: string): boolean getter 2. **useFeatureFlag() composable** (frontend/src/composables/useFeatureFlag.ts) - featureEnabled(feature: string): Ref<boolean> - reaktiv boolean ref - Automatikusan frissul, ha a user subscription_plan valtozik ### Erintett fajlok - frontend/src/stores/auth.ts - frontend/src/composables/useFeatureFlag.ts (uj)
kincses added the Status: To DoScope: FrontendType: Feature labels 2026-06-08 20:03:44 +02:00
kincses added this to the Frontend Architektúra 2.0 & Dinamikus Megjelenítési Rendszer milestone 2026-06-08 20:07:43 +02:00
Sign in to join this conversation.