andychat-script
v1.0.8
Published
Embed script for Andy Chatbot
Downloads
24
Readme
AndyChat Script
This is the embed script for AndyChat, an AI chatbot widget that can be embedded in any website.
Project Structure
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 managementDevelopment
Install dependencies:
npm installStart development server with hot reloading:
npm run devBuild for production:
npm run buildUsage
Add the following code to your website:
<script>
ANDY_CHATBOT_ID = 'your-chatbot-id'
</script>
<script src="https://unpkg.com/andychat-script@latest/dist/bundle.js"></script>Replace your-chatbot-id with your actual chatbot ID.
Features
- AI chatbot with customizable settings
- FAQ section for common questions
- Theming support
- Mobile-friendly design
- Shadow DOM for style isolation
