A full-stack MERN application that connects students with expert tutors for personalized learning experiences.
- Tutor Search: Find tutors by subject, level, rating, and price
- Session Booking: Book sessions with available time slots
- Interactive Learning: Video sessions with whiteboard and chat
- Progress Tracking: Analytics and performance monitoring
- Payment System: Secure payment processing with Stripe
- Dashboard: Manage sessions, payments, and learning progress
- Profile Management: Create detailed tutor profiles with qualifications
- Availability Management: Set and manage available time slots
- Session Management: Handle bookings, confirmations, and cancellations
- Earnings Tracking: Monitor income and payment history
- Student Reviews: Receive and respond to student feedback
- Authentication: JWT-based secure authentication
- Role-based Access: Different interfaces for students, tutors, and admins
- Real-time Updates: Live session status and notifications
- Responsive Design: Mobile-first approach with Tailwind CSS
- Modern UI: Beautiful interface with shadcn/ui components
- React 18 with TypeScript
- Vite for build tooling
- Tailwind CSS for styling
- Radix UI components for accessibility
- React Router for navigation
- TanStack Query for data fetching
- Framer Motion for animations
- Node.js with Express.js
- MongoDB with Mongoose ODM
- JWT for authentication
- bcryptjs for password hashing
- Stripe for payment processing
- Helmet for security
- CORS for cross-origin requests
- MongoDB Atlas for cloud database
- Mongoose for ODM and schema validation
mytutor-hub/
├── Backend/
│ ├── config/
│ │ └── db.js
│ ├── controllers/
│ │ ├── userController.js
│ │ ├── tutorController.js
│ │ ├── sessionController.js
│ │ └── paymentController.js
│ ├── middlewares/
│ │ └── authMiddleware.js
│ ├── models/
│ │ ├── User.js
│ │ ├── Tutor.js
│ │ ├── Session.js
│ │ ├── Payment.js
│ │ └── Review.js
│ ├── routes/
│ │ ├── userRoutes.js
│ │ ├── tutorRoutes.js
│ │ ├── sessionRoutes.js
│ │ └── paymentRoutes.js
│ ├── server.js
│ └── package.json
├── Frontend/
│ ├── client/
│ │ ├── components/
│ │ │ ├── auth/
│ │ │ ├── ui/
│ │ │ ├── Navbar.tsx
│ │ │ └── Footer.tsx
│ │ ├── contexts/
│ │ │ └── AuthContext.tsx
│ │ ├── pages/
│ │ │ ├── Index.tsx
│ │ │ ├── FindTutor.tsx
│ │ │ ├── BookSession.tsx
│ │ │ ├── StudentDashboard.tsx
│ │ │ ├── TutorDashboard.tsx
│ │ │ └── ...
│ │ ├── hooks/
│ │ └── lib/
│ ├── shared/
│ │ └── api.ts
│ └── package.json
└── README.md
- Node.js (v16 or higher)
- MongoDB (local or Atlas)
- npm or yarn
-
Clone the repository
git clone <repository-url> cd mytutor-hub
-
Install Backend Dependencies
cd Backend npm install -
Install Frontend Dependencies
cd ../Frontend npm install -
Environment Setup
Backend Environment (.env)
MONGO_URI=mongodb://localhost:27017/mytutor JWT_SECRET=your-super-secret-jwt-key-here JWT_EXPIRE=7d PORT=5000 NODE_ENV=development FRONTEND_URL=https://mytutor-hub.onrender.com STRIPE_SECRET_KEY=sk_test_your_stripe_secret_key_here STRIPE_PUBLISHABLE_KEY=pk_test_your_stripe_publishable_key_here STRIPE_WEBHOOK_SECRET=whsec_your_webhook_secret_here
Frontend Environment (.env)
VITE_API_URL=https://mytutor-hub.onrender.com/api VITE_STRIPE_PUBLISHABLE_KEY=pk_test_your_stripe_publishable_key_here
-
Start the Development Servers
Backend Server
cd Backend npm run devFrontend Server
cd Frontend npm run dev -
Access the Application
- Frontend: https://mytutor-hub.onrender.com
- Backend API: https://mytutor-hub.onrender.com/api
- API Health Check: https://mytutor-hub.onrender.com/api/health
POST /api/users/register- User registrationPOST /api/users/login- User loginGET /api/users/profile- Get user profilePUT /api/users/profile- Update user profileGET /api/users/dashboard- Get dashboard data
GET /api/tutors/search- Search tutorsGET /api/tutors/:tutorId- Get tutor detailsPOST /api/tutors/profile- Create tutor profileGET /api/tutors/profile/me- Get own tutor profilePUT /api/tutors/profile- Update tutor profile
POST /api/sessions/book- Book a sessionGET /api/sessions/my-sessions- Get user sessionsGET /api/sessions/:sessionId- Get session detailsPUT /api/sessions/:sessionId/status- Update session status
POST /api/payments/create-intent- Create payment intentPOST /api/payments/confirm- Confirm paymentGET /api/payments/history- Get payment history
The application uses JWT-based authentication with role-based access control:
- Students: Can book sessions, view their dashboard, and manage payments
- Tutors: Can create profiles, manage availability, and handle sessions
- Admins: Full access to all features
The platform integrates with Stripe for secure payment processing:
- Credit/Debit card payments
- Automatic platform fee calculation (10%)
- Secure payment intent creation
- Webhook handling for payment status updates
- Refund processing
Built with modern design principles using:
- shadcn/ui component library
- Tailwind CSS for styling
- Radix UI for accessibility
- Lucide React for icons
- Framer Motion for animations
- Deploy to platforms like Heroku, Railway, or AWS
- Set up MongoDB Atlas for production database
- Configure environment variables
- Set up Stripe webhooks
- Deploy to Vercel, Netlify, or similar platforms
- Configure build settings
- Set up environment variables
- Configure API endpoints
- Fork the repository
- Create a feature branch
- Make your changes
- Add tests if applicable
- Submit a pull request
This project is licensed under the MIT License.
For support and questions:
- Create an issue in the repository
- Contact the development team
- Check the documentation
- Mobile app development with React Native
- AI-powered tutor recommendations
- Video conferencing integration
- Real-time chat system
- Advanced analytics dashboard
- Multi-language support
- Gamification features
MyTutor - Empowering education through technology! 🎓✨