A modern, real-time messaging application inspired by Facebook Messenger.
- 🔐 User Authentication - Secure login/signup with JWT tokens
- 💬 Real-time Messaging - Instant message delivery with Socket.io
- 📋 Conversation List - View and manage active conversations
- 📚 Message History - Persistent storage of all conversations
- 🎨 Modern UI - Clean, responsive design inspired by Messenger
- ⚡ Real-time Updates - Live conversation updates and online status
- Frontend: React 18 + TypeScript + Tailwind CSS
- Backend: Node.js + Express + Socket.io
- Database: SQLite (easily upgradeable to PostgreSQL)
- Authentication: JWT tokens
- Real-time: WebSocket connections
-
Install all dependencies:
npm run install:all
-
Start the development server:
npm run dev
Or use the convenience script:
./start.sh
-
Open your browser:
- Frontend: http://localhost:3000
- Backend API: http://localhost:5000
To test real-time messaging across multiple devices:
-
Find your network IP:
./network-info.sh
-
Access from other devices:
- Make sure all devices are on the same WiFi network
- On your phone/tablet/other computer, go to: http://192.168.72.109:3000
- Create separate user accounts on each device
- Start chatting in real-time!
-
Troubleshooting network access:
- Check firewall settings on your computer
- Ensure devices are on the same WiFi network
- Try temporarily disabling firewall if connection fails
To access the app from other devices on your network:
-
Find your computer's IP address:
# On Linux/macOS hostname -I # On Windows ipconfig
-
Access from other devices:
- Frontend: http://YOUR_IP:3000
- Backend API: http://YOUR_IP:5000
Example: If your IP is 192.168.1.100:
- Frontend: http://192.168.1.100:3000
- Backend API: http://192.168.1.100:5000
- ✅ Fixed real-time messaging: Messages now appear instantly for both sender and recipient
- ✅ Fixed online status indicators: Users now show as online/offline accurately in real-time
- ✅ Fixed timestamp issues: All timestamps now display correctly with proper timezone handling
- ✅ Improved socket handling: Better connection management and error handling
- ✅ Modern dark mode: Complete dark theme with glassmorphism effects
- ✅ Better animations: Smooth transitions and hover effects
- ✅ Enhanced visual indicators: Improved online status, typing indicators, and message bubbles
The app is now running successfully! Here's how to test it:
- Open http://localhost:3000 in your browser
- Click "Sign up" to create a new account
- Fill in email, username, and password
- You'll be automatically logged in
- Open a second browser window/tab in incognito mode
- Go to http://localhost:3000 and create another user account
- In the first window, click the "+" button to start a new conversation
- Search for the second user by username or email
- Click on the user to start a conversation
- Send messages back and forth between the two windows
- Notice real-time delivery and typing indicators!
- ✅ Real-time messaging works instantly
- ✅ Typing indicators show when someone is typing
- ✅ Online/offline status indicators
- ✅ Message history persists on refresh
- ✅ Conversation list updates in real-time
- ✅ Responsive design works on mobile
Your messenger app is fully functional with all requested features!
messenger-app/
├── client/ # React frontend
├── server/ # Node.js backend
├── package.json # Root package.json for scripts
└── README.md # This file
npm run dev- Start both frontend and backend in development modenpm run client:dev- Start only the React frontendnpm run server:dev- Start only the Node.js backendnpm run build- Build the React app for production
- User registration with email and password
- Secure login with JWT tokens
- Protected routes and API endpoints
- Real-time message delivery
- Message history persistence
- Conversation management
- Online/offline user status
- Responsive design for all screen sizes
- Modern, clean interface
- Real-time updates without page refresh
- Message status indicators