whisper-money/resources/js/types
Víctor Falcón 58b934333f
feat: centralize pricing config with multiple plans support (#20)
## Summary

Centralizes all pricing/subscription plan configuration in a single PHP
config file, making it easy to modify prices, features, and promotional
codes from one place.

## Changes

### Config (`config/subscriptions.php`)
- Added `plans` array with support for multiple billing cycles (monthly,
yearly, lifetime)
- Each plan includes: name, price, original_price (for discounts),
stripe_price_id, billing_period, and features
- Added `default_plan` setting to control which plan is highlighted
- Added `promo` config with enabled flag, code, description, and badge

### Frontend
- Created TypeScript types for `Plan`, `PromoConfig`, and
`PricingConfig`
- Updated `welcome.tsx` to display all plans in a responsive grid layout
- Updated `paywall.tsx` to show all plans with "Most Popular" and "Best
Value" badges
- Promo code section is now conditionally rendered based on
`promo.enabled`

### Backend
- Updated `HandleInertiaRequests.php` to share pricing config globally
- Removed redundant props from routes

### Tests
- Added test to verify pricing config structure is passed correctly

## How to Use

To modify pricing, edit `config/subscriptions.php`:
- Change `default_plan` to highlight a different plan
- Set `promo.enabled` to `false` (or `PROMO_ENABLED=false` in `.env`) to
hide promo codes
- Add/remove/modify plans as needed
2025-12-09 10:03:35 +01:00
..
account.ts Accounts: Allow users to create custom banks with his own logo, and name (#12) 2025-12-04 15:24:04 +01:00
automation-rule.ts Y3:0 2025-11-26 12:01:49 +01:00
balance-import.ts Import balances assistant (#14) 2025-12-05 16:39:56 +01:00
category.ts Add category type field support (#2) 2025-12-01 20:19:47 +01:00
import.ts Add multi-column description mapping support 2025-12-01 10:30:11 +01:00
index.d.ts feat: centralize pricing config with multiple plans support (#20) 2025-12-09 10:03:35 +01:00
pricing.ts feat: centralize pricing config with multiple plans support (#20) 2025-12-09 10:03:35 +01:00
transaction.ts Save transaction source (manually_created, or imported) 2025-11-28 12:36:48 +01:00
uuid.ts Fix CI: Update bun.lock and fix linting errors 2025-12-01 15:16:06 +01:00
vite-env.d.ts Set up a fresh Laravel app 2025-11-07 12:01:36 +00:00