A full-stack online learning platform built with React, Express, MongoDB, and integrated with Clerk authentication, Cloudinary for media storage, and Stripe for payments.
- π Browse and search courses
- π Enroll in courses with Stripe payment
- π₯ Watch video lectures with progress tracking
- β Rate and review courses
- π Track learning progress
- π³ Secure payment processing
- π Create and manage courses
- π¬ Upload video content via Cloudinary
- π View dashboard with earnings and statistics
- π₯ Track enrolled students
- βοΈ Edit course content and pricing
- ποΈ Delete courses
- React 18 - UI framework
- React Router v6 - Navigation
- Clerk - Authentication and user management
- Axios - HTTP client
- Tailwind CSS - Styling
- Quill - Rich text editor for course descriptions
- React Toastify - Toast notifications
- Vite - Build tool
- Node.js - Runtime
- Express 5 - Web framework
- MongoDB - Database
- Mongoose - ODM for MongoDB
- Clerk Express - Server-side authentication
- Cloudinary - Media storage and CDN
- Stripe - Payment processing
- Multer - File upload handling
- Svix - Webhook verification
SkillBridge/
βββ client/ # Frontend React app
β βββ src/
β β βββ components/ # Reusable components
β β β βββ educator/ # Educator-specific components
β β β βββ student/ # Student-specific components
β β βββ context/ # React context providers
β β βββ pages/ # Page components
β β β βββ educator/ # Educator pages
β β β βββ student/ # Student pages
β β βββ assets/ # Static assets
β βββ public/ # Public assets
β βββ dist/ # Production build
β
βββ server/ # Backend Express API
β βββ config/ # Configuration files
β βββ controllers/ # Request handlers
β βββ middlewares/ # Custom middleware
β βββ models/ # Mongoose models
β βββ routes/ # API routes
β
βββ DEPLOYMENT.md # Deployment guide
βββ ENV_README.md # Environment setup guide
- Node.js 18+ installed
- MongoDB (local or MongoDB Atlas)
- Clerk account for authentication
- Cloudinary account for media storage
- Stripe account (optional, for payments)
- Clone the repository
git clone <your-repo-url>
cd LMS- Install dependencies
# Install client dependencies
cd client
npm install
# Install server dependencies
cd ../server
npm install- Configure environment variables
Client (client/.env.local):
VITE_BACKEND_URL=http://localhost:5000
VITE_CLERK_PUBLISHABLE_KEY=pk_test_your_key_hereServer (server/.env):
PORT=5000
MONGODB_URI=mongodb://localhost:27017
CLERK_SECRET_KEY=sk_test_your_key_here
CLERK_WEBHOOK_SECRET=whk_your_secret_here
CLOUDINARY_NAME=your_cloud_name
CLOUDINARY_API_KEY=your_api_key
CLOUDINARY_SECRET_KEY=your_secret_key
STRIPE_SECRET_KEY=sk_test_your_stripe_key
STRIPE_WEBHOOK_SECRET=whsec_your_webhook_secretSee ENV_README.md for detailed setup instructions.
- Start development servers
Terminal 1 - Backend:
cd server
npm run serverTerminal 2 - Frontend:
cd client
npm run devThe frontend will be available at http://localhost:5173 and the backend at http://localhost:5000.
GET /- Health checkGET /api/course/all- Get all coursesGET /api/course/:courseId- Get course details
GET /api/user/data- Get user dataGET /api/user/enrolled-courses- Get user's enrolled coursesPOST /api/user/checkout- Create Stripe checkout sessionPUT /api/user/update-progress- Update course progressGET /api/user/course-progress/:courseId- Get course progress
POST /api/educator/update-role- Update user role to educatorPOST /api/educator/add-course- Add new courseGET /api/educator/courses- Get educator's coursesGET /api/educator/course/:courseId- Get single course for editingPUT /api/educator/course/:courseId- Update courseDELETE /api/educator/course/:courseId- Delete courseGET /api/educator/dashboard- Get dashboard dataGET /api/educator/enrolled-students- Get enrolled students
POST /clerk- Clerk user sync webhookPOST /stripe- Stripe payment webhook
- Stores user information synced from Clerk
- Tracks enrolled courses
- References: enrolledCourses (Course)
- Course details (title, description, price, discount)
- Course content (chapters and lectures)
- Enrolled students
- Ratings and reviews
- References: educator (User), enrolledStudents (User)
- Payment records
- Links courses to users
- Status tracking (pending, completed, failed)
- References: userId (User), courseId (Course)
- Tracks user progress in courses
- Completed lectures tracking
- References: userId (User), courseId (Course)
See DEPLOYMENT.md for detailed deployment instructions covering:
- Environment variable setup
- Building for production
- Deployment to Vercel/Netlify
- Webhook configuration
- Security checklist
# Build client
cd client
npm run build
# Preview production build
npm run preview
# Start production server
cd ../server
NODE_ENV=production node server.js- Use
npm run server(nodemon) for auto-restart on server changes - Use
npm run dev(Vite) for hot module replacement on client changes
- Check browser console for client-side errors
- Check server terminal for API errors
- Use MongoDB Compass to inspect database
- Use Stripe CLI for webhook testing locally
- ESLint configured for both client and server
- All debug console.log statements removed for production
- Proper error handling with user-facing messages
- Environment variables for all secrets
- 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.
For issues and questions:
- Check DEPLOYMENT.md for deployment issues
- Review ENV_README.md for environment setup
- Open an issue on GitHub
- Clerk for authentication
- Stripe for payment processing
- Cloudinary for media management
- MongoDB Atlas for database hosting