# frontend/src/features/subscription/

Subscription and billing management feature with Stripe integration.

## Files

| File | What | When to read |
| ---- | ---- | ------------ |
| `README.md` | Feature overview and API integration | Understanding subscription flow |

## Subdirectories

| Directory | What | When to read |
| --------- | ---- | ------------ |
| `types/` | TypeScript types for subscription data | Working with subscription types |
| `api/` | Subscription API client calls | API integration |
| `hooks/` | React hooks for subscription data | Using subscription state |
| `components/` | Reusable subscription UI components | Building subscription UI |
| `pages/` | Desktop subscription page | Desktop implementation |
| `mobile/` | Mobile subscription screen | Mobile implementation |
| `constants/` | Subscription plan configurations | Plan pricing and features |

## Key Patterns

- Desktop: MUI components with sx props
- Mobile: Tailwind classes with GlassCard
- Stripe Elements for payment methods
- React Query for data fetching
- Toast notifications for user feedback

## Environment Variables

- `VITE_STRIPE_PUBLISHABLE_KEY` - Required for Stripe Elements initialization
