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