A modern skill exchange platform that connects users based on complementary skills. Users can list skills they have and skills they want to learn, find matching connections, engage in real-time chat, schedule video meetings, and manage subscriptions.
- Skill Matching: Intelligent algorithm to match users based on complementary skills
- Real-time Chat: Instant messaging with Socket.IO for seamless communication
- Video Meetings: Integrated WebRTC-based video conferencing for skill exchange sessions
- User Authentication: Secure JWT-based authentication with email verification
- Connection Management: Send, accept, and manage connection requests
- Subscription Plans: Multiple subscription tiers with payment integration
- User Reporting: Reporting system for moderation and safety
- Real-time Updates: WebSocket-based real-time notifications and messaging
- File Uploads: Cloudinary integration for media storage and CDN delivery
- Rate Limiting: Multi-tier rate limiting for API protection
- Security: Helmet security headers, CORS protection, input validation
- Logging: Structured logging with Winston
- Error Handling: Comprehensive error handling and validation
- React 19 - UI framework
- Material-UI (MUI) - Component library
- Axios - HTTP client
- Socket.IO Client - Real-time communication
- React Router - Client-side routing
- Vite - Build tool
- Node.js - Runtime environment
- Express.js - Web framework
- MongoDB Atlas - Cloud database
- Mongoose - ODM for MongoDB
- Socket.IO - Real-time WebSocket server
- JWT - Authentication
- Winston - Logging
- Express-validator - Input validation
- Helmet - Security headers
- Express-rate-limit - Rate limiting
- Cloudinary - Media storage and CDN
- Brevo (Sendinblue) - Email service
- MongoDB Atlas - Database hosting
Before you begin, ensure you have the following installed:
- Node.js (v18 or higher)
- npm (v9 or higher) or yarn
- MongoDB Atlas account (or local MongoDB instance)
- Cloudinary account
- Brevo account (for email service)
git clone <repository-url>
cd IT-643cd backend
npm installcd ../frontend
npm installCreate a .env file in the backend directory:
# Server Configuration
PORT=5000
NODE_ENV=development
FRONTEND_URL=http://localhost:5173
# Database
MONGODB_URI=your_mongodb_atlas_connection_string
# JWT Authentication
JWT_SECRET=your_jwt_secret_key
JWT_EXPIRES_IN=7d
# Email Service (Brevo)
BREVO_API_KEY=your_brevo_api_key
EMAIL_FROM=[email protected]
# Cloudinary
CLOUDINARY_CLOUD_NAME=your_cloudinary_cloud_name
CLOUDINARY_API_KEY=your_cloudinary_api_key
CLOUDINARY_API_SECRET=your_cloudinary_api_secret
# Razorpay (for payments)
RAZORPAY_KEY_ID=your_razorpay_key_id
RAZORPAY_KEY_SECRET=your_razorpay_key_secret
# Logging
LOG_LEVEL=debugCreate a .env file in the frontend directory:
VITE_API_URL=http://localhost:5000cd backend
npm run devThe backend server will start on http://localhost:5000
cd frontend
npm run devThe frontend will start on http://localhost:5173
cd frontend
npm run buildcd backend
npm startIT-643/
βββ backend/
β βββ config/ # Configuration files
β β βββ cloudinary.js
β β βββ cors.js
β β βββ db.js
β β βββ emailConfig.js
β β βββ helmet.js
β β βββ razorpay.js
β βββ controllers/ # Route controllers
β β βββ authController.js
β β βββ chatController.js
β β βββ connectioncontroller.js
β β βββ meetingController.js
β β βββ messageController.js
β β βββ reportController.js
β β βββ subscriptioncontroller.js
β β βββ userController.js
β βββ middleware/ # Custom middleware
β β βββ authMiddleware.js
β β βββ checkBanned.js
β β βββ errorhandler.js
β β βββ rateLimiter.js
β β βββ upload.js
β βββ models/ # Mongoose models
β β βββ ConnectionRequest.js
β β βββ Meeting.js
β β βββ Message.js
β β βββ Report.js
β β βββ Subscription.js
β β βββ User.js
β βββ routes/ # API routes
β β βββ auth.js
β β βββ chat.js
β β βββ connect.js
β β βββ meeting.js
β β βββ messages.js
β β βββ report.js
β β βββ subscription.js
β β βββ user.js
β βββ services/ # Business logic
β β βββ authService.js
β β βββ connection.js
β β βββ messageService.js
β β βββ realtime.js
β β βββ reportService.js
β β βββ Subscription.js
β β βββ userService.js
β βββ templates/ # Email templates
β β βββ emailStrategies.js
β βββ test/ # Test files
β βββ utils/ # Utility functions
β β βββ logger.js
β β βββ sendEmail.js
β β βββ Subscriptioncron.js
β β βββ validateEnv.js
β β βββ validators.js
β βββ app.js # Express app configuration
β βββ server.js # Server entry point
β βββ socket.js # Socket.IO configuration
β
βββ frontend/
β βββ public/ # Static assets
β βββ src/
β β βββ components/ # Reusable components
β β β βββ ChatArea.jsx
β β β βββ MessageBubble.jsx
β β β βββ Navbar.jsx
β β β βββ UserList.jsx
β β β βββ ...
β β βββ context/ # React contexts
β β β βββ NotificationContext.jsx
β β βββ hooks/ # Custom hooks
β β β βββ useAuth.js
β β βββ pages/ # Page components
β β β βββ Chat/
β β β βββ Dashboard/
β β β βββ login/
β β β βββ Meet/
β β β βββ ...
β β βββ services/ # API services
β β β βββ socket.js
β β βββ theme/ # MUI theme
β β β βββ theme.js
β β βββ utils/ # Utility functions
β β β βββ api.js
β β βββ App.jsx # Main app component
β β βββ main.jsx # Entry point
β βββ index.html
β βββ vite.config.js
β
βββ docs/ # Documentation
β βββ skillxchange_class_diagram.pdf
β βββ Updated_design_document.pdf
β
βββ design.md # Design documentation
βββ README.md # This file
POST /api/auth/register- Register new userPOST /api/auth/login- User loginPOST /api/auth/verify- Verify email
GET /api/user/profile- Get user profilePUT /api/user/profile- Update user profileGET /api/user/:id- Get user by ID
GET /api/connect/suggestions- Get connection suggestionsPOST /api/connect/request- Send connection requestPUT /api/connect/accept/:id- Accept connection requestDELETE /api/connect/reject/:id- Reject connection request
GET /api/messages/:conversationId- Get messages for conversationPOST /api/messages- Send messageDELETE /api/messages/:id- Delete message
GET /api/chat/connections- Get chat connectionsGET /api/chat/conversations- Get user conversations
POST /api/meetings- Create meetingGET /api/meetings/:id- Get meeting detailsDELETE /api/meetings/:id- Delete meeting
GET /api/subscription/plans- Get subscription plansPOST /api/subscription/subscribe- Subscribe to planGET /api/subscription/status- Get subscription status
POST /api/report- Report user
GET /api/health- Health check endpoint
cd backend
npm testnpm test -- auth.integration.test.js- Rate Limiting: Multi-tier rate limiting (API, Auth, Upload)
- Security Headers: Helmet middleware for security headers
- CORS Protection: Environment-specific CORS configuration
- Input Validation: Express-validator with custom strategies
- JWT Authentication: Secure token-based authentication
- Password Hashing: bcrypt for password hashing
- HTTP-only Cookies: Secure cookie storage for tokens
The application uses Winston for structured logging:
- Development: Console logging with colors
- Production: JSON format for log aggregation
- Log Files: Stored in
backend/logs/combined.log- All logserror.log- Error logs only
- Check if MongoDB connection string is correct
- Verify all environment variables are set
- Check if port 5000 is available
- Verify
VITE_API_URLin frontend.envmatches backend URL - Check CORS configuration in backend
- Ensure backend server is running
- Check if Socket.IO server is initialized
- Verify JWT token is valid
- Check browser console for connection errors
- Verify Brevo API key is correct
- Check if sender email is verified in Brevo
- Review email service logs
- Design Document: See design.md for detailed architecture and design decisions
- Frontend Improvements: See frontend/DESIGN_IMPROVEMENTS.md
- 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.
- SkillXChange Development Team
- Material-UI for the component library
- Socket.IO for real-time communication
- MongoDB Atlas for database hosting
- Cloudinary for media storage
- Brevo for email services
For support, email [email protected] or open an issue in the repository.
Made with β€οΈ by the SkillXChange Team