A modern, responsive chat interface built with React.js designed for integration with Wix sites via iframe. Features WhatsApp-style chat bubbles, typing indicators, and seamless integration with your existing OpenAI backend.
- 🎨 Modern Design: Beautiful gradient backgrounds and smooth animations
- 💬 WhatsApp-style Bubbles: User messages (right, blue) and AI messages (left, gray)
- ⏱️ Real-time Features: Typing indicators and timestamp display
- 📱 Mobile Responsive: Optimized for all device sizes
- ⌨️ Keyboard Support: Enter key to send messages
- 🔄 Auto-scroll: Automatically scrolls to latest messages
- 🚀 Easy Integration: Simple iframe integration with Wix
Your Wix Site → iframe (hosted separately) → Custom Chat Interface → Your OpenAI Backend
npm installUpdate the API endpoint in src/App.js:
const response = await fetch('YOUR_WIX_BACKEND_URL/getTeachingAdvice', {
// ... configuration
});npm startnpm run buildEdit package.json and change the homepage URL to your GitHub username:
"homepage": "https://yourusername.github.io/chat-bubble-interface"npm run deploy- Go to your repository settings
- Navigate to Pages section
- Select source as "gh-pages" branch
<iframe
src="https://yourusername.github.io/chat-bubble-interface"
width="400"
height="600"
frameborder="0"
scrolling="no"
style="border-radius: 20px; box-shadow: 0 20px 40px rgba(0,0,0,0.1);">
</iframe>iframe {
border-radius: 20px;
box-shadow: 0 20px 40px rgba(0,0,0,0.1);
border: none;
}The chat interface expects your Wix backend to have a /getTeachingAdvice endpoint that:
- Accepts POST requests with JSON body:
{ "message": "user message" } - Returns JSON response:
{ "response": "AI response text" } - Handles CORS for cross-origin requests
Update the CSS variables in component files to match your brand colors.
Modify the CSS files in src/components/ to customize the appearance.
Extend the App.js component to add features like:
- Message history persistence
- File uploads
- Voice messages
- User authentication
src/
├── components/
│ ├── ChatBubble.js # Individual message display
│ ├── ChatBubble.css # Message styling
│ ├── MessageInput.js # Input field and send button
│ ├── MessageInput.css # Input styling
│ ├── TypingIndicator.js # AI typing animation
│ └── TypingIndicator.css # Typing animation styles
├── App.js # Main chat component
├── App.css # Main app styling
├── index.js # React entry point
└── index.css # Global styles
- Chrome (latest)
- Firefox (latest)
- Safari (latest)
- Edge (latest)
- Mobile browsers (iOS Safari, Chrome Mobile)
- Fork the repository
- Create a feature branch
- Make your changes
- Test thoroughly
- Submit a pull request
MIT License - feel free to use this project for your own applications.
For questions or issues, please open an issue on GitHub or contact the development team.
Built with ❤️ using React.js