A feature-rich, real-time 1-on-1 chat app inspired by WhatsApp. Built with React, Node.js, Express, MongoDB, and Socket.IO, it supports messaging, smart replies, mental health nudges, and test-mode payments using Stripe.
- 🔐 Secure Login & JWT Auth
- 💬 Real-time 1-on-1 Messaging (Socket.IO)
- 🗂 Chat History (MongoDB)
- 🟢 Online Status & Typing Indicator
- 🌘 Dark Mode Toggle
- 🤖 Smart Reply Suggestions (OpenAI)
- 🧘 Mental Health Detection Prompts
- 💸 Stripe Payment Integration (Test Mode)
| Layer | Tech |
|---|---|
| Frontend | React + Tailwind CSS |
| Backend | Node.js + Express |
| Real-Time | WebSockets via Socket.IO |
| Database | MongoDB + Mongoose |
| Auth | JWT + bcrypt |
| AI | OpenAI API |
| Payments | Stripe (Test Mode) |
| Deploy | Vercel (Frontend) + Render (Backend) |
git clone https://github.com/yourusername/whatsapp-clone.git
cd whatsapp-clonecd server
npm install
cp .env.example .envFill in .env:
PORT=5000
MONGO_URI=your_mongodb_uri
JWT_SECRET=your_jwt_secret
OPENAI_API_KEY=your_openai_key
STRIPE_SECRET_KEY=your_stripe_secret_key
Then run:
npm run devcd ../client
npm install
cp .env.example .envFill in .env:
REACT_APP_BACKEND_URL=http://localhost:5000
REACT_APP_STRIPE_PUBLIC_KEY=your_stripe_public_key
Then run:
npm startUse these during test payments:
| Card Type | Number | Exp | CVC |
|---|---|---|---|
| ✅ Success | 4242 4242 4242 4242 | 12/34 | 123 |
| ❌ Declined | 4000 0000 0000 0002 | 12/34 | 123 |
📘 Full list: Stripe Test Cards
POST /api/register– Create userPOST /api/login– Login + get token
POST /api/messages– Send messageGET /api/messages/:from/:to– Get conversation history
POST /api/ai/suggest– Get smart reply suggestionsPOST /api/mental-health/analyze– Analyze tone of conversation
POST /api/payments/send– Create Stripe PaymentIntent
- Messages stored in MongoDB with status (
sent,delivered,seen) - WebSocket room-based user sessions
- AI Smart Replies powered by OpenAI GPT
- Stripe Elements modal integration
- Environment variables used for API keys and secrets
- Media (Images/Files) Sharing
- Group Chats
- Mobile App (React Native)
- Push Notifications (Firebase)
- End-to-End Encryption
- Video/Voice Calling (WebRTC)
- MIT License
- Inspired by WhatsApp UI
- Built with 💙 by Shiva Raghav
If you liked the project, consider giving it a ⭐
Have suggestions or issues? Feel free to open one!