A Next.js application that provides AI-powered customer service by scraping website content and answering user questions using Groq's fast LLM models.
- 🌐 Web Scraping: Automatically extracts content from any website URL
- 🤖 AI-Powered Responses: Uses Groq's Llama 3.1 model to provide accurate answers based on website content
- 🌍 Multi-language Support: Supports English, Spanish, French, Chinese, and Hindi
- 💬 Real-time Chat: Interactive chat interface with streaming responses
- 📱 Responsive Design: Modern UI built with Material-UI and Tailwind CSS
- 🔥 Firebase Integration: Stores feedback and chat data
- ⚡ Next.js 14: Built with the latest Next.js features including App Router
- 🚀 Fast AI Responses: Powered by Groq's ultra-fast inference
- Node.js 18+
- npm or yarn
- Groq API key
- Firebase project (optional, for feedback storage)
-
Clone the repository
git clone <repository-url> cd AnyWebSupport-AI-Customer-Service-for-Any-Website
-
Install dependencies
npm install
-
Set up environment variables Create a
.env.localfile in the root directory:# Groq API Key - Get yours from https://console.groq.com/ GROQ_API_KEY=your_actual_groq_api_key_here -
Run the development server
npm run dev
-
Open your browser Navigate to http://localhost:3000
- Homepage: View the landing page with project information
- Dashboard: Click "Get Started" to access the AI chat interface
- Enter Website URL: Provide the URL of the website you want the AI to learn about
- Ask Questions: The AI will answer based on the scraped website content
- Language Support: Switch between different languages using the language buttons
- Feedback: Provide feedback on the AI responses
├── app/
│ ├── api/chat/ # Groq chat API endpoint
│ ├── dashboard/ # Main chat interface
│ ├── [lang]/ # Language-specific translation files
│ ├── globals.css # Global styles
│ ├── i18n.js # Internationalization setup
│ └── layout.js # Root layout component
├── firebase.js # Firebase configuration
├── public/ # Static assets
└── package.json # Dependencies and scripts
POST /api/chat- Handles chat requests with Groq integration
- Frontend: Next.js 14, React 18, Material-UI, Tailwind CSS
- Backend: Next.js API Routes
- AI: Groq LLM (Llama 3.1-8b-instant)
- Database: Firebase Firestore
- Web Scraping: Cheerio
- Internationalization: i18next, react-i18next
- Get your API key from Groq Console
- Add it to
.env.localasGROQ_API_KEY - Groq offers generous free tiers and ultra-fast inference
- Create a Firebase project
- Update
firebase.jswith your configuration - Enable Firestore database
-
"Groq API key not found"
- Ensure
.env.localexists withGROQ_API_KEY - Restart the development server after adding environment variables
- Ensure
-
"Failed to scrape content"
- Check if the URL is accessible
- Some websites may block scraping
-
Build errors
- Clear
node_modulesand reinstall:rm -rf node_modules && npm install
- Clear