semblance-dev/backend/app/routes
Vadym Samoilenko bc4138f332 Final pieces: decorators on LLM routes, usage self-service, billing page, WS events
Backend:
- @active_required + @with_user_context applied to all LLM-invoking routes
  in personas.py, focus_group_ai.py, ai_personas.py
- backend/app/routes/usage.py: GET /api/usage/me (MTD summary by feature),
  GET /api/usage/focus-groups/<id> (owner or admin)
- Registered usage_bp in app/__init__.py
- llm_service._record_usage now emits usage_update WS event to focus group room

Frontend:
- useMyUsage + useFocusGroupUsage hooks
- MyUsage.tsx: personal billing dashboard (cost cards + per-feature table)
- /billing route (ProtectedRoute) + Billing nav link
- FocusGroupSession: quota_warning amber banner with Progress bar,
  quota_exceeded + quota_warning WS events wired via websocketServiceNew

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-24 18:43:13 +01:00
..
admin.py Complete phases D–G: quota enforcement, token invalidation, admin writes, backfill 2026-04-24 18:34:48 +01:00
ai_personas.py Final pieces: decorators on LLM routes, usage self-service, billing page, WS events 2026-04-24 18:43:13 +01:00
auth.py Complete phases D–G: quota enforcement, token invalidation, admin writes, backfill 2026-04-24 18:34:48 +01:00
focus_group_ai.py Final pieces: decorators on LLM routes, usage self-service, billing page, WS events 2026-04-24 18:43:13 +01:00
focus_groups.py Allow document uploads (PDF, DOCX, TXT, etc.) as focus group assets 2026-03-23 17:08:30 +00:00
folders.py Apply Jintech security audit remediation (sprint 3) — 87/92 findings fixed 2026-03-20 12:51:18 +00:00
personas.py Final pieces: decorators on LLM routes, usage self-service, billing page, WS events 2026-04-24 18:43:13 +01:00
tasks.py Fix data isolation + conversation/decision 500 errors 2026-03-23 17:02:10 +00:00
usage.py Final pieces: decorators on LLM routes, usage self-service, billing page, WS events 2026-04-24 18:43:13 +01:00