A modern, intelligent chatbot platform powered by Google's Gemini 2.0 Flash AI. Features a sleek, responsive interface with real-time conversations, image analysis capabilities, and emoji support.
- 🧠 AI-Powered Conversations — Powered by Google Gemini 2.0 Flash for intelligent, context-aware responses
- 🖼️ Image Analysis — Upload and analyze images directly in the chat
- 😊 Emoji Picker — Built-in emoji picker using Emoji Mart for expressive messaging
- 📱 Fully Responsive — Seamless experience across desktop, tablet, and mobile devices
- 🎨 Modern UI/UX — Beautiful gradient design with smooth animations and glassmorphism effects
- 💬 Real-time Chat — Instant messaging with typing indicators
- 📜 Chat History — Maintains conversation context for coherent discussions
| Technology | Purpose |
|---|---|
| HTML5 | Structure & Semantics |
| Tailwind CSS | Utility-first styling |
| Vanilla JavaScript | Core functionality |
| Google Gemini API | AI responses |
| Emoji Mart | Emoji picker integration |
| Google Material Icons | UI icons |
-
Clone the repository
git clone https://github.com/iamchandanchaudhary/ai-chatbot.git cd ai-chatbot -
Install dependencies
npm install
-
Start the development server
npm start
This will watch for CSS changes and compile Tailwind CSS automatically.
-
Open
index.htmlin your browser or use a live server extension.
The chatbot uses Google's Gemini API. To use your own API key:
- Get an API key from Google AI Studio
- Open
src/script.js - Replace the existing API key:
const API_KEY = "YOUR_API_KEY_HERE";
⚠️ Security Note: For production, store API keys in environment variables or a backend server.
ai-chatbot/
├── index.html # Main HTML file
├── input.css # Tailwind input file
├── output.css # Compiled Tailwind CSS
├── tailwind.config.js # Tailwind configuration
├── package.json # Project dependencies
├── readme.md # Documentation
└── src/
├── script.js # Main JavaScript logic
├── style.css # Custom CSS & animations
├── chandanInfo.js # Personal info module (optional)
└── assets/ # Images & SVG icons
├── botavatar.svg
├── botface.svg
└── c2logo*.png
- Elegant header with status indicator
- Smooth message animations
- Custom scrollbar styling
- Gradient backgrounds with glassmorphism
- User Messages — Purple gradient styling with right alignment
- Bot Messages — Gray gradient with bot avatar and left alignment
- Image Attachments — Rounded preview with shadow effects
- Animated thinking indicator (bouncing dots)
- Emoji picker with smart positioning
- Image upload with preview and cancel option
- Send button with pulse animation
Contributions are welcome! Feel free to:
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
This project is open source and available under the MIT License.
Chandan Chaudhary
- Portfolio: chandanchaudhary-portfolio.netlify.app
- GitHub: @iamchandanchaudhary
- LinkedIn: Chandan Chaudhary
- YouTube: @c2explains
Made with ❤️ by Chandan Chaudhary
