imperfectandcompany / Imperfect-Gamers-Site-Store

Our robust community site integrating Steam for enhanced user interactions and data management, powered by Remix with Tailwind CSS for optimistic, responsive UI. Features CI/CD with GitHub Actions and Docker for seamless deployment and maintenance.
https://store.imperfectgamers.org/
Other
0 stars 0 forks source link

Enhancements to Steam Linking, Premium Checkout, and UI Updates #92

Closed cheesea3 closed 3 weeks ago

cheesea3 commented 3 weeks ago

We are encountering several issues and enhancement opportunities in our current implementation of Steam account linking and the checkout flow. The following improvements are required to enhance the user experience, ensure data integrity, and update various UI/UX elements:

Objectives:

Tasks

  1. Unique Steam Linking

    • Modify the Steam linking process to check if the Steam ID is already linked to another account before linking it to the current user.
    • Suggested code change in authorize.steam.callback.tsx:
      // Verify if Steam ID is already linked to another account
      const existingUser = await fetchUserBySteamId(steamId);
      if (existingUser) {
      return sendErrorToParent('Steam ID is already linked to another account', 400, type || '');
      }
  2. Premium User Checkout Bypass

    • Implement a check during the login or session initialization to determine if the user is a premium member.
    • Bypass the checkout flow if the user is identified as a premium member.
    • Suggested code snippet:
      if (user.isPremium) {
      console.log('User is a premium member, bypassing checkout.');
      return; // Exit the checkout flow early
      }
  3. Redirect Handling Post-Purchase

    • Enhance redirect handling to differentiate between successful purchases and other redirects.
    • Suggested code snippet:
      if (redirectType === 'purchase_success') {
      console.log('Redirected after successful purchase.');
      // Handle post-purchase logic here
      }
  4. Update Generic Temporary Names

    • Replace generic temporary names with meaningful names in the UI.
    • Ensure the new names are reflected throughout the UI.
  5. Adjust Yearly Premium Pass Price

    • Update the price for the yearly premium pass to $120.
    • Maintain the "Coming Soon" label for the yearly pass.
    • Suggested code snippet for price adjustment:
      const yearlyPassPrice = 120; // Set yearly pass price to $120
  6. Update Premium Perks

    • Add tag, vote extend, and a HUD gif to the list of premium perks.
    • Ensure these perks are highlighted in the UI.

Additional Notes

Expected Outcome:

By implementing this issue, we can ensure secure communication between the webhook service and the Imperfect Gamers API, preventing unauthorized access and tampering with sensitive data. This issue aims to streamline the user experience by ensuring proper account management and enhancing the checkout process.

cheesea3 commented 3 weeks ago

image