- πΈ Platform Showcase
- β¨ Features
- π οΈ Tech Stack
- π Getting Started
- π Project Structure
- π API Endpoints
- π¨ Key Features Explained
- π§ Configuration
- π§ͺ Testing
- π§― Common Setup Errors & Fixes
- π’ Deployment
- π€ Contributing
- π License
- π Smart Mentor Discovery - Find mentors based on skills, expertise, and ratings
- π Session Booking - Schedule 1-on-1 mentoring sessions with ease
- π¬ Real-time Chat - Instant messaging with mentors using Stream Chat
- π₯ Video Conferencing - High-quality video sessions powered by ZegoCloud
- π Task Management - Track assignments and progress with your mentor
- π Karma System - Earn points for profile completion, sessions, and engagement
- π Community Forum - Ask questions and get answers from the community
- π Progress Tracking - Monitor your learning journey and achievements
- π Mentee Management - Manage all your students in one place
- β° Session Scheduling - Control your availability and bookings
- π° Earnings Dashboard - Track your income and payment history
- π Analytics - View session stats and student progress
- βοΈ Profile Customization - Showcase your skills, experience, and social links
- π― Task Assignment - Create and track tasks for your mentees
- β Reviews & Ratings - Build your reputation through student feedback
- π¬ Direct Messaging - Stay connected with your mentees
- π Secure Authentication - JWT-based auth with Google OAuth integration
- π¨ Modern UI/UX - Beautiful dark theme with smooth animations
- π± Responsive Design - Works seamlessly on desktop, tablet, and mobile
- β‘ Real-time Updates - Live notifications and instant messaging
- π Smart Notifications - Stay updated on bookings, messages, and tasks
- π³ Payment Integration - Secure payment processing with Razorpay
- π Skill-based Matching - Connect with mentors in your field of interest
| Technology | Purpose | Version |
|---|---|---|
| React | UI Framework | 19.1.1 |
| Vite | Build Tool | 7.1.7 |
| TailwindCSS | Styling | 3.4.18 |
| React Router | Navigation | 7.9.6 |
| Axios | HTTP Client | 1.13.2 |
| Socket.io Client | Real-time Communication | 4.8.1 |
| Stream Chat | Messaging Service | 9.26.1 |
| ZegoCloud | Video Conferencing | 2.17.1 |
| Framer Motion | Animations | 12.23.26 |
| Lucide React | Icons | 0.553.0 |
| React Toastify | Notifications | 11.0.5 |
| JWT Decode | Token Management | 4.0.0 |
| Date-fns | Date Utilities | 4.1.0 |
| Technology | Purpose | Version |
|---|---|---|
| Node.js | Runtime | >=18.0.0 |
| Express | Web Framework | 5.1.0 |
| MongoDB | Database | 8.19.3 |
| Mongoose | ODM | 8.19.3 |
| Socket.io | WebSocket Server | 4.7.5 |
| JWT | Authentication | 9.0.2 |
| Bcrypt | Password Hashing | 6.0.0 |
| Cloudinary | Image Storage | 2.8.0 |
| Razorpay | Payment Gateway | 2.9.6 |
| Nodemailer | Email Service | 6.9.16 |
| Zod | Validation | 4.1.12 |
Before you begin, ensure you have the following installed:
git clone https://github.com/arshchouhan/MentorLink.git
cd MentorLinkcd Backend
npm installCreate a .env file in the Backend directory:
# Server Configuration
PORT=4000
NODE_ENV=development
# Database
MONGO_URI=mongodb://localhost:27017/mentorlink
# Authentication
JWT_SECRET=your_super_secret_jwt_key_here
# Cloudinary (Image Upload)
CLOUDINARY_CLOUD_NAME=your_cloud_name
CLOUDINARY_API_KEY=your_api_key
CLOUDINARY_API_SECRET=your_api_secret
# Payment Gateway
RAZORPAY_KEY_ID=your_razorpay_key
RAZORPAY_KEY_SECRET=your_razorpay_secret
# Email Service
EMAIL_USER=your_email@gmail.com
EMAIL_PASS=your_app_password
# Stream Chat
STREAM_API_KEY=your_stream_api_key
STREAM_API_SECRET=your_stream_api_secret
# Google OAuth
GOOGLE_CLIENT_ID=your_google_client_id
GOOGLE_CLIENT_SECRET=your_google_client_secret
# Java Microservices (Optional)
JAVA_KARMA_API=http://localhost:8081/api/karmacd ../Frontend
npm installCreate a .env.local file in the Frontend directory:
VITE_API_URL=http://localhost:4000/api
VITE_STREAM_CHAT_API_KEY=your_stream_api_key
VITE_GOOGLE_CLIENT_ID=your_google_client_id
VITE_RAZORPAY_KEY_ID=your_razorpay_keyStart Backend Server:
cd Backend
npm run dev
# Server runs on http://localhost:4000Start Frontend Development Server:
cd Frontend
npm run dev
# App runs on http://localhost:5173Frontend/
βββ src/
β βββ assets/ # Images, logos, and static files
β β βββ Logo.png
β β βββ MentorDahboard.png
β β βββ studentdashbaordimage.png
β β βββ connect*.png
β βββ components/ # Reusable React components
β β βββ Chat/ # Chat components
β β βββ Forum/ # Forum components
β β βββ StudentChat/ # Student chat components
β β βββ ...
β βββ config/ # Configuration files
β β βββ apiConfig.js # Backend switcher (Node.js/Java)
β β βββ zegoConfig.js # Video conference config
β βββ context/ # React Context providers
β βββ hooks/ # Custom React hooks
β βββ pages/ # Page components
β β βββ MentorDashboard.jsx
β β βββ StudentDashboard.jsx
β β βββ MeetingRoomZego.jsx
β β βββ ...
β βββ services/ # API service layer
β β βββ authService.js
β β βββ messageService.js
β β βββ forumService.js
β β βββ ...
β βββ utils/ # Utility functions
β βββ App.jsx # Main app component
β βββ main.jsx # Entry point
βββ package.json
βββ vite.config.js
Backend/
βββ config/
β βββ db.js # MongoDB connection
βββ controllers/ # Route controllers
β βββ auth.controller.js
β βββ mentor.controller.js
β βββ user.controller.js
β βββ message.controller.js
β βββ forum.controller.js
β βββ ...
βββ models/ # Mongoose schemas
β βββ user.model.js
β βββ mentorProfile.model.js
β βββ booking.model.js
β βββ message.model.js
β βββ ...
βββ routes/ # API routes
β βββ auth.routes.js
β βββ mentor.routes.js
β βββ message.routes.js
β βββ ...
βββ middleware/
β βββ auth.middleware.js # JWT authentication
βββ socket/ # Socket.IO handlers
β βββ socketHandlers.js # Meeting rooms
β βββ chatSocketHandlers.js # Chat messaging
βββ utils/
β βββ generateToken.js
βββ index.js # Server entry point
βββ package.json
POST /api/auth/register # Register new user
POST /api/auth/login # Login user
POST /api/auth/google # Google OAuth login
POST /api/auth/logout # Logout user
POST /api/auth/forgot-password # Request password reset
POST /api/auth/reset-password # Reset passwordGET /api/user/me # Get current user
PUT /api/user/student # Update student profile
GET /api/user/:id # Get user by IDGET /api/mentors # Get all mentors (with filters)
GET /api/mentors/:id # Get mentor by ID
POST /api/mentors # Create/update mentor profile
POST /api/mentors/upload-photo # Upload profile photo
DELETE /api/mentors/upload-photo # Remove profile photoPOST /api/bookings # Create booking
GET /api/bookings # Get user's bookings
GET /api/bookings/mentor # Get mentor's bookings
POST /api/bookings/:id/join # Join session
PUT /api/bookings/:id/status # Update booking statusGET /api/messages/conversations # Get all conversations
GET /api/messages/conversations/:id/messages # Get messages
POST /api/messages/send # Send message
PUT /api/messages/conversations/:id/read # Mark as readGET /api/forum/questions # Get all questions
POST /api/forum/questions # Create question
GET /api/forum/questions/:id # Get question by ID
POST /api/forum/questions/:id/answer # Answer question
POST /api/forum/questions/:id/upvote # Upvote questionGET /api/tasks # Get mentor's tasks
POST /api/tasks # Create task
PUT /api/tasks/:id # Update task
DELETE /api/tasks/:id # Delete task
GET /api/tasks/mentee/:id # Get mentee's tasks- ZegoCloud Integration - Professional video/audio quality
- Screen Sharing - Share your screen during sessions
- Real-time Chat - Text chat during video calls
- Custom Branding - Themed to match platform design
- Stream Chat SDK - Enterprise-grade messaging
- Message Types - Normal, questions, insights, advice, action items
- Read Receipts - Know when messages are read
- Typing Indicators - See when others are typing
- Message History - All conversations saved to database
Earn karma points for various activities:
- β Profile Completion - 50 points
- β Session Completed - 30 points
- β Message Sent - 5 points
- β Skill Added - 10 points
- β Goal Set - 15 points
- Create Tasks - Mentors assign tasks to mentees
- Track Progress - Monitor completion percentage
- Status Updates - Not Started β In Progress β Pending Review β Completed
- Priority Levels - High, Medium, Low
The platform supports switching between Node.js and Java backends. Edit Frontend/src/config/apiConfig.js:
const ACTIVE_BACKEND = 'nodejs'; // or 'java'
const BACKEND_URLS = {
nodejs: 'http://localhost:4000/api',
java: 'http://localhost:8081/api'
};Customize video conference theme in Frontend/src/config/zegoConfig.js:
- Colors, branding, and UI elements
- Matches platform's dark theme with indigo accents
cd Frontend
npm run lintcd Backend
npm run dev- Create a booking between mentor and student
- Click "Join Session" when session time arrives
- Both users should connect to the same room
- Open mentor and student dashboards in separate windows
- Send messages from either side
- Messages should appear instantly
cd Frontend
npm run build
# Deploy the 'dist' foldercd Backend
# Set environment variables on hosting platform
npm startThis section helps contributors quickly diagnose common issues encountered during local setup.
Cause:
- Missing or incorrect
.envvalues inBackend/.env
Fix:
- Ensure all required variables (like
MONGO_URI,JWT_SECRET) are defined - Restart server after updating env:
npm run devCause:
VITE_API_URLinFrontend/.env.localis incorrect
Fix:
- Make sure it matches backend port:
VITE_API_URL=http://localhost:4000/apiCause:
- MongoDB not running locally
Fix:
- Start MongoDB service:
mongodCause:
- Another process using port
4000or5173
Fix:
- Change port in
.env
PORT=5000- Or kill existing process:
npx kill-port 4000Cause:
- Old Node.js version
Fix:
- Ensure Node.js β₯ 18:
node -vContributions are welcome! Please follow these steps:
- Fork the repository
- Create a 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.
Arsh Chauhan
- GitHub: @arshchouhan
- Email: arshchouhan004@gmail.com
- React Team - For the amazing framework
- Vite - For blazing fast build tool
- TailwindCSS - For utility-first CSS
- ZegoCloud - For video conferencing SDK
- Stream - For chat infrastructure
- MongoDB - For flexible database
- All Contributors - For making this project better




