A real-time messaging platform with WebSocket communication, JWT authentication, image uploads, and multilingual support.
Nexus is a robust, full-stack real-time messaging application designed to provide seamless and secure communication. Built with modern web technologies, it features instant messaging capabilities, secure user authentication, and rich media sharing. Whether it's one-on-one chats or handling multilingual users, Nexus is architected to deliver a fast, responsive, and engaging user experience.
- 💬 Real-time Messaging: Lightning-fast communication powered by WebSocket (Socket.io).
- 🔐 Secure Authentication: Robust user login and registration using JWT (JSON Web Tokens).
- 🖼️ Media Sharing: Seamless image uploads and management integrated with Cloudinary.
- 🌍 Multilingual Support: Chat in your preferred language with built-in language support.
- 📱 Responsive Design: A beautiful UI that works perfectly across desktop and mobile devices.
- ⚡ [Feature 1 Placeholder] E.g., Read receipts and typing indicators.
- 👥 [Feature 2 Placeholder] E.g., Group chats and channel creation.
- 🔒 [Feature 3 Placeholder] E.g., End-to-end encryption for maximum privacy.
| Login/Signup | Chat Interface | Profile Settings |
|---|---|---|
| Secure user authentication | Real-time messaging UI | User profile and uploads |
(Replace URL_TO_IMAGE_X with your actual screenshot URLs)
Follow these steps to set up the project locally on your machine.
Ensure you have the following installed:
- Node.js (v16 or higher)
- npm or Yarn
- MongoDB account and cluster
- Cloudinary account for image storage
-
Clone the repository:
git clone https://github.com/YOUR_GITHUB_USERNAME/nexus.git cd nexus -
Install Backend Dependencies:
cd backend npm install -
Install Frontend Dependencies:
cd frontend npm install
Create a .env file in the backend directory and add the following variables:
# Server
PORT=5000
NODE_ENV=development
# Database
MONGODB_URI=your_mongodb_connection_string
# Authentication
JWT_SECRET=your_jwt_secret_key
JWT_EXPIRES_IN=7d
# Cloudinary (Image Uploads)
CLOUDINARY_CLOUD_NAME=your_cloud_name
CLOUDINARY_API_KEY=your_api_key
CLOUDINARY_API_SECRET=your_api_secretRun the backend server:
cd backend
npm run devRun the frontend application:
cd frontend
npm startHere are the primary backend API routes:
POST /api/auth/register- Register a new userPOST /api/auth/login- Authenticate user & get tokenPOST /api/auth/logout- Logout user
GET /api/users/profile- Get current user profilePUT /api/users/profile- Update user profile & avatarGET /api/users- Get list of users for chat
GET /api/messages/:userId- Get conversation history with a userPOST /api/messages/:userId- Send a message to a user
nexus/
├── backend/
│ ├── controllers/ # Route logic
│ ├── middleware/ # Custom middleware (auth, error handling)
│ ├── models/ # Mongoose schemas
│ ├── routes/ # API endpoints
│ ├── utils/ # Helper functions (JWT, Cloudinary)
│ ├── server.js # Entry point
│ └── socket.js # Socket.io configuration
│
└── frontend/
├── public/
├── src/
│ ├── assets/ # Static files (images, icons)
│ ├── components/ # Reusable UI components
│ ├── context/ # React context (Auth, Socket)
│ ├── hooks/ # Custom React hooks
│ ├── pages/ # Application views (Login, Chat)
│ ├── App.js # Main React component
│ └── index.js # React DOM render
└── package.json
Building Nexus was an incredible learning experience that significantly leveled up my full-stack development skills:
- Real-Time Architecture: Mastered implementing stateful, bi-directional communication using
Socket.io, ensuring messages are delivered instantly without polling. - Advanced State Management: Learned how to effectively manage complex global state (like active users, online status, and typing indicators) across the React application.
- Secure Media Handling: Gained hands-on experience integrating third-party APIs by securely uploading and serving user-generated content (images) via Cloudinary.
- JWT Authentication Flow: Deepened my understanding of stateless authentication, securely storing tokens, and protecting private API routes using custom Express middleware.
[Your Name]
- LinkedIn: linkedin.com/in/yourprofile
- GitHub: github.com/yourusername
- Email: your.email@example.com