A modern, real-time messaging application built with React, Node.js, and Socket.IO. PingMe V2 allows users to search for other users, view profiles, and engage in real-time conversations with online status indicators.
- User Registration & Login - Secure authentication with JWT tokens
- Password Reset - Email-based password recovery system
- Profile Management - Users can view and manage their profiles
- Profile Photos - Avatar generation using Dicebear API
- Instant Messaging - Real-time chat using Socket.IO
- Message History - Persistent message storage and retrieval
- Typing Indicators - Real-time user activity status
- Message Timestamps - Track when messages were sent
- User Search - Search for users by name or username
- User Profiles - View detailed user profiles with URL parameters (
/profile/:userId) - Online Status - Real-time online/offline user indicators
- User Lists - Browse and discover other users on the platform
- Responsive Design - Mobile-first design using Tailwind CSS
- Dark Theme - Modern dark theme interface
- Real-time Updates - Live status updates and notifications
- Loading States - Smooth loading indicators for better UX
- Toast Notifications - User feedback with React Hot Toast
- React 19.1.0 - Modern React with latest features
- Redux Toolkit - State management
- React Router Dom - Client-side routing
- Socket.IO Client - Real-time communication
- Tailwind CSS - Utility-first CSS framework
- DaisyUI - Tailwind CSS components
- Vite - Fast build tool and development server
- React Hot Toast - Notification system
- React Icons - Icon library
- Axios - HTTP client for API requests
- Node.js - JavaScript runtime
- Express.js - Web application framework
- Socket.IO - Real-time bidirectional communication
- MongoDB - NoSQL database
- Mongoose - MongoDB object modeling
- JWT - JSON Web Token authentication
- Bcrypt - Password hashing
- Nodemailer - Email sending capability
- Handlebars - Email template engine
- CORS - Cross-origin resource sharing
- Cookie Parser - Cookie parsing middleware
PingMe_V2/
βββ Client/ # Frontend React application
β βββ src/
β β βββ components/
β β β βββ Auth/ # Authentication components
β β β β βββ Login.jsx
β β β β βββ Signup.jsx
β β β βββ Home/ # Home page components
β β β β βββ Home.jsx
β β β β βββ Chat/ # Chat functionality
β β β β β βββ Chat.jsx
β β β β β βββ Message.jsx
β β β β β βββ Input.jsx
β β β β βββ Components/ # Reusable components
β β β β βββ List.jsx
β β β β βββ MessageCards.jsx
β β β β βββ SearchUser.jsx
β β β β βββ Profile.jsx
β β β βββ hooks/ # Custom React hooks
β β β βββ getOtherUsers.jsx
β β β βββ useGetMessages.jsx
β β β βββ useGetRealTimeMsg.jsx
β β βββ redux/ # State management
β β β βββ store.js
β β β βββ slices/
β β β βββ userSlice.js
β β β βββ messageSlice.js
β β β βββ socketSlice.js
β β βββ Axios/ # API configuration
β β β βββ axiosInstance.js
β β βββ context/ # React context providers
β β βββ SocketContext.jsx
β βββ public/
β βββ package.json
β
βββ Server/ # Backend Node.js application
βββ controllers/ # Request handlers
β βββ auth.controller.js
β βββ user.controller.js
β βββ messages.controller.js
β βββ socketManager.controller.js
βββ models/ # Database models
β βββ user.model.js
β βββ message.model.js
β βββ conversational.model.js
βββ routes/ # API routes
β βββ auth.routes.js
β βββ user.routes.js
β βββ message.routes.js
β βββ index.js
βββ middlewares/ # Custom middlewares
β βββ authValidation.middleware.js
β βββ verifyToken.middleware.js
βββ services/ # Business logic services
β βββ mailer.services.js
β βββ getIP.js
βββ socket/ # Socket.IO configuration
β βββ socket.js
βββ database/ # Database configuration
β βββ db.js
βββ config/ # Environment configuration
β βββ env.config.js
βββ Email/ # Email templates
β βββ login.handlebars
β βββ register.handlebars
β βββ resetPassword.handlebars
βββ package.json
- Node.js (v16 or higher)
- MongoDB (local or MongoDB Atlas)
- npm or yarn package manager
git clone https://github.com/rohitdeka-1/PingMeV2.git
cd PingMeV2cd Server
npm installCreate a .env file in the Server directory:
PORT=5000
MONGODB_URI=mongodb://localhost:27017/pingme
JWT_SECRET=your_jwt_secret_key
EMAIL_HOST=smtp.gmail.com
EMAIL_PORT=587
EMAIL_USER=your_email@gmail.com
EMAIL_PASS=your_app_passwordStart the backend server:
npm start
# or for development
npm run devcd ../Client
npm installStart the frontend development server:
npm run devThe application will be available at:
- Frontend:
http://localhost:5173(orhttp://localhost:5174if 5173 is busy) - Backend API:
http://localhost:5000
- Register - Create a new account with your email, username, and password
- Login - Sign in to your account
- Search Users - Use the search functionality to find other users
- View Profiles - Click on any user to view their profile
- Start Chatting - Select a user and start real-time messaging
- Use the search bar to find users by name or username
- Browse user profiles by clicking on search results
- See online status indicators (green dot for online users)
- Select any user to start a conversation
- Messages are delivered instantly using Socket.IO
- See when users are online/offline
- Message history is automatically saved
- Access user profiles via
/profile/:userIdURLs - View user information and profile photos
- Share profile links with others
POST /api/v1/auth/register- User registrationPOST /api/v1/auth/login- User loginPOST /api/v1/auth/logout- User logoutPOST /api/v1/auth/forgot-password- Password reset requestPOST /api/v1/auth/reset-password- Password reset confirmation
GET /api/v1/users/search- Search usersGET /api/v1/users/profile/:id- Get user profileGET /api/v1/users/others- Get other users list
POST /api/v1/message/send/:id- Send message to userGET /api/v1/message/:id- Get conversation history
connection- User connects to socketdisconnect- User disconnects from socket
getOnlineUsers- Receive list of online usersnewMessage- Receive new real-time message
The friend request functionality has been intentionally disabled in this version. The following features were removed:
- Friend Requests - Sending and receiving friend requests
- Friend Management - Adding, accepting, or rejecting friends
- Friend Status - Pending, sent, accepted, blocked status
- Friend Lists - Viewing friends and friend requests
Note: The friend system code remains in the codebase but is commented out and can be re-enabled in future versions if needed.
- Fork the repository
- Create your feature branch (
git checkout -b feature/AmazingFeature) - Commit your changes (
git commit -m 'Add some AmazingFeature') - Push to the branch (
git push origin feature/AmazingFeature) - Open a Pull Request
This project is licensed under the ISC License. See the LICENSE file for details.
Rohit Deka (@rohitdeka-1)
- GitHub: @rohitdeka-1
- React team for the amazing framework
- Socket.IO for real-time communication
- MongoDB for the database solution
- Tailwind CSS for the utility-first CSS framework
- All open-source contributors who made this project possible
PingMe V2 - Connecting people through real-time conversations! π¬β¨