A full-stack Learning Management System built with the MERN stack. This application features user and admin roles, OTP-based registration, course and lecture management, progress tracking, and payment integration.
🎥 Click the thumbnail above to watch the preview video on YouTube.
user and password:
ansarahemad1220@gmail.com user1@1234
mohammedafzal1213@gmail.com admin@1234
please use it only to see the functionality
- ✅ OTP Email Verification on Registration
- ✅ Role-Based Login: User / Admin / SuperAdmin
- ✅ Admin: Create & Delete Courses, Add & Remove Lectures
- ✅ Razorpay Payment Integration
- ✅ Track User Progress per Lecture
- ✅ JWT Authentication
- ✅ Nodemailer for Password Reset
- ✅ Modern React Frontend with Vite
- ✅ Toast Notifications
| Layer | Tech |
|---|---|
| Frontend | React, Vite, React Router |
| Backend | Node.js, Express.js |
| Database | MongoDB, Mongoose |
| Auth | JWT, Bcrypt |
| Nodemailer | |
| Payment | Razorpay |
| Uploads | Multer |
Create a .env file in the server directory:
RAZORPAY_KEY_ID=
RAZORPAY_KEY_SECRET=
DB=
PORT=
Activation_Secret=
Jwt_Sec=
Gmail=
Password=
Forgot_Secret=
frontendurl=http://localhost:5173
⚠️ Never commit this file. Use environment variables securely.
git clone https://github.com/your-username/mern-lms.git
cd mern-lmscd server
npm install
npm run devcd client
npm install
npm run dev| Role | Permissions |
|---|---|
| User | Enroll, Watch Lectures, Track Progress |
| Admin | Manage Courses and Lectures |
| SuperAdmin | Reserved for future enhancements |
- name, email, password
- role ("user"/"admin")
- mainrole
- subscription: [course refs]
- resetPasswordExpire
- title, description, image, price, duration, category, createdBy
- title, description, video (URL), course ref
- user ref, course ref, completedLectures [lecture refs]
- razorpay_order_id, payment_id, signature
- Admin Analytics Dashboard
- SuperAdmin Control Panel
- Certificates on Course Completion
- Discussion Forum
Pull requests and suggestions are welcome. Fork the repo and open a PR!
MIT License. © 2025 Md Afjal Ansari










