Skip to content

PR #3#11

Merged
Jackson57279 merged 35 commits intomainfrom
master
Jun 17, 2025
Merged

PR #3#11
Jackson57279 merged 35 commits intomainfrom
master

Conversation

@Jackson57279
Copy link
Owner

No description provided.

…ayout and user experience. Update header to use sticky positioning, enhance main content area for better responsiveness, and optimize background gradient rendering. Introduce file input for attachments and streamline message input area with improved styling and functionality.
…estion buttons only when there are no messages, enhancing user experience and interface clarity.
…ormance and user experience. Update next.config.mjs with caching headers, image formats, and experimental features. Refactor layout.tsx to include viewport settings, enhanced metadata, and preconnect links. Optimize ChatSessionPage by memoizing components and improving button functionality for better responsiveness.
…amic imports with server-side rendering for various sections, and add SchemaMarkup for enhanced search engine optimization. Update layout to include new components: DetailedFeatures, HowItWorks, UseCases, FaqSection, and BlogTeaser.
…v and stripe. Add dynamic import for Pricing component in Home page and implement a Subscribe button for Stripe checkout.
… Remove @vercel/kv dependency and update related API calls in success and checkout routes. Enhance schema to include Stripe fields and adjust data synchronization methods accordingly.
…he Stripe integration. Update API calls in the generate-stripe-checkout route to handle missing customer IDs with appropriate error responses.
Ensure that the NEXT_PUBLIC_APP_URL, NEXT_PUBLIC_CONVEX_URL, and STRIPE_SECRET_KEY environment variables are set before proceeding with the Stripe client and Convex initialization. Return appropriate error responses for missing variables in the generate-stripe-checkout route.
- Implement floating CTA for subscription on the Home page that appears after scrolling down.
- Update buttons to navigate to the Pricing page and adjust button labels for clarity.
- Revamp the Success page to include a loading state and improved user feedback upon successful subscription.
- Add dynamic pricing plans with detailed descriptions and features in the Pricing component, including user authentication checks for subscription actions.
- Ensure smooth transitions and animations for better user experience.
- Added @clerk/clerk-sdk-node to package.json and bun.lock for improved user management.
- Updated svix dependency to version 1.67.0 for enhanced webhook handling.
- Implemented secure webhook handling for Clerk events, including user creation, updates, and deletions.
- Enhanced user synchronization with Clerk and Stripe, ensuring proper handling of user data and subscription updates.
- Added new queries and mutations for user data retrieval and management, enforcing security checks for user access.
- Improved database schema with additional indexes for better performance in user and subscription queries.
- Updated the createOrUpdateUser mutation to use the authenticated user's Clerk ID directly from the session token, enhancing security and simplifying the code.
- Modified the return value of getMyStripeCustomerId to indicate whether a Stripe customer exists, improving clarity in user data retrieval.
- Updated the chat API to utilize the new OpenRouter response streaming method, improving message handling and error reporting.
- Added model selection and thinking toggle features in the animated AI chat component for enhanced user interaction.
- Refined user management logic in Clerk webhooks, ensuring proper handling of user creation, updates, and deletions.
- Improved error handling in the Stripe checkout route to provide more detailed feedback on failures.
- Updated .gitignore to include cursor-related files for better project cleanliness.
- Enhanced error handling in the chat API to provide clearer feedback on message processing issues.
- Updated user management logic in Clerk webhooks to ensure accurate user state reporting.
- Improved error responses in the Stripe checkout route for better user experience during payment failures.
- Updated the OpenRouter initialization to a lazy-loading approach for better performance.
- Enhanced message preparation logic to ensure proper handling of user and assistant roles.
- Introduced a function to retrieve the model ID from parameters or defaults.
- Improved API key retrieval from environment variables for better security practices.
- Upgraded @monaco-editor/react to version 4.7.0 for enhanced features.
- Refactored chat API to utilize sequential thinking for message processing, improving response generation.
- Simplified message handling in the animated AI chat component, removing unnecessary parameters and stream mode.
- Enhanced error handling in the chat API for better user feedback on processing issues.
- Updated the OpenRouter provider to encapsulate chat functionality, allowing for a cleaner interface when interacting with the chat model.
- Improved the structure of the chat API for better maintainability and usability.
…ial thinking process

- Updated the chat API to utilize streaming responses for improved message handling.
- Refactored the sequential thinking logic to include detailed stages and error handling.
- Enhanced the AnimatedAIChat component to display current processing stages and generated code dynamically.
- Improved state management for generated code and current stage in the chat interface.
- Added functionality to read and parse package.json using file system and path modules.
- Improved configuration management by dynamically accessing package information.
- Added a comprehensive Content Security Policy (CSP) to improve security by restricting resource loading.
- Configured headers for various content types, including scripts, images, and fonts, to ensure safer application behavior.
@netlify
Copy link

netlify bot commented Jun 17, 2025

Deploy Preview for zapdev ready!

Name Link
🔨 Latest commit fbe0cfa
🔍 Latest deploy log https://app.netlify.com/projects/zapdev/deploys/6851fcf6f12abf0008107a16
😎 Deploy Preview https://deploy-preview-11--zapdev.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@vercel
Copy link

vercel bot commented Jun 17, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
zapdev ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jun 17, 2025 11:40pm

@Jackson57279 Jackson57279 merged commit 5263002 into main Jun 17, 2025
5 checks passed
Jackson57279 added a commit that referenced this pull request Jun 17, 2025
* Refactor ChatSessionPage and AnimatedAIChat components for improved layout and user experience. Update header to use sticky positioning, enhance main content area for better responsiveness, and optimize background gradient rendering. Introduce file input for attachments and streamline message input area with improved styling and functionality.

* Update AnimatedAIChat component to conditionally display command suggestion buttons only when there are no messages, enhancing user experience and interface clarity.

* Enhance Next.js configuration and layout components for improved performance and user experience. Update next.config.mjs with caching headers, image formats, and experimental features. Refactor layout.tsx to include viewport settings, enhanced metadata, and preconnect links. Optimize ChatSessionPage by memoizing components and improving button functionality for better responsiveness.

* Refactor Home component to improve performance and SEO. Introduce dynamic imports with server-side rendering for various sections, and add SchemaMarkup for enhanced search engine optimization. Update layout to include new components: DetailedFeatures, HowItWorks, UseCases, FaqSection, and BlogTeaser.

* removing shit that broke the site

* fixing errors

* commmit

* Update dependencies in package.json and bun.lock to include @vercel/kv and stripe. Add dynamic import for Pricing component in Home page and implement a Subscribe button for Stripe checkout.

* Refactor Stripe integration to use Convex for managing customer data. Remove @vercel/kv dependency and update related API calls in success and checkout routes. Enhance schema to include Stripe fields and adjust data synchronization methods accordingly.

* Refactor Stripe client initialization to a lazy-loading approach in the Stripe integration. Update API calls in the generate-stripe-checkout route to handle missing customer IDs with appropriate error responses.

* Add environment variable checks for Stripe and Convex initialization

Ensure that the NEXT_PUBLIC_APP_URL, NEXT_PUBLIC_CONVEX_URL, and STRIPE_SECRET_KEY environment variables are set before proceeding with the Stripe client and Convex initialization. Return appropriate error responses for missing variables in the generate-stripe-checkout route.

* Enhance Home and Success pages with new subscription features

- Implement floating CTA for subscription on the Home page that appears after scrolling down.
- Update buttons to navigate to the Pricing page and adjust button labels for clarity.
- Revamp the Success page to include a loading state and improved user feedback upon successful subscription.
- Add dynamic pricing plans with detailed descriptions and features in the Pricing component, including user authentication checks for subscription actions.
- Ensure smooth transitions and animations for better user experience.

* Making sure my .env dont get commited

* Update dependencies and enhance Clerk and Stripe integration

- Added @clerk/clerk-sdk-node to package.json and bun.lock for improved user management.
- Updated svix dependency to version 1.67.0 for enhanced webhook handling.
- Implemented secure webhook handling for Clerk events, including user creation, updates, and deletions.
- Enhanced user synchronization with Clerk and Stripe, ensuring proper handling of user data and subscription updates.
- Added new queries and mutations for user data retrieval and management, enforcing security checks for user access.
- Improved database schema with additional indexes for better performance in user and subscription queries.

* Refactor user creation and update logic in Convex

- Updated the createOrUpdateUser mutation to use the authenticated user's Clerk ID directly from the session token, enhancing security and simplifying the code.
- Modified the return value of getMyStripeCustomerId to indicate whether a Stripe customer exists, improving clarity in user data retrieval.

* Enhance API and component functionality

- Updated the chat API to utilize the new OpenRouter response streaming method, improving message handling and error reporting.
- Added model selection and thinking toggle features in the animated AI chat component for enhanced user interaction.
- Refined user management logic in Clerk webhooks, ensuring proper handling of user creation, updates, and deletions.
- Improved error handling in the Stripe checkout route to provide more detailed feedback on failures.
- Updated .gitignore to include cursor-related files for better project cleanliness.

* Refactor API error handling and improve user feedback

- Enhanced error handling in the chat API to provide clearer feedback on message processing issues.
- Updated user management logic in Clerk webhooks to ensure accurate user state reporting.
- Improved error responses in the Stripe checkout route for better user experience during payment failures.

* commir

* Refactor OpenRouter integration and improve message handling

- Updated the OpenRouter initialization to a lazy-loading approach for better performance.
- Enhanced message preparation logic to ensure proper handling of user and assistant roles.
- Introduced a function to retrieve the model ID from parameters or defaults.
- Improved API key retrieval from environment variables for better security practices.

* Update dependencies and refactor chat API for improved functionality

- Upgraded @monaco-editor/react to version 4.7.0 for enhanced features.
- Refactored chat API to utilize sequential thinking for message processing, improving response generation.
- Simplified message handling in the animated AI chat component, removing unnecessary parameters and stream mode.
- Enhanced error handling in the chat API for better user feedback on processing issues.

* Refactor OpenRouter provider to enhance chat functionality

- Updated the OpenRouter provider to encapsulate chat functionality, allowing for a cleaner interface when interacting with the chat model.
- Improved the structure of the chat API for better maintainability and usability.

* Remove model selection and thinking toggle from AnimatedAIChat component for a cleaner interface

* Refactor chat API to implement streaming response and enhance sequential thinking process

- Updated the chat API to utilize streaming responses for improved message handling.
- Refactored the sequential thinking logic to include detailed stages and error handling.
- Enhanced the AnimatedAIChat component to display current processing stages and generated code dynamically.
- Improved state management for generated code and current stage in the chat interface.

* alert user if using old verison of application

* Made vercel.json

* Enhance next.config.mjs to import package.json dynamically

- Added functionality to read and parse package.json using file system and path modules.
- Improved configuration management by dynamically accessing package information.

* Add @radix-ui/react-icons dependency

* buttons are back

* Enhance Content Security Policy in next.config.mjs

- Added a comprehensive Content Security Policy (CSP) to improve security by restricting resource loading.
- Configured headers for various content types, including scripts, images, and fonts, to ensure safer application behavior.

* fixing errors

* trying to fix the ai implmentation

* trying to fix the ai implmentation

* fixing ai string

* fix
Copy link

@cursor cursor bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bug: Stripe Subscription Update Mutation Mismatch

The syncStripeDataToConvex function calls api.stripe.updateUserStripeSubscription, but the correct mutation name in convex/stripe.ts is updateUserSubscription, leading to a runtime error.

lib/stripe.ts#L36-L44

https://github.com/otdoges/zapdev/blob/fbe0cfa646e20e44c5bc0822ba0abe4a76a78956/lib/stripe.ts#L36-L44

Fix in Cursor


Bug: Stripe Webhook Handler Calls Incorrect API Method

The Stripe webhook handler for checkout.session.completed incorrectly calls api.users.updateUserSubscription. This mutation is defined in the stripe module and should be api.stripe.updateUserSubscription, leading to runtime errors when processing webhook events.

app/api/webhooks/stripe/route.ts#L61-L68

https://github.com/otdoges/zapdev/blob/fbe0cfa646e20e44c5bc0822ba0abe4a76a78956/app/api/webhooks/stripe/route.ts#L61-L68

Fix in Cursor


Bug: Stripe Webhook Calls Undefined Convex Mutation

The Stripe webhook handler calls the non-existent Convex mutation api.users.updateSubscriptionStatus. This mutation is not defined in convex/users.ts, leading to runtime errors when processing Stripe events such as invoice.paid, invoice.payment_failed, customer.subscription.updated, and customer.subscription.deleted.

app/api/webhooks/stripe/route.ts#L84-L89

https://github.com/otdoges/zapdev/blob/fbe0cfa646e20e44c5bc0822ba0abe4a76a78956/app/api/webhooks/stripe/route.ts#L84-L89

Fix in Cursor


Bug: Stripe Integration Errors: Hardcoded IDs and Null Assertions

The priceId values for plans are hardcoded instead of using the actual Stripe price IDs retrieved from the API, which can cause checkout failures. Additionally, the unit_amount property is accessed using a non-null assertion operator (!) without checking for null, potentially leading to runtime errors if the Stripe API returns a null value.

app/pricing/page.tsx#L44-L46

https://github.com/otdoges/zapdev/blob/fbe0cfa646e20e44c5bc0822ba0abe4a76a78956/app/pricing/page.tsx#L44-L46

Fix in Cursor


Bug: Empty API Route File Causes Runtime Errors

The app/api/sync-stripe-data/route.ts API route file was accidentally committed containing only a single space character. This empty file lacks the expected Stripe data syncing logic and will cause runtime errors if accessed or imported due to missing exported functions or handlers.

app/api/sync-stripe-data/route.ts#L1-L1

https://github.com/otdoges/zapdev/blob/fbe0cfa646e20e44c5bc0822ba0abe4a76a78956/app/api/sync-stripe-data/route.ts#L1-L1

Fix in Cursor


BugBot free trial expires on June 24, 2025
You have used $0.00 of your $0.00 spend limit so far. Manage your spend limit in the Cursor dashboard.

Was this report helpful? Give feedback by reacting with 👍 or 👎

Jackson57279 pushed a commit that referenced this pull request Oct 8, 2025
Jackson57279 pushed a commit that referenced this pull request Nov 21, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant