A Chrome extension that provides an AI-powered chat interface for any website. The assistant can scrape the current site's content and use it to provide contextually relevant answers to your questions.
- 🤖 AI-powered chat interface using GPT-4
- 📝 Real-time website content scraping
- 🔍 Context-aware responses based on the current website
- 💨 Fast and lightweight
- 🎯 Domain-specific responses (only uses content from the current site)
- 💬 Streaming responses with typing indicators
chatbot/
├── extension/ # Chrome Extension
│ ├── content.js # Main extension logic
│ ├── content.css # Extension styles
│ ├── popup.html # Popup UI
│ ├── popup.js # Popup logic
│ └── manifest.json # Extension manifest
└── server/ # Backend Server
├── src/
│ ├── index.ts # Main server file
│ └── lib/ # Server utilities
├── db/ # Database logic
├── .env.example # Example environment variables
└── package.json # Server dependencies
- Node.js (v20 or later)
- OpenAI API Key (Get one here)
- Neon PostgreSQL Database (Sign up here)
-
Navigate to the server directory:
cd server -
Install dependencies:
npm install
-
Create a
.envfile with your credentials:OPENAI_API_KEY=your_openai_api_key POSTGRES_URL=your_neon_postgres_url -
Start the server:
npm run dev
- Open Chrome and go to
chrome://extensions/ - Enable "Developer mode"
- Click "Load unpacked"
- Select the
extensiondirectory
- Click the extension icon in your browser
- Click "Scrape Site" to analyze the current webpage
- Ask questions about the website's content
- Get AI-powered responses based on the scraped content
- Uses OpenAI's GPT-4 for generating responses
- Implements vector similarity search for relevant context retrieval
- Stores embeddings in a Neon PostgreSQL database
- Uses streaming responses for a better user experience
OPENAI_API_KEY: Your OpenAI API keyPOSTGRES_URL: Your Neon PostgreSQL connection string
Q: Does this extension work on all websites? A: It works on most public websites, but some sites with heavy JavaScript or dynamic content may have limitations.
Q: Is my data sent to OpenAI? A: Only the content you scrape and your questions are sent to the backend and OpenAI API for processing.
- Fork the repository
- Create a feature branch
- Commit your changes
- Push to the branch
- Open a Pull Request