mirror of
https://github.com/rybbit-io/rybbit.git
synced 2025-05-10 20:05:38 +02:00
custom stripe integration (#88)
* custom stripe integration * Refactor subscription management UI and remove unused components - Removed ChangePlanDialog, CurrentPlanCard, and ErrorDialog components to streamline subscription management. - Updated SubscriptionPage to define PlanTemplate locally and improve plan details handling. - Adjusted button labels for clarity and removed unnecessary HelpSection for a cleaner interface. - Enhanced the overall structure and readability of the SubscriptionPage component. * Refactor SubscriptionPage to streamline plan display and enhance user experience - Removed unused components and consolidated plan handling into FreePlan and ProPlan components for better organization. - Simplified the SubscriptionPage structure by integrating the useStripeSubscription hook and eliminating redundant state management. - Improved UI clarity by directly rendering plan components based on subscription status, enhancing overall user interaction. * Refactor subscription plans and UI components for improved clarity and functionality - Updated FreePlan and ProPlan components to enhance the display of subscription details and usage information. - Renamed pricing tiers from "basic" to "pro" in both client and server code to reflect the new subscription structure. - Simplified the layout of SubscriptionPage and adjusted button styles for better user experience. - Enhanced plan details and descriptions to provide clearer information on subscription benefits and features. * Enhance Header and UsageBanners components for improved user experience - Updated Header component to display UsageBanners with padding for better layout. - Simplified button styles in UsageBanners for consistency and clarity. - Adjusted text labels in UsageBanners to better reflect user actions and subscription options. - Removed unnecessary console log from Weekdays component to clean up code. * Update subscription plans and event limits to reflect new pricing structure - Changed the event limit for the free plan from 20,000 to 10,000 across client and server code. - Renamed the "basic" plan to "pro" in the subscription management UI and related components for consistency. - Adjusted plan details and features to align with the new subscription offerings, enhancing clarity for users. - Removed deprecated code related to subscription handling to streamline the implementation.
This commit is contained in:
parent
85a82b233d
commit
c631b19dd9
28 changed files with 1068 additions and 1477 deletions
|
@ -7,7 +7,6 @@ import { db } from "../db/postgres/postgres.js";
|
|||
import { IS_CLOUD, STRIPE_PRICES } from "./const.js";
|
||||
import * as schema from "../db/postgres/schema.js";
|
||||
import { eq } from "drizzle-orm";
|
||||
import { stripe } from "@better-auth/stripe";
|
||||
import Stripe from "stripe";
|
||||
|
||||
dotenv.config();
|
||||
|
@ -25,15 +24,6 @@ const pluginList = IS_CLOUD
|
|||
// Set the creator role to owner
|
||||
creatorRole: "owner",
|
||||
}),
|
||||
stripe({
|
||||
stripeClient,
|
||||
stripeWebhookSecret: process.env.STRIPE_WEBHOOK_SECRET!,
|
||||
createCustomerOnSignUp: true,
|
||||
subscription: {
|
||||
enabled: true,
|
||||
plans: STRIPE_PRICES,
|
||||
},
|
||||
}),
|
||||
]
|
||||
: [
|
||||
username(),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue