4 Commits

Author SHA1 Message Date
20659567fd feat: mobile-first refactor for BottleDetails & RLS security/performance optimizations 2025-12-26 23:58:35 +01:00
a3915bd610 feat: Dynamic credit initialization based on subscription plan
New trigger creates:
- Profile (username from metadata)
- Subscription (starter plan by default)
- Credits (from plan's monthly_credits, not hardcoded)

Includes RLS policies for self-insert fallback
2025-12-26 23:11:58 +01:00
9e2abb0aa3 fix: Update handle_new_user trigger for reliable registration
- Simplified trigger to only create profile
- Added exception handling to prevent user creation failures
- Subscription created client-side after successful signup
2025-12-26 23:05:30 +01:00
30a716f3e2 feat: Add UserStatusBadge showing subscription level and credits
New component in header shows:
- Subscription plan badge (Starter/Bronze/Silver/Gold with icons)
- AI credits balance with sparkle icon

Also includes SQL migration for user_subscriptions RLS fix
2025-12-26 23:02:20 +01:00