- Introduced new configuration files for navbar, footer, avatar, sidebar, social links, and payment plans to enhance modularity and maintainability.
- Updated import paths across the codebase to reference the new configuration files.
- Removed deprecated functions and streamlined the config.tsx file for better organization.
- Moved website configuration to a new file for better modularity and maintainability.
- Updated import paths across the codebase to reference the new website configuration location.
- Removed the old website configuration from the config.tsx file to streamline the codebase.
- Introduced new pricing plans (Free, Pro, Lifetime) with detailed descriptions and features in both English and Chinese.
- Updated payment configuration to include new plans and their pricing structures.
- Refactored payment-related functions to retrieve pricing plans consistently across the application.
- Enhanced the PricingTable component to dynamically display available plans based on the new configuration.
- Removed deprecated payment configuration file to streamline the codebase.
- Changed import paths for StorageError to use the correct types module across storage-related API routes.
- Renamed functions in storage/index.ts for clarity, updating getStorageProvider and initializeStorageProvider to better reflect their functionality.
- Streamlined API endpoint constants for improved readability and maintainability in storage operations.
- Updated mail provider functions to improve naming consistency and clarity, renaming initializeMailProvider to getMailProvider and vice versa.
- Enhanced README documentation for both mail and newsletter modules to reflect structural changes and clarify usage.
- Streamlined imports and exports in mail and newsletter files for better organization.
- Added error handling in ResendNewsletterProvider constructor to ensure required environment variables are set.
- Removed deprecated code and unnecessary type exports to simplify the codebase.
- Merged sendTemplate and sendRawEmail functions into a single sendEmail function for improved clarity and maintainability.
- Introduced getTemplate function to handle rendering of email templates with context and locale.
- Updated EmailTemplates export to include all available templates directly in types.ts.
- Removed deprecated mail.ts and templates/index.ts files to streamline the codebase.
- Updated references from send to sendEmail in send-message.ts and auth.ts for consistency.
- Adjusted exports in mail/index.ts to reflect the new function name.
- Removed unused mail-config.ts file to streamline the mail configuration process.
- Renamed Template type to EmailTemplate for consistency across the codebase.
- Updated email template functions to use simplified translation keys.
- Removed unused MailConfig interface and adjusted default mail configuration.
- Enhanced imports in mail-related files for better organization and readability.
- Changed button class in ForgotPasswordForm and ResetPasswordForm to improve user interaction.
- Updated PricingCard to replace Check icon with CheckCircleIcon for better visual representation.
- Enhanced PricingTable logic to filter out disabled plans and prices, ensuring only available options are displayed.
- Added comments in payment types to clarify when to disable plans and prices for existing users.
- Introduced userId parameter in createCheckoutAction and createPortalAction for improved user-specific session management.
- Updated components to pass userId instead of customerId, aligning with the new payment structure.
- Added new actions to retrieve active subscription and lifetime status, ensuring users can check their subscription details securely.
- Created SQL migration for new payment-related tables, establishing a robust foundation for payment management.
- Enhanced error handling and logging in payment actions for better debugging and user feedback.
- Removed commented-out code in BillingPage to enhance readability.
- Updated CheckoutButton to always refetch session data for accurate user information.
- Streamlined console log statements in BillingCard for better clarity.
- Adjusted comments in BillingCard to provide clearer context on button visibility based on user status.
- Refactored usePayment hook to fetch payment data whenever the user session changes, improving data accuracy.
- Enhanced getCustomerSubscriptionAction to return the most recent active or trialing subscription when multiple subscriptions exist.
- Simplified UpgradeCard component by removing the user prop and directly utilizing the payment hook for current plan checks.
- Updated CustomerPortalButton to use 'default' variant instead of 'outline'.
- Refactored PricingTable to accept currentPlan instead of currentPlanId for improved clarity.
- Adjusted BillingCard to streamline error handling and utilize currentPlan for determining user status.
- Renamed ListCustomerSubscriptionsParams to getCustomerSubscriptionsParams for clarity.
- Updated listCustomerSubscriptions method in StripeProvider to getCustomerSubscriptions, improving consistency in naming.
- Adjusted method implementations to reflect the new naming conventions, enhancing code readability and maintainability.
- Made customerId in the payment schema mandatory to ensure data integrity.
- Updated Subscription interface to make currentPeriodStart optional and replaced canceledAt with trialStartDate for better clarity.
- Refactored listCustomerSubscriptions method in StripeProvider to fetch subscriptions from the database instead of Stripe API, enhancing performance and maintainability.
- Added a new private method to map Stripe subscription status to the application's PaymentStatus for improved status handling.
- Added new SQL migration to create "account", "payment", "user", and "verification" tables, establishing a foundational structure for payment management.
- Updated existing codebase to replace subscription references with payment, including hooks, providers, and actions.
- Refactored components to utilize the new payment system, enhancing clarity and maintainability.
- Removed deprecated subscription provider and related logic, streamlining the payment handling process.
- Enhanced error handling and logging for improved debugging in payment management.
- Renamed SubscriptionTypes to PaymentTypes to better reflect the payment model.
- Updated references in getUserLifetimeStatus action and StripeProvider to use the new PaymentTypes enum.
- Adjusted type definitions in payment/types.ts for clarity and consistency in payment handling.
- Enhanced comments to clarify the purpose of payment types and their usage in the codebase.
- Introduced a new column "type" in the "subscription" table to differentiate between subscription types (one-time and recurring).
- Updated existing records to set the "type" based on the presence of "subscription_id".
- Modified the "interval" column to allow null values.
- Updated SQL snapshots and journal to reflect the new migration versions.
- Enhanced the getUserLifetimeStatus action to utilize the new subscription type logic for better membership status checks.
- Added userId to metadata in createCheckoutAction for improved webhook event processing.
- Updated StripeProvider to handle userId and planId from session metadata, enhancing subscription management.
- Introduced 'paused' status in PaymentStatus type for better subscription state representation.
- Improved comments for clarity in metadata handling and subscription status conversion.
- Replaced instances of `authSession` with `session` for consistency across actions.
- Removed unused `getCustomer` function and related types from payment module to streamline codebase.
- Enhanced `createOrGetCustomer` method to simplify customer creation logic.
- Updated metadata handling in checkout session creation for improved clarity and maintainability.
- Created SQL migration to drop unique constraint and columns from the user table.
- Updated journal and snapshot metadata to reflect the new migration version.
- Refactored user schema to remove the lifetimeMember field, aligning with the new subscription management logic.
- Enhanced getUserLifetimeStatus action to utilize updated subscription data structure.
- Implemented getUserLifetimeStatus action to retrieve user's lifetime membership status from the database.
- Updated subscription store to check lifetime membership status against the database if session data is outdated.
- Enhanced error handling and logging for better debugging in the subscription management process.
- Added console logs for tracking user session and lifetime status checks in billing components.
- Added SubscriptionProvider to manage subscription state and initialize it on app load.
- Integrated useSubscription hook for accessing subscription data across components.
- Updated NavUser and UserButton components to reset subscription state on sign out.
- Refactored BillingCard to utilize the new subscription logic, improving clarity and performance.
- Enhanced UpgradeCard to conditionally render based on subscription status.
- Renamed variables for clarity, changing `isLifetimeMember` to `isLifetimePlan` and `canUpgrade` logic to improve readability.
- Added localization support for the price label in both English and Chinese.
- Optimized the UI to conditionally display messages for free and lifetime plans, enhancing user experience.
- Commented out console log statements in createCheckoutSession, createCustomerPortalSession, getUserSubscription, PricingCard, and CheckoutButton for cleaner output.
- Updated the reset-password-form to optimize the token validation check with a clearer comment.
- Replaced instances of productId with priceId in PricingCard, BillingCard, and payment utility functions for consistency.
- Updated the Price interface in types.ts to reflect the change from productId to priceId.
- Adjusted payment configuration to use priceId instead of productId for better clarity and alignment with Stripe's API.
- Introduced a new email template for contact messages, including localization for English and Chinese.
- Updated the send-message action to utilize the new contact message template and added locale support.
- Enhanced the contact form validation schema and improved code formatting for consistency.
- Introduced a new "interval" column in the "subscription" table to store subscription intervals.
- Updated the journal and snapshot metadata to reflect the new schema version and changes.
- Adjusted the schema definition to include the new column for better subscription management.
- Introduced new database tables for managing subscriptions and user subscriptions.
- Updated package.json with new database commands for generation, migration, and studio.
- Refactored the user schema to remove deprecated fields and added foreign key relationships.
- Enhanced Stripe payment provider logic to handle subscription creation, updates, and cancellations.
- Improved error handling and logging for subscription events.
- Added locale parameter to the createCustomerPortal function for better localization support.
- Simplified the membership check in the UpgradeCard component to only consider lifetime membership.
- Updated billing card logic to fetch subscription data based on lifetime membership status.
- Added new localization keys for billing management in English and Chinese message files.
- Updated the sidebar to include a billing link.
- Refactored the billing card component to improve loading state handling and user session management.
- Enhanced subscription fetching logic to include better error handling and logging.
- Adjusted the upgrade card visibility based on user membership status.
- Added new localization keys for email and password requirements in English and Chinese message files.
- Refactored page retrieval logic by replacing `getCustomPage` with `getPage` in cookie, privacy, and terms of service policy pages.
- Removed the unused `schemas.ts` file.
- Deleted the `ISSUES.md` file as it contained outdated information.
- Updated image paths in various components to remove the `/images` prefix for consistency.