StudyNotion is an EdTech platform where students can buy courses and instructors can create and sell them. It works like a mini Udemy/Skillshare clone, providing authentication, course browsing, purchasing, and learning interfaces.
Client: TailwindCSS, React, Redux
Server: Nodejs , Expressjs , MongoDB ,
- Signup/Login with JWT
- Using OTP
- Role-based access for Student, Instructor, and Admin
- Instructors can create, edit, and delete courses
- Upload videos and materials
- Browse and search for courses
- Purchase courses securely
- Watch course content after enrollment
- Manage users and courses
- Responsive design for all devices
- Dashboard for instructors & students
- Password encryption with bcrypt
- Protected routes for enrolled content
- Users
- Profile
- OTP
- Category
- Course
- CourseProgress
- Section
- SubSection
- Rating and Reviews
- JWT Auth required for Category and Course
- Instructor check middleware for course creation/deletion
- API key middleware for accessing /course and /payments
- Auth + API key (jwt , key generation)
- Courses CRUD with admin check
- Reviews & Cart functionality
- Middleware (JWT , API Key , Admin)
- DB structure & relationships
- Postman collection
- Razorpay , cart, email features
POST /api/v1/auth/signup| Parameter | Type | Description |
|---|---|---|
firstName |
string |
Required. The first name of the user |
lastName |
string |
Required. The last name of the user |
email |
string |
Required. The email address of the user |
password |
string |
Required. The password for the account |
confirmPassword |
string |
Required. Must match the password field |
accountType |
string |
Required. The role of the user (Student/Instructor/Admin) |
otp |
string |
Required. One-Time Password for verification |
GET /api/v1/auth/sendotp| Parameter | Type | Description |
|---|---|---|
email |
string |
Required. The email address where the OTP will be sent |
POST /api/v1/auth/login| Parameter | Type | Description |
|---|---|---|
email |
string |
Required. The name of the email |
password |
string |
Required. The name of the password |
POST /api/v1/auth/reset-password-token| Parameter | Type | Description |
|---|---|---|
email |
string |
Required. The email address for which the password reset token is to be generated |
POST /api/v1/auth/reset-password| Parameter | Type | Description |
|---|---|---|
token |
string |
Required. The password reset token sent to the user's email |
password |
string |
Required. The new password for the account |
confirmPassword |
string |
Required. Must match the password field |
POST /api/v1/auth/changepassword| Parameter | Type | Description |
|---|---|---|
oldPassword |
string |
Required. The current password of the account |
newPassword |
string |
Required. The new password for the account |
confirmNewPassword |
string |
Required. Must match the newPassword field |
POST /api/v1/users/logout| Parameter | Type | Description |
|---|---|---|
token |
string |
Required. The authentication token (JWT) of the logged-in user, sent in the request headers |
POST /api/v1/users/forgot-password| Parameter | Type | Description |
|---|---|---|
email |
string |
Required. The email address of the user to send the password reset link or OTP |
DELETE /api/v1/profile/deleteProfile PUT /api/v1/profile/updateProfile| Parameter | Type | Description |
|---|---|---|
firstName |
string |
Required. The first name of the user |
lastName |
string |
Required. The last name of the user |
dateOfBirth |
string |
Optional. The date of birth of the user in YYYY-MM-DD format |
about |
string |
Optional. A short bio or description about the user |
contactNumber |
string |
Optional. The contact phone number of the user |
gender |
string |
Optional. The gender of the user (Male / Female / Other) |
GET /api/v1/profile/getUserDetails GET /api/v1/profile/getEnrolledCourses GET /api/v1/profile/instructorDashboard PUT /api/v1/profile/updateDisplayPicture| Parameter | Type | Description |
|---|---|---|
displayPicture |
file |
Required. The new profile picture file to be uploaded |
POST /api/v1/course/ceateCourse| Parameter | Type | Description |
|---|---|---|
courseName |
string |
Required. The name of the course |
courseDescription |
string |
Required. A detailed description of the course |
whatYouWillLearn |
string |
Required. A summary of the skills or knowledge the student will gain |
price |
number |
Required. The price of the course |
tag |
array |
Optional. List of tags related to the course |
category |
string |
Required. The ID of the category the course belongs to |
status |
string |
Optional. The publishing status of the course (Draft / Published) |
instructions |
array |
Optional. Additional guidelines or instructions for the course |
GET /api/v1/course/getAllCourses POST /api/v1/course/addSection| Parameter | Type | Description |
|---|---|---|
sectionName |
string |
Required. The name/title of the section |
courseId |
string |
Required. The unique identifier of the course to which the section belongs |
POST /api/v1/course/updateSecton| Parameter | Type | Description |
|---|---|---|
sectionName |
string |
Required. The updated name/title of the section |
sectionId |
string |
Required. The unique identifier of the section to be updated |
DELETE /api/v1/course/deleteSection| Parameter | Type | Description |
|---|---|---|
sectionId |
string |
Required. The unique identifier of the section to be deleted |
courseId |
string |
Required. The unique identifier of the course to which the section belongs |
POST /api/v1/course/addSubSection| Parameter | Type | Description |
|---|---|---|
sectionId |
string |
Required. The unique identifier of the section to which the subsection belongs |
title |
string |
Required. The title of the subsection |
timeDuration |
string |
Required. The duration of the video or lesson (e.g., "10:35") |
description |
string |
Optional. A brief description of the subsection content |
videoFile |
file |
Required. The video file to be uploaded for the subsection |
POST /api/v1/course/updateSubSection| Parameter | Type | Description |
|---|---|---|
subsectionId |
string |
Required. The unique identifier of the subsection to be updated |
title |
string |
Optional. The updated title of the subsection |
timeDuration |
string |
Optional. The updated duration of the video or lesson (e.g., "10:35") |
description |
string |
Optional. The updated description of the subsection content |
videoFile |
file |
Optional. The updated video file for the subsection |
DELETE /api/v1/course/deleteSubSection| Parameter | Type | Description |
|---|---|---|
sectionId |
string |
Required. The unique identifier of the section containing the subsection |
subsectionId |
string |
Required. The unique identifier of the subsection to be deleted |
GET /api/v1/course/getCourseDetails GET /api/v1/course/getFullCourseDetails POST /api/v1/course/editCourse| Parameter | Type | Description |
|---|---|---|
courseId |
string |
Required. The unique identifier of the course to be updated |
courseName |
string |
Optional. The updated name of the course |
courseDescription |
string |
Optional. The updated detailed description of the course |
whatYouWillLearn |
string |
Optional. The updated summary of what students will learn |
price |
number |
Optional. The updated price of the course |
tag |
array |
Optional. Updated list of tags related to the course |
category |
string |
Optional. The updated category ID of the course |
status |
string |
Optional. The updated publishing status (Draft / Published) |
instructions |
array |
Optional. Updated additional guidelines or instructions for the course |
GET /api/v1/course/getInstructorCourses DELETE /api/v1/course/deleteCourse POST /api/v1/course/updateCourseProgress| Parameter | Type | Description |
|---|---|---|
courseId |
string |
Required. The unique identifier of the course whose progress is being updated |
subsectionId |
string |
Required. The unique identifier of the subsection being marked as completed |
POST /api/v1/course/createCategory| Parameter | Type | Description |
|---|---|---|
name |
string |
Required. The name of the category |
description |
string |
Required. A short description of the category |
GET /api/v1/course/getAllCategories POST /api/v1/course/getCategoryPageDetails| Parameter | Type | Description |
|---|---|---|
categoryId |
string |
Required. The unique identifier of the category |
POST /api/v1/course/createRating| Parameter | Type | Description |
|---|---|---|
courseId |
string |
Required. The unique identifier of the course being rated |
rating |
number |
Required. The rating score for the course (1β5, can be decimal) |
review |
string |
Optional. A short written review of the course |
GET /api/v1/course/getAverageRating| Parameter | Type | Description |
|---|---|---|
courseId |
string |
Required. The unique identifier of the course for which to retrieve average rating or all reviews |
GET /api/v1/course/getReviews| Parameter | Type | Description |
|---|---|---|
courseId |
string |
Required. The unique identifier of the course for which to retrieve average rating or all reviews |
POST /api/v1/reach/contact| Parameter | Type | Description |
|---|---|---|
email |
string |
Required. The email address of the user submitting the message |
firstName |
string |
Required. The first name of the user |
lastName |
string |
Required. The last name of the user |
message |
string |
Required. The content of the message or inquiry |
phoneNo |
string |
Required. The phone number of the user |
countryCode |
string |
Required. The international dialing code of the user's country |
POST /api/v1/payment/capturePayment| Parameter | Type | Description |
|---|---|---|
razorpay_payment_id |
string |
Required. The unique payment ID returned by Razorpay after the transaction is initiated |
razorpay_order_id |
string |
Required. The unique order ID generated for the transaction |
razorpay_signature |
string |
Required. The signature generated by Razorpay to verify payment authenticity |
POST /api/v1/payment/verifyPayment| Parameter | Type | Description |
|---|---|---|
razorpay_order_id |
string |
Required. The Razorpay order ID generated during payment initiation |
razorpay_payment_id |
string |
Required. The Razorpay payment ID received after payment completion |
razorpay_signature |
string |
Required. The signature generated by Razorpay to verify the authenticity of the transaction |
courses |
array |
Required. List of course IDs included in the purchase |
POST /api/v1/payment/sendPaymentSuccessEmail| Parameter | Type | Description |
|---|---|---|
orderId |
string |
Required. The unique order ID associated with the payment |
paymentId |
string |
Required. The payment ID generated after successful payment completion |
amount |
number |
Required. The total amount paid for the order |
To run this project, you will need to add the following environment variables to your .env file
PORT =
MONGODB_URL =
JWT_SECRET =
FOLDER_NAME =
MAIL_HOST =
MAIL_USER =
MAIL_PASS =
CLOUDINARY_CLOUD_NAME =
CLOUDINARY_API_KEY =
CLOUDINARY_API_SECRET =
RAZORPAY_KEY_ID =
RAZORPAY_KEY_SECRET =
Install my-project with npm
npm install my-project
cd my-projectInstall my-project with npm
npm install npm install express npm i dotenv npm i express-fileupload npm i bcrypt npm i bcryptjs npm i cookie-parser npm i crypto-random-string npm i jsonwebtoken npm i mongoose npm i node-schedule npm i cors npm i otp-generator npm i nodemailer npm i cloudinary npm i razorpay npm i -D nodemonTo run tests, run the following command
npm startClone the project
git clone https://github.com/i-himanshu29/studynotion.gitGo to the project directory
cd serverInstall dependencies
npm installStart the server
npm run devThe server is deployed on Render and the frontend is deployed on Vercel.
Check out the live demo of the project here:
Click the thumbnail above to watch the demo on YouTube.
studynotion/
β
βββ π client/ # Frontend (React + Tailwind)
β βββ π public/ # Static files
β βββ π src/
β β βββ π assets/ # Images, icons, fonts
β β βββ π components/ # Reusable UI components
β β βββ π pages/ # Page-level components
β β βββ π features/ # Feature-specific components
β β βββ π hooks/ # Custom React hooks
β β βββ π utils/ # Helper functions
β β βββ π services/ # API calls (axios/fetch)
β β βββ π context/ # React Context API
β β βββ π redux/ # Redux slices (if used)
β β βββ App.jsx
β β βββ index.jsx
β β βββ main.jsx
β βββ package.json
β βββ vite.config.js
β
βββ π server/ # Backend (Node.js + Express + MongoDB)
β βββ π config/ # Database & env configuration
β βββ π controllers/ # Business logic for routes
β βββ π models/ # Mongoose schemas
β βββ π routes/ # Express route definitions
β βββ π middleware/ # Auth, error handling
β βββ π utils/ # Helper functions, token generation
β βββ π validators/ # Request validation (Joi/Yup)
β βββ π uploads/ # Uploaded files (images/videos)
β βββ server.js # Entry point
β βββ package.json
β βββ .env
βββ .editorconfig
βββ .gitignore
βββ .nvmrc
βββ .prettierignore
βββ README.md
βββ package.json
βββ prettier.config.js
βββ tailwind.config.js
Hello, I'm Himanshu Maurya, a passionate Software Developer who loves building innovative and efficient software.
JavaScript , React.js , Tailwindcss , Next.js , Node.js , Express.js , MongoDB , PostgreSql , Redis , Kafka , Deployment , Docker , WebSocket , Testing , Git/GitHub , AWS , etc.
- Thanks to [Love Babbar] Bhaiya for the inspiration and guidance for his in-depth knowledge and support for that project.
This section contains additional information and resources related to the StudyNotion project.
-
Technologies Used: React, Tailwind CSS, Redux, Node.js, Express, MongoDB, Mongoose, JWT Authentication, Cloudinary for media uploads, Razorpay for payment gateway integration, Nodemailer for email services, and environment variables managed via
.envfiles. -
Environment Setup: Make sure to configure your
.envfile in theserver/directory with the necessary credentials such as database URL, JWT secret, Cloudinary keys, and Razorpay keys. -
Deployment Details: The frontend is deployed on Vercel, and the backend server is hosted on Render.
-
Future Enhancements: Plans include adding live streaming for courses, real-time live chatting between students and instructors, a live doubt-clearing section, multilingual support, an advanced analytics dashboard for instructors, and integration with additional payment methods.
