Embed script for Andy Chatbot
npm install andychat-scriptThis is the embed script for AndyChat, an AI chatbot widget that can be embedded in any website.
The code follows a modular structure for maintainability:
```
src/
├── index.js # Main entry point
├── js/ # JavaScript modules folder
│ ├── api/ # API-related modules
│ │ ├── index.js # API exports
│ │ └── chatbot.js # Chatbot API functions
│ ├── app.js # Main application class
│ └── modules/ # Feature-specific modules
│ ├── config.js # Configuration settings
│ ├── events.js # Event handlers
│ ├── faq.js # FAQ functionality
│ ├── messages.js # Message rendering and handling
│ ├── styles.js # CSS styles
│ └── ui.js # UI creation and management
Install dependencies:
`bash`
npm install
Start development server with hot reloading:
`bash`
npm run dev
Build for production:
`bash`
npm run build
Add the following code to your website:
`html`
Replace your-chatbot-id` with your actual chatbot ID.
- AI chatbot with customizable settings
- FAQ section for common questions
- Theming support
- Mobile-friendly design
- Shadow DOM for style isolation