Skip to content

feat: added AI assistant widget, fixed OAuth placeholders, and resolv… - #584

Open
JayRaut123 wants to merge 1 commit into
niharika-mente:mainfrom
JayRaut123:main
Open

feat: added AI assistant widget, fixed OAuth placeholders, and resolv…#584
JayRaut123 wants to merge 1 commit into
niharika-mente:mainfrom
JayRaut123:main

Conversation

@JayRaut123

Copy link
Copy Markdown

✨ Key Features added:
Customer Reward System (Store Coins): Implemented a fully functional loyalty points system to boost user retention.
Users receive a 500-coin Welcome Bonus upon signup (including Google/GitHub OAuth).
Users earn 50 coins for leaving product reviews.
Coins can be redeemed for discounts during checkout, and the coin balance is beautifully displayed on the user's Profile Page.
Interactive AI Assistant Widget: Added a dynamic chatbot component on the frontend that allows users to ask product-related questions (e.g. "Help me find a mouse").
Gemini AI Backend Controller: Integrated the @google/generative-ai SDK (using the gemini-2.5-flash model) in the backend to securely parse store context and return smart product recommendations to the user without exposing API keys on the client-side.
🐛 Bug Fixes & Improvements:
Fixed Authorization token headers: Updated store/product.js to properly append the Authorization: Bearer header to standard fetch() API calls, fixing a bug where authenticated product operations (like Create/Update/Delete) were immediately rejected by the backend.
Database Bootstrapping (Admin Role): Fixed the logic in auth.controller.js so the very first user registered in the database is automatically granted the admin role, preventing lock-outs in fresh development environments.
Developer Experience (Graceful Configurations):
Hardened config/passport.js to explicitly detect and ignore default placeholder strings (e.g., 'your-google-client-id'). If OAuth isn't configured, it gracefully redirects users with an error message instead of crashing the backend on startup.
Hardened the Cloudinary initialization in product.controller.js to ensure the server gracefully falls back to URL-based uploads instead of crashing if default image upload credentials are left in the .env file.

@vercel

vercel Bot commented Jul 19, 2026

Copy link
Copy Markdown

@JayRaut123 is attempting to deploy a commit to the niharika-mente's projects Team on Vercel.

A member of the Team first needs to authorize it.

@JayRaut123

Copy link
Copy Markdown
Author

@niharika-mente please check with my request

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