feat(chatbot): add AI-powered landing page assistant with FAQ suggestions and styled UI#116
Conversation
|
@SanikaDahiwal is attempting to deploy a commit to the participationcorner2025-8967's projects Team on Vercel. A member of the Team first needs to authorize it. |
📝 SummaryThe provided pull request introduces a new chat widget feature to the FlipTrack application. The chat widget is implemented using Remix and Prisma, and it includes a floating button, chat window, and input box. The chat widget also includes suggested questions and a local FAQ match function to provide fast responses. The changes include updates to the 📂 Files Changed
🎭 Code PoemCode changes abound, a new feature's found, 🚨 Bugs & Architectural Violations* The `app/routes/api.chat.ts` file uses `any` as the type for the `request` parameter, which can lead to type errors and should be replaced with a more specific type. * The `app/blocks/home/ChatWidget.tsx` file uses the `useState` hook to store the chat messages, but it does not handle the case where the user closes the chat window and then reopens it. This can cause the chat messages to be lost. * The `app/blocks/home/ChatWidget.module.css` file uses the `box-shadow` property to create a glow effect, but this can cause performance issues on low-end devices. Consider using the `transform` property instead. * The `app/routes/api.chat.ts` file returns a response with a status code of 500 when an error occurs, but it does not provide any additional error information. Consider adding more detailed error messages to help with debugging. * The `app/blocks/home/ChatWidget.tsx` file does not include any accessibility features, such as ARIA attributes, to make the chat widget accessible to users with disabilities.💡 Suggestions & Best Practices* Consider adding a loading indicator to the chat widget to indicate when the chat API is being called. * Consider adding a feature to allow the user to upload files or images to the chat widget. * Consider adding a feature to allow the user to delete or edit their previous messages. * Consider using a more robust error handling mechanism, such as a try-catch block, to handle errors that occur when calling the chat API. * Consider adding more detailed logging to the chat API to help with debugging and monitoring. * Consider using a library or framework, such as React Query, to handle the chat API calls and caching. * Consider adding a feature to allow the user to customize the appearance of the chat widget, such as changing the color scheme or font size. |
|
Hi @rushikesh-bobade |
|
@SanikaDahiwal0015 Thank you for getting this PR up so quickly! The glassmorphic UI and the pill-shaped suggestion buttons look incredibly premium and perfectly match the FlipTrack brand. Great job! Before we can merge this, there are a few architectural adjustments we need you to make:
Once you push those 3 minor fixes to your branch, we'll get this merged immediately! |
|
Codesense Ai: This PR is too large to review automatically. A human maintainer will take a look! |
|
Thanks again for the review! I've addressed the requested changes:
The updates have been pushed to the same PR. |
|
Thanks for addressing those initial architectural points! However, after doing a deep code review and testing the widget, there are a few critical logic bugs and UI issues we need to fix before this meets the FlipTrack production standard. 1. Merge Conflict in .env.exampleWe just merged another PR that modified 2. Completely Broken FAQ Matching (Logic Bug)In 3. Echo Bot Fallback (Architecture Flaw)In 4. Missing Auto-ScrollWhen a user asks multiple questions, the chat window does not automatically scroll to the bottom. You need to use a React 5. UI/UX Overhaul NeededWe hold FlipTrack to a very high standard of modern SaaS design, and the current UI feels a bit too raw and retro. Please revamp
Once you resolve the merge conflict, fix the case-sensitivity bug, update the API fallback, and give the UI a modern premium facelift, this will be ready to merge! Let me know if you need any help with the CSS or auto-scrolling logic! |
🧾 PR Description
This PR introduces a floating AI chatbot assistant on the FlipTrack landing page to improve user onboarding and product understanding. It provides instant answers to common questions using a hybrid approach (FAQ-based responses + API-ready structure).
✨ Features Added
💬 Floating chatbot widget on landing page
⚡ Quick suggestion prompts for common FlipTrack questions
🧠 Hybrid response system (FAQ-ready structure + API integration support)
🎨 Styled UI using brand color #00ff88
✨ Modern pill-shaped suggestion buttons with hover effects
📱 Responsive design for mobile and desktop
⏳ Loading state (“Typing…” indicator)
🧩 Starter Questions Included
What is FlipTrack?
Who is FlipTrack designed for?
How does inventory tracking work?
How are profits calculated?
What AI features are available?
How do I get started?
🎨 UI Improvements
Neon green theme (#00ff88) aligned with FlipTrack branding
Glassmorphic chat window design
Hover glow effects on suggestion chips
Smooth open/close transitions
⚙️ Technical Notes
Built using React + TypeScript
Modular CSS (no external UI library dependency)
Structured for future Groq AI / Vercel AI SDK integration
Clean separation of UI and message logic
🚀 Future Improvements (optional roadmap)
Integrate Groq LLM streaming responses
Add rate limiting for API safety
Smart context-aware replies based on inventory data
Analytics for user questions
📸 Screenshots
Issue <#109>