A full-stack ChatGPT clone built with MERN stack and real-time AI responses.
- 🤖 Real-time AI chat powered by Google Gemini
- 💬 Automatic chat creation (just start typing)
- 📝 Smart chat titles from first message
- 🔄 Live chat history with rename/delete
- 🎨 Modern dark UI like ChatGPT
- ⚡ Socket.io for instant responses
Frontend: React, Redux Toolkit, Tailwind CSS, Socket.io
Backend: Node.js, Express, MongoDB, Socket.io
AI: Google Gemini API
cd Backend
npm install
# Create .env file with:
# MONGODB_URI=your_mongodb_uri
# GEMINI_API_KEY=your_gemini_key
# JWT_SECRET=your_secret
npm run devcd Frontend
npm install
npm run devVisit http://localhost:5173
- Start typing → Chat auto-creates
- Message sent → AI responds in real-time
- Chats saved with smart titles
- Rename/delete chats anytime
POST /api/auth/signup- RegisterPOST /api/auth/login- LoginGET /api/chats- Get all chatsPOST /api/chats- Create chatGET /api/chats/:id/messages- Get messages