A real-time AI ChatBot built using React.js, Node.js, Express.js, Socket.IO, and Google Gemini AI. The application enables users to interact with an AI assistant in real time while maintaining conversation context for more natural responses.
- 💬 Real-time messaging with Socket.IO
- 🤖 AI-powered responses using Google Gemini AI
- 🧠 Short-term conversation memory
- ⚡ Fast bidirectional client-server communication
- 🎨 Clean and responsive user interface
- 🔐 Secure API key management using environment variables
- React.js
- CSS
- Socket.IO Client
- Node.js
- Express.js
- Socket.IO
- Google Gemini AI SDK
- dotenv
AI-ChatBot
│── client
│ ├── src
│ ├── public
│ └── package.json
│
│── server
│ ├── src
│ │ ├── app.js
│ │ ├── service
│ │ │ └── ai.service.js
│ │ └── routes
│ ├── server.js
│ ├── .env
│ └── package.json
│
└── README.md
git clone https://github.com/your-username/AI-ChatBot.gitcd server
npm installcd client
npm installCreate a .env file inside the server folder.
GEMINI_API_KEY=YOUR_API_KEYnpm run devnpm run dev- User enters a message in the React application.
- The message is sent to the server using Socket.IO.
- The server forwards the conversation to Google Gemini AI.
- Gemini generates a response.
- The response is sent back to the client instantly.
- Both user and AI messages are stored in chat history to maintain conversation context.
- React Hooks
- Socket.IO
- Real-Time Communication
- Express.js
- Node.js
- Google Gemini AI Integration
- Event-Driven Programming
- WebSocket Communication