A full-stack course management platform built with the MERN stack. Features include course creation, student enrollment, lesson management, progress tracking, and a beautiful dark mode interface.
- 📚 Create and manage multiple courses
- 🎬 Upload video lessons with Cloudinary integration
- 👥 View enrolled students and their progress
- 📊 Dashboard with course statistics
- ✏️ Edit and update course content
- 🔍 Browse available courses
- 📖 Enroll in courses
▶️ Watch video lessons- 📈 Track learning progress
- 🆓 Preview free lessons
- 🎯 View personalized dashboard
- 🌙 Dark Mode - Full dark mode support with smooth transitions
- 🔐 JWT-based authentication
- 🎨 Modern UI with Tailwind CSS
- 📱 Responsive design (mobile, tablet, desktop)
- 🔔 Notification system
- ⚙️ User settings & preferences
- 💳 Payment integration with Razorpay
- React.js - UI library
- React Router - Navigation
- Tailwind CSS - Styling
- Lucide React - Icons
- Axios - HTTP client
- React Toastify - Notifications
- Node.js - Runtime environment
- Express.js - Web framework
- MongoDB - Database
- Mongoose - ODM
- JWT - Authentication
- Bcrypt - Password hashing
- Cloudinary - Media storage
- Razorpay - Payment gateway
Before you begin, ensure you have installed:
- Node.js (v14 or higher)
- MongoDB (local or Atlas)
- npm or yarn
git clone https://github.com/Aditya_Gadbail/saas-course-platform.git
cd saas-course-platformcd SERVER
npm installCreate a .env file in the SERVER directory:
cp .env.example .envFill in your environment variables in .env:
PORT=3000
MONGO_URI=your_mongodb_connection_string
JWT_SECRETE=your_jwt_secret_key
NODE_ENV=development
# Cloudinary (for video/image uploads)
CLOUDINARY_CLOUD_NAME=your_cloud_name
CLOUDINARY_API_KEY=your_api_key
CLOUDINARY_API_SECRET=your_api_secret
# Razorpay (for payments)
RAZORPAY_KEY_ID=your_razorpay_key
RAZORPAY_KEY_SECRET=your_razorpay_secretcd FRONTEND
npm installCreate a .env file in the FRONTEND directory:
cp .env.example .envFill in your environment variables:
REACT_APP_BACKEND_URL=http://localhost:3000
REACT_APP_API_URL=http://localhost:3000/apiStart the backend server:
cd SERVER
npm startServer will run on http://localhost:3000
Start the frontend (in a new terminal):
cd FRONTEND
npm startFrontend will run on http://localhost:3002
SAAS-COURSE-PLATFORM/
├── FRONTEND/
│ ├── src/
│ │ ├── components/ # Reusable components
│ │ │ ├── Layout/ # Sidebar, Header, DashboardLayout
│ │ │ ├── Card.jsx
│ │ │ └── Button.jsx
│ │ ├── pages/ # Page components
│ │ │ ├── Student/ # Student pages
│ │ │ ├── Teacher/ # Teacher pages
│ │ │ ├── Auth/ # Login, Register
│ │ │ ├── Profile.jsx
│ │ │ └── Settings.jsx
│ │ ├── context/ # Context providers
│ │ │ ├── AuthContext.jsx
│ │ │ └── apiService.js
│ │ └── App.js # Main app component
│ └── package.json
│
├── SERVER/
│ ├── Controllers/ # Route controllers
│ │ ├── authController.js
│ │ ├── courseController.js
│ │ └── lessonController.js
│ ├── Models/ # Database models
│ │ ├── userSchema.js
│ │ ├── courseSchema.js
│ │ └── lessonSchema.js
│ ├── Routes/ # API routes
│ ├── Middlewares/ # Auth middleware
│ ├── Config/ # Configuration files
│ │ ├── db.js
│ │ ├── cloudinary.js
│ │ └── razorpay.js
│ └── server.js # Entry point
│
├── .gitignore
└── README.md
| Variable | Description | Required |
|---|---|---|
PORT |
Server port number | Yes |
MONGO_URI |
MongoDB connection string | Yes |
JWT_SECRETE |
Secret key for JWT tokens | Yes |
NODE_ENV |
Environment (development/production) | Yes |
CLOUDINARY_CLOUD_NAME |
Cloudinary cloud name | Yes |
CLOUDINARY_API_KEY |
Cloudinary API key | Yes |
CLOUDINARY_API_SECRET |
Cloudinary API secret | Yes |
RAZORPAY_KEY_ID |
Razorpay key ID | Optional |
RAZORPAY_KEY_SECRET |
Razorpay key secret | Optional |
| Variable | Description | Required |
|---|---|---|
REACT_APP_BACKEND_URL |
Backend API URL | Yes |
REACT_APP_API_URL |
Backend API endpoint | Yes |
POST /api/auth/register- Register new userPOST /api/auth/login- Login userPOST /api/auth/logout- Logout userGET /api/auth/user-details- Get user detailsGET /api/auth/is-auth- Check authentication
GET /api/course- Get all coursesGET /api/course/:id- Get course by IDPOST /api/course/create- Create new coursePUT /api/course/:id- Update courseDELETE /api/course/:id- Delete course
GET /api/lessons/course/:id- Get lessons by coursePOST /api/lessons/create- Create new lessonPUT /api/lessons/:id- Update lessonDELETE /api/lessons/:id- Delete lesson
POST /api/enroll/:courseId- Enroll in courseGET /api/enroll/check/:courseId- Check enrollmentGET /api/enroll/courses- Get enrolled courses
GET /api/progress/:courseId- Get course progressPOST /api/progress/update- Update lesson progress
The application features a comprehensive dark mode:
- Toggle dark mode from Settings page
- Preference saved in localStorage
- Smooth transitions between themes
- All components support dark mode
- Browse and enroll in courses
- Watch video lessons
- Track progress
- View dashboard
- Create and manage courses
- Upload lessons
- View student enrollments
- Manage course content
- Full system access
- User management
- Course oversight
- 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 MIT License.
- React documentation
- Tailwind CSS
- MongoDB documentation
- Cloudinary for media storage
- Lucide for beautiful icons
Made with ❤️ by [Aditya Gadbail]