feat: integrate Stripe payment with subscription plans

Add Stripe payment integration across the project:

- Add @stripe/stripe-js dependency
- Configure Stripe environment variables (secret key, publishable key, webhook secret) for dev, local, and production environments
- Add Product/Price IDs for monthly, quarterly, and annual subscription tiers
- Extend subscription plan data with voiceMinutesPerDay quotas (30/45/60 minutes per tier)
- Update .gitignore to exclude implementation_plan.md
This commit is contained in:
2026-06-16 10:21:02 +08:00
parent 17741320ff
commit 0548a08cbb
25 changed files with 1220 additions and 26 deletions
+4
View File
@@ -50,6 +50,8 @@ function toView(u: {
currentMood?: string;
isGuest?: boolean;
isVip?: boolean;
voiceMinutesRemaining?: number;
stripeCustomerId?: string | null;
}): UserView {
return {
id: u.id,
@@ -62,6 +64,8 @@ function toView(u: {
currentMood: u.currentMood ?? "",
isGuest: u.isGuest ?? false,
isVip: u.isVip ?? false,
voiceMinutesRemaining: u.voiceMinutesRemaining ?? 0,
stripeCustomerId: u.stripeCustomerId ?? null,
};
}