🔍 Overview
Demo: https://react-lms-frontend.vercel.app/
This is a full-stack Learning Management System (LMS) that allows students to browse and enroll in courses, and instructors/admins to create and manage educational content. It supports secure user authentication, payment processing using Stripe, and dynamic dashboards.
✨ Features
- User registration & login (JWT-based)
- Browse and search courses
- Enroll in courses via Stripe Checkout
- Course progress tracking
- Admin dashboard for managing courses
- Webhook support for updating DB after payment
- Mobile-responsive frontend
🧱 Tech Stack
Frontend:
- React (with hooks and context API)
- React Router
- Axios
- TailwindCSS
Backend:
- Node.js
- Express.js
- MongoDB with Mongoose
- Stripe API
- dotenv for config
- JWT for authentication
- Bcrypt for password hashing
🏗 Architecture:
React Frontend <--> Express API <--> MongoDB
|
Stripe API
(Payments + Webhooks)
Frontend: Consumes the REST API, handles routing, and provides UI for users and admins.Backend: Serves endpoints for auth, courses, purchases, etc.Database: Stores users, courses, purchases, etc.
📡 API Endpoints
User
POST /api/user/register
POST /api/user/login
GET /api/user/data
GET /api/user/enrolled-courses
POST
/api/user/purchase
POST
/api/user/update-course-progress-
POST
/api/user/get-course-progress
POST
/api/user/add-rating
Course
GET /api/courses
GET /api/courses/:id
POST /api/courses
PUT /api/courses/:id
DELETE /api/courses/:id
Purchase
POST /api/purchase/:courseId
– Initiates Stripe Checkout sessionPOST /api/webhook/stripe
– Handles payment success/failure
🚀 Usage Guide
Student:
- Register/login
- Browse courses
- Purchase courses
- Access enrolled content
Admin:
- Login
- Create, update, delete courses
- Monitor enrollments
🧠 Future Improvements
- Add course quizzes and certificates
- Add video player progress saving
- Add discussion forums or comments
- Pagination and search filtering
- Role-based access control with middleware
- Admin dashboard analytics