Skip to content

i-himanshu29/studynotion

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

7 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸ“š StudyNotion

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.

Badges

React TailwindCSS Node.js Express.js Redux MongoDB Mongoose Authentication Payment Gateway Cloudinary Nodemailer Environment Variables

Tech Stack

Client: TailwindCSS, React, Redux

Server: Nodejs , Expressjs , MongoDB ,

✨ Key Features

πŸ” Authentication & Authorization

  • Signup/Login with JWT
  • Using OTP
  • Role-based access for Student, Instructor, and Admin

πŸ“š Course Management

  • Instructors can create, edit, and delete courses
  • Upload videos and materials

πŸŽ“ Student Features

  • Browse and search for courses
  • Purchase courses securely
  • Watch course content after enrollment

πŸ›  Admin Features

  • Manage users and courses

🎨 UI/UX

  • Responsive design for all devices
  • Dashboard for instructors & students

πŸ”’ Security

  • Password encryption with bcrypt
  • Protected routes for enrolled content

βœ… Tables to created

  • Users
  • Profile
  • OTP
  • Category
  • Course
  • CourseProgress
  • Section
  • SubSection
  • Rating and Reviews

Security

  • JWT Auth required for Category and Course
  • Instructor check middleware for course creation/deletion
  • API key middleware for accessing /course and /payments

Deliverables checklist

  • 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

API Reference

Authentication Routes

Register User

  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

Send OTP

  GET /api/v1/auth/sendotp
Parameter Type Description
email string Required. The email address where the OTP will be sent

login User

  POST /api/v1/auth/login
Parameter Type Description
email string Required. The name of the email
password string Required. The name of the password

Reset Password Token

  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

Reset Password

  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

Change password

  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

Logout

  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

Forgot password

  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

Profile

delete profile

  DELETE /api/v1/profile/deleteProfile

Update Profile

  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 Users Details

  GET /api/v1/profile/getUserDetails

get Enrolled Courses

  GET /api/v1/profile/getEnrolledCourses

get Instructor Dashboard

  GET /api/v1/profile/instructorDashboard

update Display Picture

  PUT /api/v1/profile/updateDisplayPicture
Parameter Type Description
displayPicture file Required. The new profile picture file to be uploaded

Courses Routes

create course

  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 All courses

  GET /api/v1/course/getAllCourses

Add Section

  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

Update Section

  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 Section

  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

Add SubSection

  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

Update 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 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 Course Details

  GET /api/v1/course/getCourseDetails

GET Full Course Details

  GET /api/v1/course/getFullCourseDetails

Edit Course

  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 Instructor Course

  GET /api/v1/course/getInstructorCourses

Delete Course

  DELETE /api/v1/course/deleteCourse

update course Progress

  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

Create Category

  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

Show all Categories

  GET /api/v1/course/getAllCategories

Category Page Details

  POST /api/v1/course/getCategoryPageDetails
Parameter Type Description
categoryId string Required. The unique identifier of the category

create Rating

  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 Average Rating

  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 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

Contact Routes

contact us

  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

Payment Routes

capture Payment

  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

verify Payment

  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

Send Payment Success Email

  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

Environment Variables

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 =

Installation

Install my-project with npm

  npm install my-project
  cd my-project

Installation

Install 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 nodemon

Running Tests

To run tests, run the following command

  npm start

Run Locally

Clone the project

  git clone https://github.com/i-himanshu29/studynotion.git

Go to the project directory

  cd server

Install dependencies

  npm install

Start the server

  npm run dev

Deployment

The server is deployed on Render and the frontend is deployed on Vercel.

πŸ“½οΈ Demo

Check out the live demo of the project here:
Project Demo

Click the thumbnail above to watch the demo on YouTube.

Screenshots

Some S.S of Landing Page

Landing Page SS-1

Landing Page SS-2

Landing Page SS-3

Landing Page SS-4

Landing Page SS-5

Signup SS

Signup

Login SS

Login

Profile

Profile

Profile

Some SS of Courses

Course

Course

addCourse

Buy Course

Cart Course

πŸ“ Project Structure - BookBazar

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

Hi, I'm Himanshu Maurya! πŸ‘‹

πŸš€ About Me

Hello, I'm Himanshu Maurya, a passionate Software Developer who loves building innovative and efficient software.

πŸ›  Skills

JavaScript , React.js , Tailwindcss , Next.js , Node.js , Express.js , MongoDB , PostgreSql , Redis , Kafka , Deployment , Docker , WebSocket , Testing , Git/GitHub , AWS , etc.

πŸ”— Links

portfolio

linkedin

twitter

Acknowledgements

  • Thanks to [Love Babbar] Bhaiya for the inspiration and guidance for his in-depth knowledge and support for that project.

Appendix

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 .env files.

  • Environment Setup: Make sure to configure your .env file in the server/ 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.

About

This is a ed-tech website which enables users to create account as a Student and Instructor.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors