├── .env.example ├── .gitignore ├── LICENSE ├── README.md ├── package-lock.json ├── package.json ├── public ├── Logo-Full-Light.png ├── Logo-Small-Light.png ├── android │ ├── android-launchericon-144-144.png │ ├── android-launchericon-192-192.png │ ├── android-launchericon-48-48.png │ ├── android-launchericon-512-512.png │ ├── android-launchericon-72-72.png │ └── android-launchericon-96-96.png ├── index.css ├── index.html ├── ios │ ├── 100.png │ ├── 1024.png │ ├── 114.png │ ├── 120.png │ ├── 128.png │ ├── 144.png │ ├── 152.png │ ├── 16.png │ ├── 167.png │ ├── 180.png │ ├── 192.png │ ├── 20.png │ ├── 256.png │ ├── 29.png │ ├── 32.png │ ├── 40.png │ ├── 50.png │ ├── 512.png │ ├── 57.png │ ├── 58.png │ ├── 60.png │ ├── 64.png │ ├── 72.png │ ├── 76.png │ ├── 80.png │ └── 87.png ├── manifest.json ├── robots.txt ├── service-worker.js └── windows11 │ ├── LargeTile.scale-100.png │ ├── LargeTile.scale-125.png │ ├── LargeTile.scale-150.png │ ├── LargeTile.scale-200.png │ ├── LargeTile.scale-400.png │ ├── SmallTile.scale-100.png │ ├── SmallTile.scale-125.png │ ├── SmallTile.scale-150.png │ ├── SmallTile.scale-200.png │ ├── SmallTile.scale-400.png │ ├── SplashScreen.scale-100.png │ ├── SplashScreen.scale-125.png │ ├── SplashScreen.scale-150.png │ ├── SplashScreen.scale-200.png │ ├── SplashScreen.scale-400.png │ ├── Square150x150Logo.scale-100.png │ ├── Square150x150Logo.scale-125.png │ ├── Square150x150Logo.scale-150.png │ ├── Square150x150Logo.scale-200.png │ ├── Square150x150Logo.scale-400.png │ ├── Square44x44Logo.altform-lightunplated_targetsize-16.png │ ├── Square44x44Logo.altform-lightunplated_targetsize-20.png │ ├── Square44x44Logo.altform-lightunplated_targetsize-24.png │ ├── Square44x44Logo.altform-lightunplated_targetsize-256.png │ ├── Square44x44Logo.altform-lightunplated_targetsize-30.png │ ├── Square44x44Logo.altform-lightunplated_targetsize-32.png │ ├── Square44x44Logo.altform-lightunplated_targetsize-36.png │ ├── Square44x44Logo.altform-lightunplated_targetsize-40.png │ ├── Square44x44Logo.altform-lightunplated_targetsize-44.png │ ├── Square44x44Logo.altform-lightunplated_targetsize-48.png │ ├── Square44x44Logo.altform-lightunplated_targetsize-60.png │ ├── Square44x44Logo.altform-lightunplated_targetsize-64.png │ ├── Square44x44Logo.altform-lightunplated_targetsize-72.png │ ├── Square44x44Logo.altform-lightunplated_targetsize-80.png │ ├── Square44x44Logo.altform-lightunplated_targetsize-96.png │ ├── Square44x44Logo.altform-unplated_targetsize-16.png │ ├── Square44x44Logo.altform-unplated_targetsize-20.png │ ├── Square44x44Logo.altform-unplated_targetsize-24.png │ ├── Square44x44Logo.altform-unplated_targetsize-256.png │ ├── Square44x44Logo.altform-unplated_targetsize-30.png │ ├── Square44x44Logo.altform-unplated_targetsize-32.png │ ├── Square44x44Logo.altform-unplated_targetsize-36.png │ ├── Square44x44Logo.altform-unplated_targetsize-40.png │ ├── Square44x44Logo.altform-unplated_targetsize-44.png │ ├── Square44x44Logo.altform-unplated_targetsize-48.png │ ├── Square44x44Logo.altform-unplated_targetsize-60.png │ ├── Square44x44Logo.altform-unplated_targetsize-64.png │ ├── Square44x44Logo.altform-unplated_targetsize-72.png │ ├── Square44x44Logo.altform-unplated_targetsize-80.png │ ├── Square44x44Logo.altform-unplated_targetsize-96.png │ ├── Square44x44Logo.scale-100.png │ ├── Square44x44Logo.scale-125.png │ ├── Square44x44Logo.scale-150.png │ ├── Square44x44Logo.scale-200.png │ ├── Square44x44Logo.scale-400.png │ ├── Square44x44Logo.targetsize-16.png │ ├── Square44x44Logo.targetsize-20.png │ ├── Square44x44Logo.targetsize-24.png │ ├── Square44x44Logo.targetsize-256.png │ ├── Square44x44Logo.targetsize-30.png │ ├── Square44x44Logo.targetsize-32.png │ ├── Square44x44Logo.targetsize-36.png │ ├── Square44x44Logo.targetsize-40.png │ ├── Square44x44Logo.targetsize-44.png │ ├── Square44x44Logo.targetsize-48.png │ ├── Square44x44Logo.targetsize-60.png │ ├── Square44x44Logo.targetsize-64.png │ ├── Square44x44Logo.targetsize-72.png │ ├── Square44x44Logo.targetsize-80.png │ ├── Square44x44Logo.targetsize-96.png │ ├── StoreLogo.scale-100.png │ ├── StoreLogo.scale-125.png │ ├── StoreLogo.scale-150.png │ ├── StoreLogo.scale-200.png │ ├── StoreLogo.scale-400.png │ ├── Wide310x150Logo.scale-100.png │ ├── Wide310x150Logo.scale-125.png │ ├── Wide310x150Logo.scale-150.png │ ├── Wide310x150Logo.scale-200.png │ └── Wide310x150Logo.scale-400.png ├── server ├── .env.example ├── Procfile ├── config │ ├── cloudinary.js │ ├── database.js │ └── razorpay.js ├── controllers │ ├── Auth.js │ ├── Category.js │ ├── ContactUs.js │ ├── Course.js │ ├── Payments.js │ ├── Profile.js │ ├── RatingAndReviews.js │ ├── ResetPassword.js │ ├── Section.js │ └── Subsection.js ├── index.js ├── mail │ └── templates │ │ ├── courseEnrollmentEmail.js │ │ ├── emailVerificationTemplate.js │ │ ├── passwordUpdate.js │ │ └── paymentSuccess.js ├── middlewares │ ├── auth.js │ └── demo.js ├── models │ ├── Category.js │ ├── Course.js │ ├── CourseProgress.js │ ├── OTP.js │ ├── Profile.js │ ├── RatingAndReview.js │ ├── Section.js │ ├── SubSection.js │ └── User.js ├── package-lock.json ├── package.json ├── routes │ ├── ContactUs.js │ ├── Course.js │ ├── Payments.js │ ├── Profile.js │ └── User.js └── utils │ ├── imageUploader.js │ ├── mailSender.js │ └── secToDuration.js ├── src ├── App.css ├── App.js ├── Components │ ├── ScrollToTop.js │ ├── common │ │ ├── ConfirmationModal.jsx │ │ ├── Footer.jsx │ │ ├── IconBtn.jsx │ │ ├── NavBar.jsx │ │ ├── RatingStars.jsx │ │ └── Tab.jsx │ ├── contactUs │ │ └── ContactUsForm.jsx │ └── core │ │ ├── AboutPage │ │ ├── ContactFormSection.jsx │ │ ├── LearningGrid.jsx │ │ ├── Quote.jsx │ │ └── Stats.jsx │ │ ├── Auth │ │ ├── LoginForm.jsx │ │ ├── OpenRoute.jsx │ │ ├── PrivateRoute.jsx │ │ ├── ProfileDropDown.jsx │ │ ├── SignupForm.jsx │ │ └── Template.jsx │ │ ├── Catalog │ │ ├── CatalogCard.jsx │ │ └── CourseSlider.jsx │ │ ├── Dashboard │ │ ├── AddCourse │ │ │ ├── CourseBuilder │ │ │ │ ├── CourseBuilderForm.jsx │ │ │ │ ├── NestedView.jsx │ │ │ │ ├── SubsectionModal.jsx │ │ │ │ └── Upload.jsx │ │ │ ├── CourseInformation │ │ │ │ ├── ChipInput.jsx │ │ │ │ ├── CourseInformationForm.jsx │ │ │ │ ├── RequirementField.jsx │ │ │ │ └── Upload.jsx │ │ │ ├── RenderSteps.jsx │ │ │ └── index.jsx │ │ ├── AdminPannel.jsx │ │ ├── Cart │ │ │ ├── RenderCartCourses.jsx │ │ │ ├── RenderTotalAmount.jsx │ │ │ └── index.jsx │ │ ├── EditCourse.jsx │ │ │ └── EditCourse.jsx │ │ ├── EnrolledCourses.jsx │ │ ├── InstructorDashboard │ │ │ ├── DashboardChart.jsx │ │ │ └── InstructorDashboard.jsx │ │ ├── MyCourses │ │ │ ├── CoursesTable.jsx │ │ │ └── MyCourses.jsx │ │ ├── MyProfile.jsx │ │ ├── PublishCourse │ │ │ └── PublishCourse.jsx │ │ ├── PurchaseHistory.jsx │ │ ├── Settings.jsx │ │ ├── Sidebar.jsx │ │ └── SidebarLink.jsx │ │ ├── HomePage │ │ ├── Button.jsx │ │ ├── CodeBlocks.jsx │ │ ├── CourseCard.jsx │ │ ├── ExploreMore.jsx │ │ ├── HighlightText.jsx │ │ ├── InstructorSection.jsx │ │ ├── LearningLanguageSection.jsx │ │ └── TimelineSection.jsx │ │ ├── Ratings │ │ └── RatingSlider.jsx │ │ └── ViewCourse │ │ ├── ReviewModal.jsx │ │ ├── VideoDetails.jsx │ │ └── VideoDetailsSidebar.jsx ├── assets │ ├── Images │ │ ├── Compare_with_others.png │ │ ├── Compare_with_others.svg │ │ ├── FoundingStory.png │ │ ├── Instructor.png │ │ ├── Know_your_progress.png │ │ ├── Know_your_progress.svg │ │ ├── Plan_your_lessons.png │ │ ├── Plan_your_lessons.svg │ │ ├── TimelineImage.png │ │ ├── aboutus1.webp │ │ ├── aboutus2.webp │ │ ├── aboutus3.webp │ │ ├── banner.mp4 │ │ ├── bghome.svg │ │ ├── boxoffice.png │ │ ├── frame.png │ │ ├── login.webp │ │ ├── rzp.png │ │ └── signup.webp │ ├── Logo │ │ ├── Logo-Full-Dark.png │ │ ├── Logo-Full-Light.png │ │ ├── Logo-Small-Dark.png │ │ └── Logo-Small-Light.png │ └── TimeLineLogo │ │ ├── Logo1.svg │ │ ├── Logo2.svg │ │ ├── Logo3.svg │ │ └── Logo4.svg ├── data │ ├── countrycode.json │ ├── dashboard-links.js │ ├── footer-links.js │ ├── homepage-explore.js │ └── navbar-links.js ├── hooks │ └── useOnClickOutside.js ├── index.css ├── index.js ├── pages │ ├── About.jsx │ ├── Catalog.jsx │ ├── ContactUs.jsx │ ├── CourseDetails.jsx │ ├── Dashboard.jsx │ ├── Error.jsx │ ├── ForgotPassword.jsx │ ├── Home.jsx │ ├── Login.jsx │ ├── ResetPassword.jsx │ ├── SearchCourse.jsx │ ├── Signup.jsx │ ├── VerifyOtp.jsx │ └── ViewCourse.jsx ├── reducers │ └── index.js ├── services │ ├── apiConnector.js │ ├── apis.js │ ├── formatDate.js │ └── operations │ │ ├── authAPI.js │ │ ├── courseDetailsAPI.js │ │ ├── pageAndComponentData.js │ │ ├── profileAPI.js │ │ └── studentFeaturesAPI.js ├── slices │ ├── authSlice.js │ ├── cartSlice.js │ ├── courseSlice.js │ ├── loadingBarSlice.js │ ├── profileSlice.js │ └── viewCourseSlice.js ├── swDev.js └── utils │ ├── avgRating.js │ └── constants.js └── tailwind.config.js /.env.example: -------------------------------------------------------------------------------- 1 | REACT_APP_BASE_URL = http://localhost:4000/api/v1 2 | 3 | REACT_APP_RAZORPAY_KEY_ID = # Razorpay Key ID get from Razorpay website -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # See https://help.github.com/articles/ignoring-files/ for more about ignoring files. 2 | 3 | # dependencies 4 | /node_modules 5 | /.pnp 6 | .pnp.js 7 | /server/node_modules 8 | # testing 9 | /coverage 10 | 11 | # production 12 | /build 13 | 14 | # misc 15 | .DS_Store 16 | .env.local 17 | .env 18 | .env.development.local 19 | .env.test.local 20 | .env.production.local 21 | 22 | npm-debug.log* 23 | yarn-debug.log* 24 | yarn-error.log* 25 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2023 8man 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Study Notion 2 | 3 | Study Notion is an ED Tech (Education Technology) web application developed using the MERN stack. 4 | 5 | ## Note 6 | 7 | This project is intended as a learning tool and can be used as a sample project for educational or personal projects. 8 | 9 | 10 | *** 11 | ## Features 12 | 13 | * User Authentication: Study Notion provides secure user registration and authentication using JWT (JSON Web Tokens). Users can sign up, log in, and manage their 14 | profiles with ease. 15 | 16 | * Courses and Lessons: Instructors can create and edit created courses. Students can enroll in courses, access course materials, and track their progress. 17 | * Progress Tracking: Study Notion allows students to track their progress in enrolled courses. They can view completed lessons, scores on quizzes and 18 | assignments, and overall course progress. 19 | 20 | * Payment Integration: Study Notion integrates with Razorpay for payment processing. Users can make secure payments for course enrollment and other services 21 | using various payment methods supported by Razorpay. 22 | 23 | * Search Functionality: Users can easily search for courses, lessons, and resources using the built-in search feature. This makes it convenient to find relevant 24 | content quickly. 25 | 26 | * Instructor Dashboard: Instructors have access to a comprehensive dashboard to view information about their courses, students, and income. The 27 | dashboard provides charts and visualizations to present data clearly and intuitively. Instructors can monitor the total number of students enrolled in 28 | each course, track course performance, and view their income generated from course sales. 29 | 30 | 31 | *** 32 | ## Screenshots 33 | ![Screenshot 2023-07-25 210844](https://github.com/himanshu8443/Study-Notion-master/assets/99420590/0cba8d5b-6a47-4721-ac9f-4279107c257e) 34 | ![Screenshot 2023-07-25 211309](https://github.com/himanshu8443/Study-Notion-master/assets/99420590/62c33b56-0bd5-4330-b1db-d41b80d9f69f) 35 |
36 | More screenshots 37 | 38 | ![Screenshot 2023-07-25 211451](https://github.com/himanshu8443/Study-Notion-master/assets/99420590/63f7163d-a74a-4e78-bc78-6b96b06073f9) 39 | ![image](https://github.com/himanshu8443/Study-Notion-master/assets/99420590/59d1d8c2-2824-45bb-a2f7-6f5dc234895c) 40 |
41 | 42 | *** 43 | 44 | ## Important 45 | * Backend is in the server folder. 46 | * Before uploading courses and anything create the categories e.g. web dev, Python, etc. (without categories courses cannot be added). To create categories create an Admin account and go to dashboard then admin panel. 47 | * To create an Admin account first sign up with a student or instructor account then go to your Database under the users model and change that 'accountType' to 'Admin'. 48 | 49 | 50 | ## Installation 51 | 52 | 1. Clone the repository to your local machine. 53 | ```sh 54 | git clone https://github.com/himanshu8443/Study-Notion-master.git 55 | ``` 56 | 57 | 2. Install the required packages. 58 | ```sh 59 | cd Study-Notion-master 60 | npm install 61 | 62 | cd server 63 | npm install 64 | ``` 65 | 66 | 3. Set up the environment variables: 67 | 68 | Create a .env file in the root directory and /server 69 | Add the required environment variables, such as database connection details, JWT secret, and any other necessary configurations check .env.example files for more info. 70 | 71 | 72 | 4. Start the development server. 73 | ```sh 74 | npm run dev 75 | ``` 76 | 77 | 5. Open the project in your browser at [`http://localhost:3000`](http://localhost:3000) to view your project. 78 | 79 | The project is set up to use `postcss-cli` to process your CSS files. You can add your own `tailwind.config.js` file to customize your Tailwind setup. 80 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "react-tailwind-css-starter-pack", 3 | "version": "0.1.0", 4 | "private": true, 5 | "dependencies": { 6 | "@ramonak/react-progress-bar": "^5.0.3", 7 | "@reduxjs/toolkit": "^1.9.5", 8 | "axios": "^1.6.0", 9 | "bcryptjs": "^2.4.3", 10 | "concurrently": "^8.0.1", 11 | "react": "^18.2.0", 12 | "react-chartjs-2": "^5.2.0", 13 | "react-dom": "^18.2.0", 14 | "react-dropzone": "^14.2.3", 15 | "react-hook-form": "^7.44.3", 16 | "react-hot-toast": "^2.4.1", 17 | "react-icons": "^4.8.0", 18 | "react-loading-skeleton": "^3.3.1", 19 | "react-otp-input": "^3.0.2", 20 | "react-rating-stars-component": "^2.2.0", 21 | "react-redux": "^8.0.5", 22 | "react-router": "^6.11.2", 23 | "react-router-dom": "^6.11.2", 24 | "react-scripts": "5.0.1", 25 | "react-super-responsive-table": "^5.2.1", 26 | "react-top-loading-bar": "^2.3.1", 27 | "react-type-animation": "^3.0.1", 28 | "redux": "^4.2.1", 29 | "redux-toolkit": "^1.1.2", 30 | "swiper": "^9.4.1", 31 | "video-react": "^0.16.0", 32 | "web-vitals": "^2.1.4" 33 | }, 34 | "repository": { 35 | "type": "git", 36 | "url": "git+https://github.com/thepranaygupta/react-tailwind-css-starter-pack.git" 37 | }, 38 | "author": "Pranay Gupta", 39 | "bugs": { 40 | "url": "https://github.com/thepranaygupta/react-tailwind-css-starter-pack/issues" 41 | }, 42 | "scripts": { 43 | "start": "react-scripts start", 44 | "build": "react-scripts build", 45 | "eject": "react-scripts eject", 46 | "server": "cd server && npm run dev", 47 | "dev": "concurrently -n \"client,server\" -c \"bgBlue,bgYellow\" \"npm start\" \"npm run server\"" 48 | }, 49 | "eslintConfig": { 50 | "extends": [ 51 | "react-app", 52 | "react-app/jest" 53 | ] 54 | }, 55 | "browserslist": { 56 | "production": [ 57 | ">0.2%", 58 | "not dead", 59 | "not op_mini all" 60 | ], 61 | "development": [ 62 | "last 1 chrome version", 63 | "last 1 firefox version", 64 | "last 1 safari version" 65 | ] 66 | }, 67 | "devDependencies": { 68 | "@babel/plugin-proposal-private-property-in-object": "^7.21.11", 69 | "tailwindcss": "^3.2.7" 70 | } 71 | } 72 | -------------------------------------------------------------------------------- /public/Logo-Full-Light.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/himanshu8443/Study-Notion-master/d28626ce53c699e0f27f1071097a06ef11b8bb1d/public/Logo-Full-Light.png -------------------------------------------------------------------------------- /public/Logo-Small-Light.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/himanshu8443/Study-Notion-master/d28626ce53c699e0f27f1071097a06ef11b8bb1d/public/Logo-Small-Light.png -------------------------------------------------------------------------------- /public/android/android-launchericon-144-144.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/himanshu8443/Study-Notion-master/d28626ce53c699e0f27f1071097a06ef11b8bb1d/public/android/android-launchericon-144-144.png -------------------------------------------------------------------------------- /public/android/android-launchericon-192-192.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/himanshu8443/Study-Notion-master/d28626ce53c699e0f27f1071097a06ef11b8bb1d/public/android/android-launchericon-192-192.png -------------------------------------------------------------------------------- /public/android/android-launchericon-48-48.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/himanshu8443/Study-Notion-master/d28626ce53c699e0f27f1071097a06ef11b8bb1d/public/android/android-launchericon-48-48.png -------------------------------------------------------------------------------- /public/android/android-launchericon-512-512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/himanshu8443/Study-Notion-master/d28626ce53c699e0f27f1071097a06ef11b8bb1d/public/android/android-launchericon-512-512.png -------------------------------------------------------------------------------- /public/android/android-launchericon-72-72.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/himanshu8443/Study-Notion-master/d28626ce53c699e0f27f1071097a06ef11b8bb1d/public/android/android-launchericon-72-72.png -------------------------------------------------------------------------------- /public/android/android-launchericon-96-96.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/himanshu8443/Study-Notion-master/d28626ce53c699e0f27f1071097a06ef11b8bb1d/public/android/android-launchericon-96-96.png -------------------------------------------------------------------------------- /public/index.css: -------------------------------------------------------------------------------- 1 | @import url('https://fonts.googleapis.com/css2?family=Alfa+Slab+One&display=swap'); 2 | * { 3 | padding: 0; 4 | margin: 0; 5 | box-sizing: border-box; 6 | } 7 | 8 | .loaderdiv{ 9 | width: 100vw; 10 | height: 100vh; 11 | background: #000814; 12 | display: flex; 13 | justify-content: center; 14 | align-items: center; 15 | } 16 | body{ 17 | overflow: hidden; 18 | background-color: #000814; 19 | } 20 | .waviy { 21 | position: relative; 22 | -webkit-box-reflect: below -20px linear-gradient(transparent, rgba(0,0,0,.2)); 23 | font-size: 30px; 24 | } 25 | .waviy span { 26 | font-family: 'Alfa Slab One',sans-serif; 27 | position: relative; 28 | display: inline-block; 29 | color: #fff; 30 | text-transform: uppercase; 31 | animation: waviy 2s infinite; 32 | animation-delay: calc(.1s * var(--i)); 33 | 34 | } 35 | @keyframes waviy { 36 | 0%,40%,100% { 37 | transform: translateY(0) 38 | } 39 | 20% { 40 | transform: translateY(-20px) 41 | } 42 | } 43 | 44 | 45 | 46 | 47 | 48 | .install-prompt { 49 | display: none; 50 | position: fixed; 51 | bottom: 16px; 52 | right: 16px; 53 | background-color: #fff; 54 | box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2); 55 | padding: 16px; 56 | border-radius: 8px; 57 | z-index: 9999; 58 | } 59 | 60 | .install-prompt-content { 61 | display: flex; 62 | gap: 5px; 63 | align-items: center; 64 | } 65 | 66 | .install-button { 67 | background-color: #4CAF50; 68 | color: #fff; 69 | border: none; 70 | padding: 5px 11px; 71 | font-size: 16px; 72 | cursor: pointer; 73 | border-radius: 4px; 74 | } 75 | 76 | .install-prompt-header { 77 | font-size: 16px; 78 | font-weight: 600; 79 | } 80 | 81 | .close-button { 82 | 83 | border: none; 84 | padding: 1px 6px; 85 | font-size: 16px; 86 | cursor: pointer; 87 | border-radius: 4px; 88 | position: absolute; 89 | top: 2px; 90 | right: 3px; 91 | } 92 | -------------------------------------------------------------------------------- /public/ios/100.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/himanshu8443/Study-Notion-master/d28626ce53c699e0f27f1071097a06ef11b8bb1d/public/ios/100.png -------------------------------------------------------------------------------- /public/ios/1024.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/himanshu8443/Study-Notion-master/d28626ce53c699e0f27f1071097a06ef11b8bb1d/public/ios/1024.png -------------------------------------------------------------------------------- /public/ios/114.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/himanshu8443/Study-Notion-master/d28626ce53c699e0f27f1071097a06ef11b8bb1d/public/ios/114.png -------------------------------------------------------------------------------- /public/ios/120.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/himanshu8443/Study-Notion-master/d28626ce53c699e0f27f1071097a06ef11b8bb1d/public/ios/120.png -------------------------------------------------------------------------------- /public/ios/128.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/himanshu8443/Study-Notion-master/d28626ce53c699e0f27f1071097a06ef11b8bb1d/public/ios/128.png -------------------------------------------------------------------------------- /public/ios/144.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/himanshu8443/Study-Notion-master/d28626ce53c699e0f27f1071097a06ef11b8bb1d/public/ios/144.png -------------------------------------------------------------------------------- /public/ios/152.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/himanshu8443/Study-Notion-master/d28626ce53c699e0f27f1071097a06ef11b8bb1d/public/ios/152.png -------------------------------------------------------------------------------- /public/ios/16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/himanshu8443/Study-Notion-master/d28626ce53c699e0f27f1071097a06ef11b8bb1d/public/ios/16.png -------------------------------------------------------------------------------- /public/ios/167.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/himanshu8443/Study-Notion-master/d28626ce53c699e0f27f1071097a06ef11b8bb1d/public/ios/167.png -------------------------------------------------------------------------------- /public/ios/180.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/himanshu8443/Study-Notion-master/d28626ce53c699e0f27f1071097a06ef11b8bb1d/public/ios/180.png -------------------------------------------------------------------------------- /public/ios/192.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/himanshu8443/Study-Notion-master/d28626ce53c699e0f27f1071097a06ef11b8bb1d/public/ios/192.png -------------------------------------------------------------------------------- /public/ios/20.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/himanshu8443/Study-Notion-master/d28626ce53c699e0f27f1071097a06ef11b8bb1d/public/ios/20.png -------------------------------------------------------------------------------- /public/ios/256.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/himanshu8443/Study-Notion-master/d28626ce53c699e0f27f1071097a06ef11b8bb1d/public/ios/256.png -------------------------------------------------------------------------------- /public/ios/29.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/himanshu8443/Study-Notion-master/d28626ce53c699e0f27f1071097a06ef11b8bb1d/public/ios/29.png -------------------------------------------------------------------------------- /public/ios/32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/himanshu8443/Study-Notion-master/d28626ce53c699e0f27f1071097a06ef11b8bb1d/public/ios/32.png -------------------------------------------------------------------------------- /public/ios/40.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/himanshu8443/Study-Notion-master/d28626ce53c699e0f27f1071097a06ef11b8bb1d/public/ios/40.png -------------------------------------------------------------------------------- /public/ios/50.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/himanshu8443/Study-Notion-master/d28626ce53c699e0f27f1071097a06ef11b8bb1d/public/ios/50.png -------------------------------------------------------------------------------- /public/ios/512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/himanshu8443/Study-Notion-master/d28626ce53c699e0f27f1071097a06ef11b8bb1d/public/ios/512.png -------------------------------------------------------------------------------- /public/ios/57.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/himanshu8443/Study-Notion-master/d28626ce53c699e0f27f1071097a06ef11b8bb1d/public/ios/57.png -------------------------------------------------------------------------------- /public/ios/58.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/himanshu8443/Study-Notion-master/d28626ce53c699e0f27f1071097a06ef11b8bb1d/public/ios/58.png -------------------------------------------------------------------------------- /public/ios/60.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/himanshu8443/Study-Notion-master/d28626ce53c699e0f27f1071097a06ef11b8bb1d/public/ios/60.png -------------------------------------------------------------------------------- /public/ios/64.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/himanshu8443/Study-Notion-master/d28626ce53c699e0f27f1071097a06ef11b8bb1d/public/ios/64.png -------------------------------------------------------------------------------- /public/ios/72.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/himanshu8443/Study-Notion-master/d28626ce53c699e0f27f1071097a06ef11b8bb1d/public/ios/72.png -------------------------------------------------------------------------------- /public/ios/76.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/himanshu8443/Study-Notion-master/d28626ce53c699e0f27f1071097a06ef11b8bb1d/public/ios/76.png -------------------------------------------------------------------------------- /public/ios/80.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/himanshu8443/Study-Notion-master/d28626ce53c699e0f27f1071097a06ef11b8bb1d/public/ios/80.png -------------------------------------------------------------------------------- /public/ios/87.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/himanshu8443/Study-Notion-master/d28626ce53c699e0f27f1071097a06ef11b8bb1d/public/ios/87.png -------------------------------------------------------------------------------- /public/robots.txt: -------------------------------------------------------------------------------- 1 | # https://www.robotstxt.org/robotstxt.html 2 | User-agent: * 3 | Disallow: 4 | -------------------------------------------------------------------------------- /public/service-worker.js: -------------------------------------------------------------------------------- 1 | let cachedData = "appV1" 2 | self.addEventListener("install", (event) => { 3 | event.waitUntil( 4 | caches.open(cachedData ).then((cache) => { 5 | const urls = [ 6 | "/static/js/main.*.js", 7 | "/static/css/main.*.css", 8 | "/index.html", 9 | "/index.css", 10 | "/static/media/banner.8e687823b1422880cc3f.mp4", 11 | "/",] 12 | for(let i=0;i { 27 | const requestUrl = new URL(event.request.url); 28 | 29 | if (requestUrl.origin === 'https://api.dicebear.com' && requestUrl.pathname === '/5.x/initials/svg') { 30 | event.respondWith( 31 | caches.open('user-image-cache').then(function(cache) { 32 | return cache.match(event.request).then(function (response) { 33 | return response || fetch(event.request).then(function(response) { 34 | cache.put(event.request, response.clone()); 35 | return response; 36 | }); 37 | }); 38 | }) 39 | ); 40 | } 41 | 42 | if(!navigator.onLine){ 43 | event.respondWith( 44 | caches.match(event.request).then((resp) => { 45 | if(resp){ 46 | return resp 47 | } 48 | let requestUrl = event.request.clone(); 49 | return fetch(requestUrl) 50 | }) 51 | ) 52 | } 53 | }) 54 | 55 | 56 | -------------------------------------------------------------------------------- /public/windows11/LargeTile.scale-100.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/himanshu8443/Study-Notion-master/d28626ce53c699e0f27f1071097a06ef11b8bb1d/public/windows11/LargeTile.scale-100.png -------------------------------------------------------------------------------- /public/windows11/LargeTile.scale-125.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/himanshu8443/Study-Notion-master/d28626ce53c699e0f27f1071097a06ef11b8bb1d/public/windows11/LargeTile.scale-125.png -------------------------------------------------------------------------------- /public/windows11/LargeTile.scale-150.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/himanshu8443/Study-Notion-master/d28626ce53c699e0f27f1071097a06ef11b8bb1d/public/windows11/LargeTile.scale-150.png -------------------------------------------------------------------------------- /public/windows11/LargeTile.scale-200.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/himanshu8443/Study-Notion-master/d28626ce53c699e0f27f1071097a06ef11b8bb1d/public/windows11/LargeTile.scale-200.png -------------------------------------------------------------------------------- /public/windows11/LargeTile.scale-400.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/himanshu8443/Study-Notion-master/d28626ce53c699e0f27f1071097a06ef11b8bb1d/public/windows11/LargeTile.scale-400.png -------------------------------------------------------------------------------- /public/windows11/SmallTile.scale-100.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/himanshu8443/Study-Notion-master/d28626ce53c699e0f27f1071097a06ef11b8bb1d/public/windows11/SmallTile.scale-100.png -------------------------------------------------------------------------------- /public/windows11/SmallTile.scale-125.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/himanshu8443/Study-Notion-master/d28626ce53c699e0f27f1071097a06ef11b8bb1d/public/windows11/SmallTile.scale-125.png -------------------------------------------------------------------------------- /public/windows11/SmallTile.scale-150.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/himanshu8443/Study-Notion-master/d28626ce53c699e0f27f1071097a06ef11b8bb1d/public/windows11/SmallTile.scale-150.png -------------------------------------------------------------------------------- /public/windows11/SmallTile.scale-200.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/himanshu8443/Study-Notion-master/d28626ce53c699e0f27f1071097a06ef11b8bb1d/public/windows11/SmallTile.scale-200.png -------------------------------------------------------------------------------- /public/windows11/SmallTile.scale-400.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/himanshu8443/Study-Notion-master/d28626ce53c699e0f27f1071097a06ef11b8bb1d/public/windows11/SmallTile.scale-400.png -------------------------------------------------------------------------------- /public/windows11/SplashScreen.scale-100.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/himanshu8443/Study-Notion-master/d28626ce53c699e0f27f1071097a06ef11b8bb1d/public/windows11/SplashScreen.scale-100.png -------------------------------------------------------------------------------- /public/windows11/SplashScreen.scale-125.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/himanshu8443/Study-Notion-master/d28626ce53c699e0f27f1071097a06ef11b8bb1d/public/windows11/SplashScreen.scale-125.png -------------------------------------------------------------------------------- /public/windows11/SplashScreen.scale-150.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/himanshu8443/Study-Notion-master/d28626ce53c699e0f27f1071097a06ef11b8bb1d/public/windows11/SplashScreen.scale-150.png -------------------------------------------------------------------------------- /public/windows11/SplashScreen.scale-200.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/himanshu8443/Study-Notion-master/d28626ce53c699e0f27f1071097a06ef11b8bb1d/public/windows11/SplashScreen.scale-200.png -------------------------------------------------------------------------------- /public/windows11/SplashScreen.scale-400.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/himanshu8443/Study-Notion-master/d28626ce53c699e0f27f1071097a06ef11b8bb1d/public/windows11/SplashScreen.scale-400.png -------------------------------------------------------------------------------- /public/windows11/Square150x150Logo.scale-100.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/himanshu8443/Study-Notion-master/d28626ce53c699e0f27f1071097a06ef11b8bb1d/public/windows11/Square150x150Logo.scale-100.png -------------------------------------------------------------------------------- /public/windows11/Square150x150Logo.scale-125.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/himanshu8443/Study-Notion-master/d28626ce53c699e0f27f1071097a06ef11b8bb1d/public/windows11/Square150x150Logo.scale-125.png -------------------------------------------------------------------------------- /public/windows11/Square150x150Logo.scale-150.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/himanshu8443/Study-Notion-master/d28626ce53c699e0f27f1071097a06ef11b8bb1d/public/windows11/Square150x150Logo.scale-150.png -------------------------------------------------------------------------------- /public/windows11/Square150x150Logo.scale-200.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/himanshu8443/Study-Notion-master/d28626ce53c699e0f27f1071097a06ef11b8bb1d/public/windows11/Square150x150Logo.scale-200.png -------------------------------------------------------------------------------- /public/windows11/Square150x150Logo.scale-400.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/himanshu8443/Study-Notion-master/d28626ce53c699e0f27f1071097a06ef11b8bb1d/public/windows11/Square150x150Logo.scale-400.png -------------------------------------------------------------------------------- /public/windows11/Square44x44Logo.altform-lightunplated_targetsize-16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/himanshu8443/Study-Notion-master/d28626ce53c699e0f27f1071097a06ef11b8bb1d/public/windows11/Square44x44Logo.altform-lightunplated_targetsize-16.png -------------------------------------------------------------------------------- /public/windows11/Square44x44Logo.altform-lightunplated_targetsize-20.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/himanshu8443/Study-Notion-master/d28626ce53c699e0f27f1071097a06ef11b8bb1d/public/windows11/Square44x44Logo.altform-lightunplated_targetsize-20.png -------------------------------------------------------------------------------- /public/windows11/Square44x44Logo.altform-lightunplated_targetsize-24.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/himanshu8443/Study-Notion-master/d28626ce53c699e0f27f1071097a06ef11b8bb1d/public/windows11/Square44x44Logo.altform-lightunplated_targetsize-24.png -------------------------------------------------------------------------------- /public/windows11/Square44x44Logo.altform-lightunplated_targetsize-256.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/himanshu8443/Study-Notion-master/d28626ce53c699e0f27f1071097a06ef11b8bb1d/public/windows11/Square44x44Logo.altform-lightunplated_targetsize-256.png -------------------------------------------------------------------------------- /public/windows11/Square44x44Logo.altform-lightunplated_targetsize-30.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/himanshu8443/Study-Notion-master/d28626ce53c699e0f27f1071097a06ef11b8bb1d/public/windows11/Square44x44Logo.altform-lightunplated_targetsize-30.png -------------------------------------------------------------------------------- /public/windows11/Square44x44Logo.altform-lightunplated_targetsize-32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/himanshu8443/Study-Notion-master/d28626ce53c699e0f27f1071097a06ef11b8bb1d/public/windows11/Square44x44Logo.altform-lightunplated_targetsize-32.png -------------------------------------------------------------------------------- /public/windows11/Square44x44Logo.altform-lightunplated_targetsize-36.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/himanshu8443/Study-Notion-master/d28626ce53c699e0f27f1071097a06ef11b8bb1d/public/windows11/Square44x44Logo.altform-lightunplated_targetsize-36.png -------------------------------------------------------------------------------- /public/windows11/Square44x44Logo.altform-lightunplated_targetsize-40.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/himanshu8443/Study-Notion-master/d28626ce53c699e0f27f1071097a06ef11b8bb1d/public/windows11/Square44x44Logo.altform-lightunplated_targetsize-40.png -------------------------------------------------------------------------------- /public/windows11/Square44x44Logo.altform-lightunplated_targetsize-44.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/himanshu8443/Study-Notion-master/d28626ce53c699e0f27f1071097a06ef11b8bb1d/public/windows11/Square44x44Logo.altform-lightunplated_targetsize-44.png -------------------------------------------------------------------------------- /public/windows11/Square44x44Logo.altform-lightunplated_targetsize-48.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/himanshu8443/Study-Notion-master/d28626ce53c699e0f27f1071097a06ef11b8bb1d/public/windows11/Square44x44Logo.altform-lightunplated_targetsize-48.png -------------------------------------------------------------------------------- /public/windows11/Square44x44Logo.altform-lightunplated_targetsize-60.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/himanshu8443/Study-Notion-master/d28626ce53c699e0f27f1071097a06ef11b8bb1d/public/windows11/Square44x44Logo.altform-lightunplated_targetsize-60.png -------------------------------------------------------------------------------- /public/windows11/Square44x44Logo.altform-lightunplated_targetsize-64.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/himanshu8443/Study-Notion-master/d28626ce53c699e0f27f1071097a06ef11b8bb1d/public/windows11/Square44x44Logo.altform-lightunplated_targetsize-64.png -------------------------------------------------------------------------------- /public/windows11/Square44x44Logo.altform-lightunplated_targetsize-72.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/himanshu8443/Study-Notion-master/d28626ce53c699e0f27f1071097a06ef11b8bb1d/public/windows11/Square44x44Logo.altform-lightunplated_targetsize-72.png -------------------------------------------------------------------------------- /public/windows11/Square44x44Logo.altform-lightunplated_targetsize-80.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/himanshu8443/Study-Notion-master/d28626ce53c699e0f27f1071097a06ef11b8bb1d/public/windows11/Square44x44Logo.altform-lightunplated_targetsize-80.png -------------------------------------------------------------------------------- /public/windows11/Square44x44Logo.altform-lightunplated_targetsize-96.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/himanshu8443/Study-Notion-master/d28626ce53c699e0f27f1071097a06ef11b8bb1d/public/windows11/Square44x44Logo.altform-lightunplated_targetsize-96.png -------------------------------------------------------------------------------- /public/windows11/Square44x44Logo.altform-unplated_targetsize-16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/himanshu8443/Study-Notion-master/d28626ce53c699e0f27f1071097a06ef11b8bb1d/public/windows11/Square44x44Logo.altform-unplated_targetsize-16.png -------------------------------------------------------------------------------- /public/windows11/Square44x44Logo.altform-unplated_targetsize-20.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/himanshu8443/Study-Notion-master/d28626ce53c699e0f27f1071097a06ef11b8bb1d/public/windows11/Square44x44Logo.altform-unplated_targetsize-20.png -------------------------------------------------------------------------------- /public/windows11/Square44x44Logo.altform-unplated_targetsize-24.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/himanshu8443/Study-Notion-master/d28626ce53c699e0f27f1071097a06ef11b8bb1d/public/windows11/Square44x44Logo.altform-unplated_targetsize-24.png -------------------------------------------------------------------------------- /public/windows11/Square44x44Logo.altform-unplated_targetsize-256.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/himanshu8443/Study-Notion-master/d28626ce53c699e0f27f1071097a06ef11b8bb1d/public/windows11/Square44x44Logo.altform-unplated_targetsize-256.png -------------------------------------------------------------------------------- /public/windows11/Square44x44Logo.altform-unplated_targetsize-30.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/himanshu8443/Study-Notion-master/d28626ce53c699e0f27f1071097a06ef11b8bb1d/public/windows11/Square44x44Logo.altform-unplated_targetsize-30.png -------------------------------------------------------------------------------- /public/windows11/Square44x44Logo.altform-unplated_targetsize-32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/himanshu8443/Study-Notion-master/d28626ce53c699e0f27f1071097a06ef11b8bb1d/public/windows11/Square44x44Logo.altform-unplated_targetsize-32.png -------------------------------------------------------------------------------- /public/windows11/Square44x44Logo.altform-unplated_targetsize-36.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/himanshu8443/Study-Notion-master/d28626ce53c699e0f27f1071097a06ef11b8bb1d/public/windows11/Square44x44Logo.altform-unplated_targetsize-36.png -------------------------------------------------------------------------------- /public/windows11/Square44x44Logo.altform-unplated_targetsize-40.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/himanshu8443/Study-Notion-master/d28626ce53c699e0f27f1071097a06ef11b8bb1d/public/windows11/Square44x44Logo.altform-unplated_targetsize-40.png -------------------------------------------------------------------------------- /public/windows11/Square44x44Logo.altform-unplated_targetsize-44.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/himanshu8443/Study-Notion-master/d28626ce53c699e0f27f1071097a06ef11b8bb1d/public/windows11/Square44x44Logo.altform-unplated_targetsize-44.png -------------------------------------------------------------------------------- /public/windows11/Square44x44Logo.altform-unplated_targetsize-48.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/himanshu8443/Study-Notion-master/d28626ce53c699e0f27f1071097a06ef11b8bb1d/public/windows11/Square44x44Logo.altform-unplated_targetsize-48.png -------------------------------------------------------------------------------- /public/windows11/Square44x44Logo.altform-unplated_targetsize-60.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/himanshu8443/Study-Notion-master/d28626ce53c699e0f27f1071097a06ef11b8bb1d/public/windows11/Square44x44Logo.altform-unplated_targetsize-60.png -------------------------------------------------------------------------------- /public/windows11/Square44x44Logo.altform-unplated_targetsize-64.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/himanshu8443/Study-Notion-master/d28626ce53c699e0f27f1071097a06ef11b8bb1d/public/windows11/Square44x44Logo.altform-unplated_targetsize-64.png -------------------------------------------------------------------------------- /public/windows11/Square44x44Logo.altform-unplated_targetsize-72.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/himanshu8443/Study-Notion-master/d28626ce53c699e0f27f1071097a06ef11b8bb1d/public/windows11/Square44x44Logo.altform-unplated_targetsize-72.png -------------------------------------------------------------------------------- /public/windows11/Square44x44Logo.altform-unplated_targetsize-80.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/himanshu8443/Study-Notion-master/d28626ce53c699e0f27f1071097a06ef11b8bb1d/public/windows11/Square44x44Logo.altform-unplated_targetsize-80.png -------------------------------------------------------------------------------- /public/windows11/Square44x44Logo.altform-unplated_targetsize-96.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/himanshu8443/Study-Notion-master/d28626ce53c699e0f27f1071097a06ef11b8bb1d/public/windows11/Square44x44Logo.altform-unplated_targetsize-96.png -------------------------------------------------------------------------------- /public/windows11/Square44x44Logo.scale-100.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/himanshu8443/Study-Notion-master/d28626ce53c699e0f27f1071097a06ef11b8bb1d/public/windows11/Square44x44Logo.scale-100.png -------------------------------------------------------------------------------- /public/windows11/Square44x44Logo.scale-125.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/himanshu8443/Study-Notion-master/d28626ce53c699e0f27f1071097a06ef11b8bb1d/public/windows11/Square44x44Logo.scale-125.png -------------------------------------------------------------------------------- /public/windows11/Square44x44Logo.scale-150.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/himanshu8443/Study-Notion-master/d28626ce53c699e0f27f1071097a06ef11b8bb1d/public/windows11/Square44x44Logo.scale-150.png -------------------------------------------------------------------------------- /public/windows11/Square44x44Logo.scale-200.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/himanshu8443/Study-Notion-master/d28626ce53c699e0f27f1071097a06ef11b8bb1d/public/windows11/Square44x44Logo.scale-200.png -------------------------------------------------------------------------------- /public/windows11/Square44x44Logo.scale-400.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/himanshu8443/Study-Notion-master/d28626ce53c699e0f27f1071097a06ef11b8bb1d/public/windows11/Square44x44Logo.scale-400.png -------------------------------------------------------------------------------- /public/windows11/Square44x44Logo.targetsize-16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/himanshu8443/Study-Notion-master/d28626ce53c699e0f27f1071097a06ef11b8bb1d/public/windows11/Square44x44Logo.targetsize-16.png -------------------------------------------------------------------------------- /public/windows11/Square44x44Logo.targetsize-20.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/himanshu8443/Study-Notion-master/d28626ce53c699e0f27f1071097a06ef11b8bb1d/public/windows11/Square44x44Logo.targetsize-20.png -------------------------------------------------------------------------------- /public/windows11/Square44x44Logo.targetsize-24.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/himanshu8443/Study-Notion-master/d28626ce53c699e0f27f1071097a06ef11b8bb1d/public/windows11/Square44x44Logo.targetsize-24.png -------------------------------------------------------------------------------- /public/windows11/Square44x44Logo.targetsize-256.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/himanshu8443/Study-Notion-master/d28626ce53c699e0f27f1071097a06ef11b8bb1d/public/windows11/Square44x44Logo.targetsize-256.png -------------------------------------------------------------------------------- /public/windows11/Square44x44Logo.targetsize-30.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/himanshu8443/Study-Notion-master/d28626ce53c699e0f27f1071097a06ef11b8bb1d/public/windows11/Square44x44Logo.targetsize-30.png -------------------------------------------------------------------------------- /public/windows11/Square44x44Logo.targetsize-32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/himanshu8443/Study-Notion-master/d28626ce53c699e0f27f1071097a06ef11b8bb1d/public/windows11/Square44x44Logo.targetsize-32.png -------------------------------------------------------------------------------- /public/windows11/Square44x44Logo.targetsize-36.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/himanshu8443/Study-Notion-master/d28626ce53c699e0f27f1071097a06ef11b8bb1d/public/windows11/Square44x44Logo.targetsize-36.png -------------------------------------------------------------------------------- /public/windows11/Square44x44Logo.targetsize-40.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/himanshu8443/Study-Notion-master/d28626ce53c699e0f27f1071097a06ef11b8bb1d/public/windows11/Square44x44Logo.targetsize-40.png -------------------------------------------------------------------------------- /public/windows11/Square44x44Logo.targetsize-44.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/himanshu8443/Study-Notion-master/d28626ce53c699e0f27f1071097a06ef11b8bb1d/public/windows11/Square44x44Logo.targetsize-44.png -------------------------------------------------------------------------------- /public/windows11/Square44x44Logo.targetsize-48.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/himanshu8443/Study-Notion-master/d28626ce53c699e0f27f1071097a06ef11b8bb1d/public/windows11/Square44x44Logo.targetsize-48.png -------------------------------------------------------------------------------- /public/windows11/Square44x44Logo.targetsize-60.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/himanshu8443/Study-Notion-master/d28626ce53c699e0f27f1071097a06ef11b8bb1d/public/windows11/Square44x44Logo.targetsize-60.png -------------------------------------------------------------------------------- /public/windows11/Square44x44Logo.targetsize-64.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/himanshu8443/Study-Notion-master/d28626ce53c699e0f27f1071097a06ef11b8bb1d/public/windows11/Square44x44Logo.targetsize-64.png -------------------------------------------------------------------------------- /public/windows11/Square44x44Logo.targetsize-72.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/himanshu8443/Study-Notion-master/d28626ce53c699e0f27f1071097a06ef11b8bb1d/public/windows11/Square44x44Logo.targetsize-72.png -------------------------------------------------------------------------------- /public/windows11/Square44x44Logo.targetsize-80.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/himanshu8443/Study-Notion-master/d28626ce53c699e0f27f1071097a06ef11b8bb1d/public/windows11/Square44x44Logo.targetsize-80.png -------------------------------------------------------------------------------- /public/windows11/Square44x44Logo.targetsize-96.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/himanshu8443/Study-Notion-master/d28626ce53c699e0f27f1071097a06ef11b8bb1d/public/windows11/Square44x44Logo.targetsize-96.png -------------------------------------------------------------------------------- /public/windows11/StoreLogo.scale-100.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/himanshu8443/Study-Notion-master/d28626ce53c699e0f27f1071097a06ef11b8bb1d/public/windows11/StoreLogo.scale-100.png -------------------------------------------------------------------------------- /public/windows11/StoreLogo.scale-125.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/himanshu8443/Study-Notion-master/d28626ce53c699e0f27f1071097a06ef11b8bb1d/public/windows11/StoreLogo.scale-125.png -------------------------------------------------------------------------------- /public/windows11/StoreLogo.scale-150.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/himanshu8443/Study-Notion-master/d28626ce53c699e0f27f1071097a06ef11b8bb1d/public/windows11/StoreLogo.scale-150.png -------------------------------------------------------------------------------- /public/windows11/StoreLogo.scale-200.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/himanshu8443/Study-Notion-master/d28626ce53c699e0f27f1071097a06ef11b8bb1d/public/windows11/StoreLogo.scale-200.png -------------------------------------------------------------------------------- /public/windows11/StoreLogo.scale-400.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/himanshu8443/Study-Notion-master/d28626ce53c699e0f27f1071097a06ef11b8bb1d/public/windows11/StoreLogo.scale-400.png -------------------------------------------------------------------------------- /public/windows11/Wide310x150Logo.scale-100.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/himanshu8443/Study-Notion-master/d28626ce53c699e0f27f1071097a06ef11b8bb1d/public/windows11/Wide310x150Logo.scale-100.png -------------------------------------------------------------------------------- /public/windows11/Wide310x150Logo.scale-125.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/himanshu8443/Study-Notion-master/d28626ce53c699e0f27f1071097a06ef11b8bb1d/public/windows11/Wide310x150Logo.scale-125.png -------------------------------------------------------------------------------- /public/windows11/Wide310x150Logo.scale-150.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/himanshu8443/Study-Notion-master/d28626ce53c699e0f27f1071097a06ef11b8bb1d/public/windows11/Wide310x150Logo.scale-150.png -------------------------------------------------------------------------------- /public/windows11/Wide310x150Logo.scale-200.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/himanshu8443/Study-Notion-master/d28626ce53c699e0f27f1071097a06ef11b8bb1d/public/windows11/Wide310x150Logo.scale-200.png -------------------------------------------------------------------------------- /public/windows11/Wide310x150Logo.scale-400.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/himanshu8443/Study-Notion-master/d28626ce53c699e0f27f1071097a06ef11b8bb1d/public/windows11/Wide310x150Logo.scale-400.png -------------------------------------------------------------------------------- /server/.env.example: -------------------------------------------------------------------------------- 1 | MAIL_HOST = smtp.gmail.com # your mail host 2 | MAIL_USER = # your email 3 | MAIL_PASS = # your mail host key 4 | CORS_ORIGIN = ["http://localhost:3000"] 5 | 6 | 7 | 8 | JWT_SECRET = "create a JWT secret" 9 | FOLDER_NAME = "images" # cloudinary folder name where you want to save images 10 | FOLDER_VIDEO = "videos" # cloudinary folder name where you want to save videos 11 | 12 | 13 | 14 | RAZORPAY_KEY = # your razorpay key get from razorpay website Mandatory to run server 15 | RAZORPAY_SECRET = # your razorpay secret 16 | 17 | 18 | CLOUD_NAME = # your cloudinary name 19 | API_KEY = # your cloudinary api key 20 | API_SECRET = # your cloudinary api secret 21 | 22 | CONTACT_MAIL = sangwanhimanshu8443@gmail.com # Enter your mail, User enquiries will be sent to this mail 23 | 24 | 25 | 26 | PORT = "4000" # server port number 27 | MONGODB_URL = # your mongodb url -------------------------------------------------------------------------------- /server/Procfile: -------------------------------------------------------------------------------- 1 | web: node index.js 2 | -------------------------------------------------------------------------------- /server/config/cloudinary.js: -------------------------------------------------------------------------------- 1 | const cloudinary = require('cloudinary').v2 2 | 3 | exports.cloudnairyconnect= ()=>{ 4 | try { 5 | cloudinary.config({ 6 | cloud_name : process.env.CLOUD_NAME, 7 | api_key : process.env.API_KEY, 8 | api_secret : process.env.API_SECRET 9 | }) 10 | console.log("CD connected"); 11 | 12 | 13 | } catch (error) { 14 | console.log("error connecting CD"+error) 15 | } 16 | } -------------------------------------------------------------------------------- /server/config/database.js: -------------------------------------------------------------------------------- 1 | const mongoose = require("mongoose"); 2 | require("dotenv").config(); 3 | 4 | exports.connect = () => { 5 | mongoose.connect(process.env.MONGODB_URL, { 6 | useNewUrlParser: true, 7 | useUnifiedTopology:true, 8 | }) 9 | .then(() => console.log("DB Connected Successfully")) 10 | .catch( (error) => { 11 | console.log("DB Connection Failed"); 12 | console.error(error); 13 | process.exit(1); 14 | } ) 15 | }; -------------------------------------------------------------------------------- /server/config/razorpay.js: -------------------------------------------------------------------------------- 1 | const Razorpay = require("razorpay"); 2 | 3 | 4 | exports.instance = new Razorpay({ 5 | key_id: process.env.RAZORPAY_KEY, 6 | key_secret: process.env.RAZORPAY_SECRET, 7 | }); -------------------------------------------------------------------------------- /server/controllers/ContactUs.js: -------------------------------------------------------------------------------- 1 | const mailSender = require("../utils/mailSender"); 2 | 3 | exports.contactUs = async (req, res) => { 4 | const { firstName, lastName, email, message, phoneNo } = req.body; 5 | if (!firstName || !email || !message) { 6 | return res.status(403).send({ 7 | success: false, 8 | message: "All Fields are required", 9 | }); 10 | } 11 | try { 12 | const data = { 13 | firstName, 14 | lastName: `${lastName ? lastName : "null"}`, 15 | email, 16 | message, 17 | phoneNo: `${phoneNo ? phoneNo : "null"}`, 18 | }; 19 | const info = await mailSender( 20 | process.env.CONTACT_MAIL, 21 | "Enquery", 22 | `${Object.keys(data).map((key) => { 23 | return `

${key} : ${data[key]}

`; 24 | })}` 25 | ); 26 | if (info) { 27 | return res.status(200).send({ 28 | success: true, 29 | message: "Your message has been sent successfully", 30 | }); 31 | } else { 32 | return res.status(403).send({ 33 | success: false, 34 | message: "Something went wrong", 35 | }); 36 | } 37 | } catch (error) { 38 | return res.status(403).send({ 39 | success: false, 40 | message: "Something went wrong", 41 | }); 42 | } 43 | }; 44 | -------------------------------------------------------------------------------- /server/controllers/RatingAndReviews.js: -------------------------------------------------------------------------------- 1 | const RatingAndReview=require("../models/RatingAndReview") 2 | const Course = require("../models/Course"); 3 | const { default: mongoose } = require("mongoose"); 4 | 5 | 6 | exports.createRating = async (req,res)=>{ 7 | try { 8 | const userId=req.user.id; 9 | const {rating, review,courseId} = req.body; 10 | const courseDetails= await Course.find({_id: courseId, 11 | studentsEnrolled: {$elemMatch:{$eq:userId}}}); 12 | 13 | if(!courseDetails){ 14 | return res.status(404).json({success:false,emessage: "Student not enrolled in course"}); 15 | }; 16 | const alreadyReviewed =await RatingAndReview.findOne({user:userId, 17 | course:courseId}); 18 | 19 | if(alreadyReviewed){ 20 | return res.status(404).json({success: false,message: "Already reviewed"}); 21 | } 22 | const ratingReview= await RatingAndReview.create({rating, 23 | review, 24 | course:courseId, 25 | user:userId}); 26 | 27 | 28 | await Course.findByIdAndUpdate({_id:courseId}, 29 | { 30 | $push:{ 31 | ratingAndReviews: ratingReview._id 32 | }}); 33 | 34 | 35 | res.status(200).json({ 36 | success: true, 37 | message: "Rating added successfully", 38 | ratingReview}); 39 | 40 | } catch (error) { 41 | console.log(error); 42 | res.status(500).json({message: error.message}); 43 | } 44 | } 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | exports.getAverageRating = async (res,req)=>{ 54 | try { 55 | const courseId=req.body.courseId; 56 | const result= await RatingAndReview.aggregate([ 57 | { 58 | $match:{ 59 | course:new mongoose.Types.ObjectId(courseId), 60 | } 61 | }, 62 | { 63 | $group:{ 64 | _id:null, 65 | averageRating: {$avg:"$rating"} 66 | } 67 | } 68 | ]); 69 | 70 | if(result.length > 0) { 71 | return res.status(200).json({averageRating: result[0].averageRating}); 72 | } 73 | else{ 74 | return res.status(200).json({message: "Average rating is 0", 75 | averageRating:0}); 76 | } 77 | 78 | } catch (error) { 79 | console.log(error); 80 | res.status(500).json({message: error.message}); 81 | } 82 | }; 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | exports.getAllRating = async (req,res) => { 93 | //get sorted by rating 94 | try { 95 | const allReviews = await RatingAndReview.find( 96 | ).sort({rating: -1}) 97 | .populate({path: "user", 98 | select: "firstName lastName email image"}) 99 | .populate({path: "course", 100 | select: "courseName"}) 101 | .exec(); 102 | 103 | return res.status(200).json({ 104 | success: true, 105 | message:"all reviews fetched successfully", 106 | data:allReviews, 107 | }); 108 | } catch (error) { 109 | console.log(error); 110 | res.status(500).json({message: error.message}); 111 | } 112 | } -------------------------------------------------------------------------------- /server/controllers/ResetPassword.js: -------------------------------------------------------------------------------- 1 | const User = require("../models/User"); 2 | const mailSender = require("../utils/mailSender"); 3 | const bcrypt = require("bcrypt"); 4 | const crypto = require("crypto"); 5 | 6 | exports.resetPasswordToken = async (req, res) => { 7 | try { 8 | const email = req.body.email; 9 | const user = await User.findOne({ email: email }); 10 | if (!user) { 11 | return res.json({ 12 | success: false, 13 | message: `This Email: ${email} is not Registered With Us Enter a Valid Email `, 14 | }); 15 | } 16 | const token = crypto.randomBytes(20).toString("hex"); 17 | 18 | const updatedDetails = await User.findOneAndUpdate( 19 | { email: email }, 20 | { 21 | token: token, 22 | resetPasswordExpires: Date.now() + 3600000, 23 | }, 24 | { new: true } 25 | ); 26 | console.log("DETAILS", updatedDetails); 27 | 28 | const url = `https://studynotion.fun/update-password/${token}`; 29 | 30 | await mailSender( 31 | email, 32 | "Password Reset", 33 | `Your Link for email verification is ${url}. Please click this url to reset your password.` 34 | ); 35 | 36 | res.json({ 37 | success: true, 38 | message: 39 | "Email Sent Successfully, Please Check Your Email to Continue Further", 40 | }); 41 | } catch (error) { 42 | return res.json({ 43 | error: error.message, 44 | success: false, 45 | message: `Some Error in Sending the Reset Message`, 46 | }); 47 | } 48 | }; 49 | 50 | exports.resetPassword = async (req, res) => { 51 | try { 52 | const { password, confirmPassword, token } = req.body; 53 | 54 | if (confirmPassword !== password) { 55 | return res.json({ 56 | success: false, 57 | message: "Password and Confirm Password Does not Match", 58 | }); 59 | } 60 | const userDetails = await User.findOne({ token: token }); 61 | if (!userDetails) { 62 | return res.json({ 63 | success: false, 64 | message: "Token is Invalid", 65 | }); 66 | } 67 | if (!(userDetails.resetPasswordExpires > Date.now())) { 68 | return res.status(403).json({ 69 | success: false, 70 | message: `Token is Expired, Please Regenerate Your Token`, 71 | }); 72 | } 73 | const encryptedPassword = await bcrypt.hash(password, 10); 74 | await User.findOneAndUpdate( 75 | { token: token }, 76 | { password: encryptedPassword }, 77 | { new: true } 78 | ); 79 | res.json({ 80 | success: true, 81 | message: `Password Reset Successful`, 82 | }); 83 | } catch (error) { 84 | return res.json({ 85 | error: error.message, 86 | success: false, 87 | message: `Some Error in Updating the Password`, 88 | }); 89 | } 90 | }; -------------------------------------------------------------------------------- /server/controllers/Section.js: -------------------------------------------------------------------------------- 1 | const Section = require("../models/Section"); 2 | const Course = require("../models/Course"); 3 | // CREATE a new section 4 | exports.createSection = async (req, res) => { 5 | try { 6 | // Extract the required properties from the request body 7 | const { sectionName, courseId } = req.body; 8 | 9 | // Validate the input 10 | if (!sectionName || !courseId) { 11 | return res.status(400).json({ 12 | success: false, 13 | message: "Missing required properties", 14 | }); 15 | } 16 | 17 | const ifcourse= await Course.findById(courseId); 18 | if (!ifcourse) { 19 | return res.status(404).json({ 20 | success: false, 21 | message: "Course not found", 22 | }); 23 | } 24 | 25 | // Create a new section with the given name 26 | const newSection = await Section.create({ sectionName }); 27 | 28 | // Add the new section to the course's content array 29 | const updatedCourse = await Course.findByIdAndUpdate( 30 | courseId, 31 | { 32 | $push: { 33 | courseContent: newSection._id, 34 | }, 35 | }, 36 | { new: true } 37 | ) 38 | .populate({ 39 | path: "courseContent", 40 | populate: { 41 | path: "subSection", 42 | }, 43 | }) 44 | .exec(); 45 | 46 | // Return the updated course object in the response 47 | res.status(200).json({ 48 | success: true, 49 | message: "Section created successfully", 50 | updatedCourse, 51 | }); 52 | } catch (error) { 53 | // Handle errors 54 | res.status(500).json({ 55 | success: false, 56 | message: "Internal server error", 57 | error: error.message, 58 | }); 59 | } 60 | }; 61 | 62 | // UPDATE a section 63 | exports.updateSection = async (req, res) => { 64 | try { 65 | const { sectionName, sectionId,courseId } = req.body; 66 | console.log(sectionName, sectionId); 67 | const section = await Section.findByIdAndUpdate( 68 | sectionId, 69 | { sectionName }, 70 | { new: true } 71 | ); 72 | const updatedCourse = await Course.findById(courseId).populate({ path: "courseContent", populate: { path: "subSection" } }).exec(); 73 | res.status(200).json({ 74 | success: true, 75 | message: "Section updated successfully", 76 | updatedCourse, 77 | 78 | }); 79 | } catch (error) { 80 | console.error("Error updating section:", error); 81 | res.status(500).json({ 82 | success: false, 83 | message: "Internal server error", 84 | }); 85 | } 86 | }; 87 | 88 | // DELETE a section 89 | exports.deleteSection = async (req, res) => { 90 | try { 91 | const { sectionId,courseId } = req.body; 92 | await Section.findByIdAndDelete(sectionId); 93 | const updatedCourse = await Course.findById(courseId).populate({ path: "courseContent", populate: { path: "subSection" } }).exec(); 94 | res.status(200).json({ 95 | success: true, 96 | message: "Section deleted", 97 | updatedCourse, 98 | }); 99 | } catch (error) { 100 | console.error("Error deleting section:", error); 101 | res.status(500).json({ 102 | success: false, 103 | message: "Internal server error", 104 | }); 105 | } 106 | }; -------------------------------------------------------------------------------- /server/index.js: -------------------------------------------------------------------------------- 1 | const express = require("express"); 2 | 3 | const app = express(); 4 | 5 | const userRoutes = require("./routes/User"); 6 | const paymentRoutes = require("./routes/Payments"); 7 | const profileRoutes = require("./routes/Profile"); 8 | const CourseRoutes = require("./routes/Course"); 9 | 10 | const database = require("./config/database"); 11 | const cookieParser = require("cookie-parser"); 12 | 13 | const cors = require("cors"); 14 | const fileUpload = require("express-fileupload"); 15 | const { cloudnairyconnect } = require("./config/cloudinary"); 16 | 17 | const dotenv = require("dotenv"); 18 | dotenv.config(); 19 | 20 | const PORT = process.env.PORT || 5000; 21 | database.connect(); 22 | 23 | app.use(express.json()); 24 | app.use(cookieParser()); 25 | 26 | const whitelist = process.env.CORS_ORIGIN 27 | ? JSON.parse(process.env.CORS_ORIGIN) 28 | : ["*"]; 29 | 30 | app.use( 31 | cors({ 32 | origin: whitelist, 33 | credentials: true, 34 | maxAge: 14400, 35 | }) 36 | ); 37 | 38 | app.use( 39 | fileUpload({ 40 | useTempFiles: true, 41 | tempFileDir: "/tmp", 42 | }) 43 | ); 44 | 45 | cloudnairyconnect(); 46 | 47 | app.use("/api/v1/auth", userRoutes); 48 | 49 | app.use("/api/v1/payment", paymentRoutes); 50 | 51 | app.use("/api/v1/profile", profileRoutes); 52 | 53 | app.use("/api/v1/course", CourseRoutes); 54 | 55 | app.use("/api/v1/contact", require("./routes/ContactUs")); 56 | 57 | app.get("/", (req, res) => { 58 | res.status(200).json({ 59 | message: "Welcome to the API", 60 | }); 61 | }); 62 | 63 | app.listen(PORT, () => { 64 | console.log(`Server is running on port ${PORT}`); 65 | }); 66 | -------------------------------------------------------------------------------- /server/mail/templates/courseEnrollmentEmail.js: -------------------------------------------------------------------------------- 1 | exports.courseEnrollmentEmail = (courseName, name) => { 2 | return ` 3 | 4 | 5 | 6 | 7 | Course Registration Confirmation 8 | 65 | 66 | 67 | 68 | 69 |
70 | 72 |
Course Registration Confirmation
73 |
74 |

Dear ${name},

75 |

You have successfully registered for the course "${courseName}". We 76 | are excited to have you as a participant!

77 |

Please log in to your learning dashboard to access the course materials and start your learning journey. 78 |

79 | Go to Dashboard 80 |
81 |
If you have any questions or need assistance, please feel free to reach out to us at info@studynotion.com. We are here to help!
83 |
84 | 85 | 86 | `; 87 | }; -------------------------------------------------------------------------------- /server/mail/templates/emailVerificationTemplate.js: -------------------------------------------------------------------------------- 1 | const otpTemplate = (otp) => { 2 | return ` 3 | 4 | 5 | 6 | 7 | OTP Verification Email 8 | 64 | 65 | 66 | 67 | 68 |
69 | 71 |
OTP Verification Email
72 |
73 |

Dear User,

74 |

Thank you for registering with StudyNotion. To complete your registration, please use the following OTP 75 | (One-Time Password) to verify your account:

76 |

${otp}

77 |

This OTP is valid for 5 minutes. If you did not request this verification, please disregard this email. 78 | Once your account is verified, you will have access to our platform and its features.

79 |
80 |
If you have any questions or need assistance, please feel free to reach out to us at info@studynotion.com. We are here to help!
82 |
83 | 84 | 85 | `; 86 | }; 87 | module.exports = otpTemplate; -------------------------------------------------------------------------------- /server/mail/templates/passwordUpdate.js: -------------------------------------------------------------------------------- 1 | exports.passwordUpdated = (email, name) => { 2 | return ` 3 | 4 | 5 | 6 | 7 | Password Update Confirmation 8 | 53 | 54 | 55 | 56 | 57 |
58 | 60 |
Password Update Confirmation
61 |
62 |

Hey ${name},

63 |

Your password has been successfully updated for the email ${email}. 64 |

65 |

If you did not request this password change, please contact us immediately to secure your account.

66 |
67 |
If you have any questions or need further assistance, please feel free to reach out to us 68 | at 69 | info@studynotion.com. We are here to help! 70 |
71 |
72 | 73 | 74 | `; 75 | }; -------------------------------------------------------------------------------- /server/mail/templates/paymentSuccess.js: -------------------------------------------------------------------------------- 1 | exports.paymentSuccess = (amount, paymentId, orderId, name,lastname) => { 2 | return ` 3 | 4 | 5 | 6 | 7 | Course Registration Confirmation 8 | 65 | 66 | 67 | 68 | 69 |
70 | 72 |
73 | Your payment of ₹${amount} has been successfully received. 74 |
75 |
76 |

Dear ${name} ${lastname},

77 |

78 | Thank you for purchasing the course. Your payment of ₹${amount} has been successfully received. 79 |

80 |

81 | Your payment ID is ${paymentId} and your order ID is ${orderId}. 83 |

84 |
85 |
If you have any questions or need assistance, please feel free to reach out to us at info@studynotion.com. We are here to help!
87 |
88 | 89 | 90 | `; 91 | }; -------------------------------------------------------------------------------- /server/middlewares/auth.js: -------------------------------------------------------------------------------- 1 | const jwt = require("jsonwebtoken"); 2 | require("dotenv").config(); 3 | const User = require("../models/User"); 4 | 5 | //auth 6 | exports.auth = async (req, res, next) => { 7 | try{ 8 | //extract token 9 | const token = req.cookies.token 10 | || req.body.token 11 | || req.header("Authorisation").replace("Bearer ", ""); 12 | 13 | //if token missing, then return response 14 | if(!token) { 15 | return res.status(401).json({ 16 | success:false, 17 | message:'TOken is missing', 18 | }); 19 | } 20 | 21 | //verify the token 22 | try{ 23 | const decode = jwt.verify(token, process.env.JWT_SECRET); 24 | console.log("decode= ",decode); 25 | req.user = decode; 26 | } 27 | catch(err) { 28 | //verification - issue 29 | return res.status(401).json({ 30 | success:false, 31 | message:'token is invalid', 32 | }); 33 | } 34 | next(); 35 | } 36 | catch(error) { 37 | return res.status(401).json({ 38 | success:false, 39 | message:'Something went wrong while validating the token', 40 | }); 41 | } 42 | } 43 | 44 | //isStudent 45 | exports.isStudent = async (req, res, next) => { 46 | try{ 47 | if(req.user.accountType !== "Student") { 48 | return res.status(401).json({ 49 | success:false, 50 | message:'This is a protected route for Students only', 51 | }); 52 | } 53 | next(); 54 | } 55 | catch(error) { 56 | return res.status(500).json({ 57 | success:false, 58 | message:'User role cannot be verified, please try again' 59 | }) 60 | } 61 | } 62 | 63 | 64 | //isInstructor 65 | exports.isInstructor = async (req, res, next) => { 66 | try{ 67 | if(req.user.accountType !== "Instructor") { 68 | return res.status(401).json({ 69 | success:false, 70 | message:'This is a protected route for Instructor only', 71 | }); 72 | } 73 | next(); 74 | } 75 | catch(error) { 76 | return res.status(500).json({ 77 | success:false, 78 | message:'User role cannot be verified, please try again' 79 | }) 80 | } 81 | } 82 | 83 | 84 | //isAdmin 85 | exports.isAdmin = async (req, res, next) => { 86 | try{ 87 | if(req.user.accountType !== "Admin") { 88 | return res.status(401).json({ 89 | success:false, 90 | message:'This is a protected route for Admin only', 91 | }); 92 | } 93 | next(); 94 | } 95 | catch(error) { 96 | return res.status(500).json({ 97 | success:false, 98 | message:'User role cannot be verified, please try again' 99 | }) 100 | } 101 | } -------------------------------------------------------------------------------- /server/middlewares/demo.js: -------------------------------------------------------------------------------- 1 | 2 | 3 | //check if demo user 4 | exports.isDemo = async (req, res, next)=> { 5 | console.log(req.user.email); 6 | if (req.user.email === "kumarhimanshusangwan@gmail.com" || req.user.email === "1234@gmail.com") { 7 | return res.status(401).json({ 8 | success: false, 9 | message: "This is a Demo User", 10 | }); 11 | } 12 | next(); 13 | } -------------------------------------------------------------------------------- /server/models/Category.js: -------------------------------------------------------------------------------- 1 | const mongoose = require("mongoose"); 2 | 3 | // Define the Tags schema 4 | const categorySchema = new mongoose.Schema({ 5 | name: { 6 | type: String, 7 | required: true, 8 | }, 9 | description: { type: String }, 10 | courses: [ 11 | { 12 | type: mongoose.Schema.Types.ObjectId, 13 | ref: "Course", 14 | }, 15 | ], 16 | }); 17 | 18 | // Export the Tags model 19 | module.exports = mongoose.model("Category", categorySchema); -------------------------------------------------------------------------------- /server/models/Course.js: -------------------------------------------------------------------------------- 1 | const mongoose = require("mongoose"); 2 | 3 | // Define the Courses schema 4 | const coursesSchema = new mongoose.Schema({ 5 | courseName: { type: String }, 6 | courseDescription: { type: String }, 7 | instructor: { 8 | type: mongoose.Schema.Types.ObjectId, 9 | required: true, 10 | ref: "user", 11 | }, 12 | whatYouWillLearn: { 13 | type: String, 14 | }, 15 | courseContent: [ 16 | { 17 | type: mongoose.Schema.Types.ObjectId, 18 | ref: "Section", 19 | }, 20 | ], 21 | ratingAndReviews: [ 22 | { 23 | type: mongoose.Schema.Types.ObjectId, 24 | ref: "RatingAndReview", 25 | }, 26 | ], 27 | price: { 28 | type: Number, 29 | }, 30 | thumbnail: { 31 | type: String, 32 | }, 33 | tag: { 34 | type: [String], 35 | required: true, 36 | }, 37 | category: { 38 | type: mongoose.Schema.Types.ObjectId, 39 | // required: true, 40 | ref: "Category", 41 | }, 42 | studentsEnrolled: [ 43 | { 44 | type: mongoose.Schema.Types.ObjectId, 45 | required: true, 46 | ref: "user", 47 | }, 48 | ], 49 | instructions: { 50 | type: [String], 51 | }, 52 | status: { 53 | type: String, 54 | enum: ["Draft", "Published"], 55 | }, 56 | }, 57 | { timestamps: true } 58 | ); 59 | 60 | // Export the Courses model 61 | module.exports = mongoose.model("Course", coursesSchema); -------------------------------------------------------------------------------- /server/models/CourseProgress.js: -------------------------------------------------------------------------------- 1 | const mongoose = require("mongoose"); 2 | 3 | const courseProgress = new mongoose.Schema({ 4 | courseID: { 5 | type: mongoose.Schema.Types.ObjectId, 6 | ref: "Course", 7 | }, 8 | userID: { 9 | type: mongoose.Schema.Types.ObjectId, 10 | ref: "User", 11 | }, 12 | completedVideos: [ 13 | { 14 | type: mongoose.Schema.Types.ObjectId, 15 | ref: "SubSection", 16 | }, 17 | ], 18 | }); 19 | 20 | module.exports = mongoose.model("courseProgress", courseProgress); -------------------------------------------------------------------------------- /server/models/OTP.js: -------------------------------------------------------------------------------- 1 | const mongoose = require("mongoose"); 2 | const mailSender = require("../utils/mailSender"); 3 | const emailTemplate = require("../mail/templates/emailVerificationTemplate"); 4 | const OTPSchema = new mongoose.Schema({ 5 | email: { 6 | type: String, 7 | required: true, 8 | }, 9 | otp: { 10 | type: String, 11 | required: true, 12 | }, 13 | createdAt: { 14 | type: Date, 15 | default: Date.now, 16 | expires: 60 * 5, // The document will be automatically deleted after 5 minutes of its creation time 17 | }, 18 | }); 19 | 20 | // Define a function to send emails 21 | async function sendVerificationEmail(email, otp) { 22 | // Create a transporter to send emails 23 | 24 | // Define the email options 25 | 26 | // Send the email 27 | try { 28 | const mailResponse = await mailSender( 29 | email, 30 | "Verification Email", 31 | emailTemplate(otp) 32 | ); 33 | console.log("Email sent successfully: ", mailResponse); 34 | } catch (error) { 35 | console.log("Error occurred while sending email: ", error); 36 | throw error; 37 | } 38 | } 39 | 40 | // Define a post-save hook to send email after the document has been saved 41 | OTPSchema.pre("save", async function (next) { 42 | console.log("New document saved to database"); 43 | 44 | // Only send an email when a new document is created 45 | if (this.isNew) { 46 | await sendVerificationEmail(this.email, this.otp); 47 | } 48 | next(); 49 | }); 50 | 51 | const OTP = mongoose.model("OTP", OTPSchema); 52 | 53 | module.exports = OTP; -------------------------------------------------------------------------------- /server/models/Profile.js: -------------------------------------------------------------------------------- 1 | const mongoose = require("mongoose"); 2 | 3 | // Define the Profile schema 4 | const profileSchema = new mongoose.Schema({ 5 | gender: { 6 | type: String, 7 | }, 8 | dateOfBirth: { 9 | type: String, 10 | }, 11 | about: { 12 | type: String, 13 | trim: true, 14 | }, 15 | contactNumber: { 16 | type: Number, 17 | trim: true, 18 | }, 19 | }); 20 | 21 | // Export the Profile model 22 | module.exports = mongoose.model("Profile", profileSchema); -------------------------------------------------------------------------------- /server/models/RatingAndReview.js: -------------------------------------------------------------------------------- 1 | const mongoose = require("mongoose"); 2 | 3 | // Define the RatingAndReview schema 4 | const ratingAndReviewSchema = new mongoose.Schema({ 5 | user: { 6 | type: mongoose.Schema.Types.ObjectId, 7 | required: true, 8 | ref: "user", 9 | }, 10 | rating: { 11 | type: Number, 12 | required: true, 13 | }, 14 | review: { 15 | type: String, 16 | required: true, 17 | }, 18 | course: { 19 | type: mongoose.Schema.Types.ObjectId, 20 | required: true, 21 | ref: "Course", 22 | index: true, 23 | }, 24 | }); 25 | 26 | // Export the RatingAndReview model 27 | module.exports = mongoose.model("RatingAndReview", ratingAndReviewSchema); -------------------------------------------------------------------------------- /server/models/Section.js: -------------------------------------------------------------------------------- 1 | const mongoose = require("mongoose"); 2 | 3 | // Define the Section schema 4 | const sectionSchema = new mongoose.Schema({ 5 | sectionName: { 6 | type: String, 7 | }, 8 | subSection: [ 9 | { 10 | type: mongoose.Schema.Types.ObjectId, 11 | required: true, 12 | ref: "SubSection", 13 | }, 14 | ], 15 | }); 16 | 17 | // Export the Section model 18 | module.exports = mongoose.model("Section", sectionSchema); -------------------------------------------------------------------------------- /server/models/SubSection.js: -------------------------------------------------------------------------------- 1 | const mongoose = require("mongoose"); 2 | 3 | const SubSectionSchema = new mongoose.Schema({ 4 | title: { type: String }, 5 | timeDuration: { type: String }, 6 | description: { type: String }, 7 | videoUrl: { type: String }, 8 | }); 9 | 10 | module.exports = mongoose.model("SubSection", SubSectionSchema); -------------------------------------------------------------------------------- /server/models/User.js: -------------------------------------------------------------------------------- 1 | // Import the Mongoose library 2 | const mongoose = require("mongoose"); 3 | 4 | // Define the user schema using the Mongoose Schema constructor 5 | const userSchema = new mongoose.Schema( 6 | { 7 | // Define the name field with type String, required, and trimmed 8 | firstName: { 9 | type: String, 10 | required: true, 11 | trim: true, 12 | }, 13 | lastName: { 14 | type: String, 15 | required: true, 16 | trim: true, 17 | }, 18 | // Define the email field with type String, required, and trimmed 19 | email: { 20 | type: String, 21 | required: true, 22 | trim: true, 23 | }, 24 | 25 | // Define the password field with type String and required 26 | password: { 27 | type: String, 28 | required: true, 29 | }, 30 | // Define the role field with type String and enum values of "Admin", "Student", or "Visitor" 31 | accountType: { 32 | type: String, 33 | enum: ["Admin", "Student", "Instructor"], 34 | required: true, 35 | }, 36 | active: { 37 | type: Boolean, 38 | default: true, 39 | }, 40 | approved: { 41 | type: Boolean, 42 | default: true, 43 | }, 44 | additionalDetails: { 45 | type: mongoose.Schema.Types.ObjectId, 46 | required: true, 47 | ref: "Profile", 48 | }, 49 | courses: [ 50 | { 51 | type: mongoose.Schema.Types.ObjectId, 52 | ref: "Course", 53 | }, 54 | ], 55 | token: { 56 | type: String, 57 | }, 58 | resetPasswordExpires: { 59 | type: Date, 60 | }, 61 | image: { 62 | type: String, 63 | required: true, 64 | }, 65 | courseProgress: [ 66 | { 67 | type: mongoose.Schema.Types.ObjectId, 68 | ref: "courseProgress", 69 | }, 70 | ], 71 | 72 | // Add timestamps for when the document is created and last modified 73 | }, 74 | { timestamps: true } 75 | ); 76 | 77 | // Export the Mongoose model for the user schema, using the name "user" 78 | module.exports = mongoose.model("user", userSchema); -------------------------------------------------------------------------------- /server/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "server", 3 | "version": "1.0.0", 4 | "description": "", 5 | "main": "index.js", 6 | "scripts": { 7 | "start": "node index.js", 8 | "dev": "nodemon index.js" 9 | }, 10 | "keywords": [], 11 | "author": "", 12 | "license": "ISC", 13 | "dependencies": { 14 | "bcrypt": "^5.1.0", 15 | "bcryptjs": "^2.4.3", 16 | "cloudinary": "^1.36.4", 17 | "cookie-parser": "^1.4.6", 18 | "cors": "^2.8.5", 19 | "dotenv": "^16.0.3", 20 | "express": "^4.18.2", 21 | "express-fileupload": "^1.4.0", 22 | "jsonwebtoken": "^9.0.0", 23 | "mongoose": "^7.1.0", 24 | "nodemailer": "^6.9.1", 25 | "nodemon": "^2.0.22", 26 | "otp-generator": "^4.0.1", 27 | "razorpay": "^2.8.6" 28 | }, 29 | "engines": { 30 | "node": ">=16.9" 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /server/routes/ContactUs.js: -------------------------------------------------------------------------------- 1 | const express = require("express") 2 | const router = express.Router() 3 | const {contactUs}=require("../controllers/ContactUs"); 4 | 5 | 6 | 7 | 8 | router.post("/contactUs", contactUs); 9 | 10 | module.exports = router; 11 | 12 | -------------------------------------------------------------------------------- /server/routes/Payments.js: -------------------------------------------------------------------------------- 1 | // Import the required modules 2 | const express = require("express") 3 | const router = express.Router() 4 | 5 | const { capturePayment, verifySignature,sendPaymentSuccessEmail } = require("../controllers/Payments") 6 | const { auth, isInstructor, isStudent, isAdmin } = require("../middlewares/auth") 7 | router.post("/capturePayment", auth, isStudent, capturePayment) 8 | router.post("/verifyPayment",auth,verifySignature) 9 | router.post("/sendPaymentSuccessEmail", auth, sendPaymentSuccessEmail) 10 | 11 | module.exports = router; -------------------------------------------------------------------------------- /server/routes/Profile.js: -------------------------------------------------------------------------------- 1 | const express = require("express") 2 | const router = express.Router() 3 | const { auth, isInstructor } = require("../middlewares/auth") 4 | const { 5 | deleteAccount, 6 | updateProfile, 7 | getAllUserDetails, 8 | updateDisplayPicture, 9 | getEnrolledCourses, 10 | instructorDashboard, 11 | } = require("../controllers/Profile") 12 | const { isDemo } = require("../middlewares/demo"); 13 | 14 | // ******************************************************************************************************** 15 | // Profile routes 16 | // ******************************************************************************************************** 17 | // Delet User Account 18 | router.delete("/deleteProfile",auth,isDemo,deleteAccount) 19 | router.put("/updateProfile", auth,isDemo, updateProfile) 20 | router.get("/getUserDetails", auth, getAllUserDetails) 21 | // Get Enrolled Courses 22 | router.get("/getEnrolledCourses", auth, getEnrolledCourses) 23 | router.put("/updateDisplayPicture", auth,isDemo, updateDisplayPicture) 24 | //get instructor dashboard details 25 | router.get("/getInstructorDashboardDetails",auth,isInstructor, instructorDashboard) 26 | 27 | module.exports = router; -------------------------------------------------------------------------------- /server/routes/User.js: -------------------------------------------------------------------------------- 1 | // Import the required modules 2 | const express = require("express") 3 | const router = express.Router() 4 | 5 | // Import the required controllers and middleware functions 6 | const { 7 | login, 8 | signup, 9 | sendotp, 10 | changePassword, 11 | } = require("../controllers/Auth") 12 | 13 | const {isDemo}=require("../middlewares/demo"); 14 | const { 15 | resetPasswordToken, 16 | resetPassword, 17 | } = require("../controllers/ResetPassword") 18 | 19 | const { auth } = require("../middlewares/auth") 20 | 21 | // Routes for Login, Signup, and Authentication 22 | 23 | // ******************************************************************************************************** 24 | // Authentication routes 25 | // ******************************************************************************************************** 26 | 27 | // Route for user login 28 | router.post("/login", login) 29 | 30 | // Route for user signup 31 | router.post("/signup", signup) 32 | 33 | // Route for sending OTP to the user's email 34 | router.post("/sendotp", sendotp) 35 | 36 | // Route for Changing the password 37 | router.post("/changepassword", auth,isDemo, changePassword) 38 | 39 | // ******************************************************************************************************** 40 | // Reset Password 41 | // ******************************************************************************************************** 42 | 43 | // Route for generating a reset password token 44 | router.post("/reset-password-token", resetPasswordToken) 45 | 46 | // Route for resetting user's password after verification 47 | router.post("/reset-password", resetPassword) 48 | 49 | // Export the router for use in the main application 50 | module.exports = router; -------------------------------------------------------------------------------- /server/utils/imageUploader.js: -------------------------------------------------------------------------------- 1 | const cloudinary = require('cloudinary').v2 2 | 3 | 4 | exports.uploadImageToCloudinary = async (file, folder, height, quality) => { 5 | const options = {folder}; 6 | if(height) { 7 | options.height = height; 8 | } 9 | if(quality) { 10 | options.quality = quality; 11 | } 12 | options.resource_type = "auto"; 13 | 14 | return await cloudinary.uploader.upload(file.tempFilePath, options); 15 | } -------------------------------------------------------------------------------- /server/utils/mailSender.js: -------------------------------------------------------------------------------- 1 | const nodemailer = require("nodemailer"); 2 | require('dotenv').config() 3 | 4 | 5 | const mailSender = async (email, title, body) => { 6 | try{ 7 | let transporter = nodemailer.createTransport({ 8 | host:process.env.MAIL_HOST, 9 | port: 587, 10 | auth:{ 11 | user: process.env.MAIL_USER, 12 | pass: process.env.MAIL_PASS, 13 | } 14 | }) 15 | 16 | 17 | let info = await transporter.sendMail({ 18 | from: `"Study Notion" <${process.env.MAIL_USER}>`, 19 | to:`${email}`, 20 | subject: `${title}`, 21 | html: `${body}`, 22 | }) 23 | console.log(info); 24 | return info; 25 | } 26 | catch(error) { 27 | console.log(error.message); 28 | return error; 29 | } 30 | } 31 | 32 | 33 | module.exports = mailSender; -------------------------------------------------------------------------------- /server/utils/secToDuration.js: -------------------------------------------------------------------------------- 1 | // Helper function to convert total seconds to the duration format 2 | function convertSecondsToDuration(totalSeconds) { 3 | const hours = Math.floor(totalSeconds / 3600) 4 | const minutes = Math.floor((totalSeconds % 3600) / 60) 5 | const seconds = Math.floor((totalSeconds % 3600) % 60) 6 | 7 | if (hours > 0) { 8 | return `${hours}h ${minutes}m` 9 | } else if (minutes > 0) { 10 | return `${minutes}m ${seconds}s` 11 | } else { 12 | return `${seconds}s` 13 | } 14 | } 15 | 16 | module.exports = { 17 | convertSecondsToDuration, 18 | } -------------------------------------------------------------------------------- /src/Components/ScrollToTop.js: -------------------------------------------------------------------------------- 1 | import { useEffect } from 'react'; 2 | import { useLocation } from 'react-router-dom'; 3 | 4 | 5 | 6 | const ScrollToTop = () => { 7 | const { pathname } = useLocation(); 8 | useEffect(() => { 9 | window.scrollTo(0, 0); 10 | }, [ pathname]); 11 | 12 | return null; // Render nothing, as this is a utility component 13 | }; 14 | 15 | export default ScrollToTop; -------------------------------------------------------------------------------- /src/Components/common/ConfirmationModal.jsx: -------------------------------------------------------------------------------- 1 | import React from 'react' 2 | import IconBtn from './IconBtn' 3 | 4 | const ConfirmationModal = ({modalData}) => { 5 | return ( 6 |
7 |
8 |

9 | {modalData.text1} 10 |

11 |

12 | {modalData.text2} 13 |

14 |
15 | 19 | 22 |
23 |
24 | 25 |
26 | 27 |
28 | ) 29 | } 30 | 31 | export default ConfirmationModal 32 | -------------------------------------------------------------------------------- /src/Components/common/IconBtn.jsx: -------------------------------------------------------------------------------- 1 | import React from 'react' 2 | import {FiEdit} from "react-icons/fi" 3 | 4 | 5 | 6 | const IconBtn = ({ 7 | text, 8 | onclick, 9 | children, 10 | disabled, 11 | outline=false, 12 | customClasses, 13 | type, 14 | }) => { 15 | return ( 16 | 32 | ) 33 | } 34 | 35 | export default IconBtn 36 | -------------------------------------------------------------------------------- /src/Components/common/RatingStars.jsx: -------------------------------------------------------------------------------- 1 | import React, { useEffect, useState } from "react" 2 | import { 3 | TiStarFullOutline, 4 | TiStarHalfOutline, 5 | TiStarOutline, 6 | } from "react-icons/ti" 7 | 8 | function RatingStars({ Review_Count, Star_Size }) { 9 | const [starCount, SetStarCount] = useState({ 10 | full: 0, 11 | half: 0, 12 | empty: 0, 13 | }) 14 | 15 | useEffect(() => { 16 | const wholeStars = Math.floor(Review_Count) || 0 17 | SetStarCount({ 18 | full: wholeStars, 19 | half: Number.isInteger(Review_Count) ? 0 : 1, 20 | empty: Number.isInteger(Review_Count) ? 5 - wholeStars : 4 - wholeStars, 21 | }) 22 | }, [Review_Count]) 23 | return ( 24 |
25 | {[...new Array(starCount.full)].map((_, i) => { 26 | return 27 | })} 28 | {[...new Array(starCount.half)].map((_, i) => { 29 | return 30 | })} 31 | {[...new Array(starCount.empty)].map((_, i) => { 32 | return 33 | })} 34 |
35 | ) 36 | } 37 | 38 | export default RatingStars -------------------------------------------------------------------------------- /src/Components/common/Tab.jsx: -------------------------------------------------------------------------------- 1 | export default function Tab({ tabData, field, setField }) { 2 | return ( 3 |
9 | {tabData.map((tab) => ( 10 | 21 | ))} 22 |
23 | ); 24 | } -------------------------------------------------------------------------------- /src/Components/core/AboutPage/ContactFormSection.jsx: -------------------------------------------------------------------------------- 1 | import React from 'react' 2 | import ContactUsForm from '../../contactUs/ContactUsForm' 3 | 4 | const ContactFormSection = () => { 5 | return ( 6 |
7 |

8 | Get in Touch 9 |

10 |

11 | We'd love to here for you, Please fill out this form. 12 |

13 |
14 | 15 |
16 |
17 | ) 18 | } 19 | 20 | export default ContactFormSection 21 | -------------------------------------------------------------------------------- /src/Components/core/AboutPage/LearningGrid.jsx: -------------------------------------------------------------------------------- 1 | import React from 'react' 2 | import HighlightText from '../HomePage/HighlightText'; 3 | import CTAButton from "../../core/HomePage/Button"; 4 | 5 | const LearningGridArray = [ 6 | { 7 | order: -1, 8 | heading: "World-Class Learning for", 9 | highlightText: "Anyone, Anywhere", 10 | description: 11 | "Studynotion partners with more than 275+ leading universities and companies to bring flexible, affordable, job-relevant online learning to individuals and organizations worldwide.", 12 | BtnText: "Learn More", 13 | BtnLink: "/", 14 | }, 15 | { 16 | order: 1, 17 | heading: "Curriculum Based on Industry Needs", 18 | description: 19 | "Save time and money! The Belajar curriculum is made to be easier to understand and in line with industry needs.", 20 | }, 21 | { 22 | order: 2, 23 | heading: "Our Learning Methods", 24 | description: 25 | "Studynotion partners with more than 275+ leading universities and companies to bring", 26 | }, 27 | { 28 | order: 3, 29 | heading: "Certification", 30 | description: 31 | "Studynotion partners with more than 275+ leading universities and companies to bring", 32 | }, 33 | { 34 | order: 4, 35 | heading: `Rating "Auto-grading"`, 36 | description: 37 | "Studynotion partners with more than 275+ leading universities and companies to bring", 38 | }, 39 | { 40 | order: 5, 41 | heading: "Ready to Work", 42 | description: 43 | "Studynotion partners with more than 275+ leading universities and companies to bring", 44 | }, 45 | ]; 46 | 47 | 48 | const LearningGrid = () => { 49 | return ( 50 |
51 | { 52 | LearningGridArray.map( (card, index) => { 53 | return ( 54 |
64 | { 65 | card.order < 0 66 | ? ( 67 |
68 |
69 | {card.heading} 70 | 71 |
72 |

73 | {card.description} 74 |

75 |
76 | 77 | {card.BtnText} 78 | 79 |
80 |
81 | ) 82 | : (
83 |

84 | {card.heading} 85 |

86 |

87 | {card.description} 88 |

89 |
) 90 | } 91 | 92 |
93 | ) 94 | } ) 95 | } 96 |
97 | ) 98 | } 99 | 100 | export default LearningGrid 101 | -------------------------------------------------------------------------------- /src/Components/core/AboutPage/Quote.jsx: -------------------------------------------------------------------------------- 1 | import React from 'react' 2 | import HighlightText from '../HomePage/HighlightText' 3 | 4 | const Quote = () => { 5 | return ( 6 |
7 | We are passionate about revolutionizing the way we learn. Our innovative platform 8 | "combines technology 9 | 10 | {" "} 11 | expertise 12 | 13 | , and community to create an 14 | 15 | {" "} 16 | unparalleled educational experience. 17 | 18 |
19 | ) 20 | } 21 | 22 | export default Quote 23 | -------------------------------------------------------------------------------- /src/Components/core/AboutPage/Stats.jsx: -------------------------------------------------------------------------------- 1 | import React from 'react' 2 | 3 | 4 | const Stats = [ 5 | {count: "5K", label: "Active Students"}, 6 | {count: "10+", label: "Mentors"}, 7 | {count: "200+", label: "Courses"}, 8 | {count: "50+", label: "Awards"}, 9 | ]; 10 | 11 | const StatsComponent = () => { 12 | return ( 13 |
14 |
15 |
16 | { 17 | Stats.map( (data, index) => { 18 | return ( 19 |
20 |

21 | {data.count} 22 |

23 |

24 | {data.label} 25 |

26 |
27 | ) 28 | } ) 29 | } 30 |
31 |
32 |
33 | ) 34 | } 35 | 36 | export default StatsComponent 37 | -------------------------------------------------------------------------------- /src/Components/core/Auth/LoginForm.jsx: -------------------------------------------------------------------------------- 1 | import { useState } from "react" 2 | import { AiOutlineEye, AiOutlineEyeInvisible } from "react-icons/ai" 3 | import { useDispatch } from "react-redux" 4 | import { Link, useNavigate } from "react-router-dom" 5 | 6 | import { login } from "../../../services/operations/authAPI" 7 | import { setProgress } from "../../../slices/loadingBarSlice" 8 | 9 | function LoginForm() { 10 | const navigate = useNavigate() 11 | const dispatch = useDispatch() 12 | const [formData, setFormData] = useState({ 13 | email: "", 14 | password: "", 15 | }) 16 | 17 | const [showPassword, setShowPassword] = useState(false) 18 | 19 | const { email, password } = formData 20 | 21 | const handleOnChange = (e) => { 22 | setFormData((prevData) => ({ 23 | ...prevData, 24 | [e.target.name]: e.target.value, 25 | })) 26 | } 27 | 28 | const handleOnSubmit = (e) => { 29 | e.preventDefault() 30 | dispatch(login(email, password, navigate)) 31 | } 32 | 33 | return ( 34 |
38 | 55 | 87 | 93 |
94 | ) 95 | } 96 | 97 | export default LoginForm -------------------------------------------------------------------------------- /src/Components/core/Auth/OpenRoute.jsx: -------------------------------------------------------------------------------- 1 | // This will prevent authenticated users from accessing this route 2 | import { useSelector } from "react-redux" 3 | import { Navigate } from "react-router-dom" 4 | 5 | function OpenRoute({ children }) { 6 | const { token } = useSelector((state) => state.auth) 7 | 8 | if (token === null) { 9 | return children 10 | } else { 11 | return 12 | } 13 | } 14 | 15 | export default OpenRoute -------------------------------------------------------------------------------- /src/Components/core/Auth/PrivateRoute.jsx: -------------------------------------------------------------------------------- 1 | import React from 'react' 2 | import { useSelector } from 'react-redux' 3 | import { Navigate } from 'react-router-dom'; 4 | 5 | const PrivateRoute = ({children}) => { 6 | 7 | const {token} = useSelector((state) => state.auth); 8 | 9 | if(token !== null) 10 | return children 11 | else 12 | return 13 | 14 | } 15 | 16 | export default PrivateRoute 17 | -------------------------------------------------------------------------------- /src/Components/core/Auth/ProfileDropDown.jsx: -------------------------------------------------------------------------------- 1 | import { useRef, useState } from "react" 2 | import { AiOutlineCaretDown } from "react-icons/ai" 3 | import { VscDashboard, VscSignOut } from "react-icons/vsc" 4 | import { useDispatch, useSelector } from "react-redux" 5 | import { Link, useNavigate } from "react-router-dom" 6 | 7 | import useOnClickOutside from "../../../hooks/useOnClickOutside" 8 | import { logout } from "../../../services/operations/authAPI" 9 | 10 | export default function ProfileDropdown() { 11 | const { user } = useSelector((state) => state.profile) 12 | const dispatch = useDispatch() 13 | const navigate = useNavigate() 14 | const [open, setOpen] = useState(false) 15 | const ref = useRef(null) 16 | 17 | useOnClickOutside(ref, () => setOpen(false)) 18 | 19 | if (!user){ 20 | console.log("no user"); 21 | return localStorage.setItem("token",null) 22 | } 23 | 24 | return ( 25 | 59 | ) 60 | } -------------------------------------------------------------------------------- /src/Components/core/Auth/Template.jsx: -------------------------------------------------------------------------------- 1 | import { FcGoogle } from "react-icons/fc" 2 | import { useSelector } from "react-redux" 3 | 4 | import frameImg from "../../../assets/Images/frame.png" 5 | import LoginForm from "./LoginForm" 6 | import SignupForm from "./SignupForm" 7 | 8 | function Template({ title, description1, description2, image, formType }) { 9 | const { loading } = useSelector((state) => state.auth) 10 | 11 | return ( 12 |
13 | {loading ? ( 14 |
15 | ) : ( 16 |
17 |
18 |

19 | {title} 20 |

21 |

22 | {description1}{" "} 23 | 24 | {description2} 25 | 26 |

27 | {formType === "signup" ? : } 28 |
29 |
30 | Pattern 37 | Students 45 |
46 |
47 | )} 48 |
49 | ) 50 | } 51 | 52 | export default Template -------------------------------------------------------------------------------- /src/Components/core/Catalog/CatalogCard.jsx: -------------------------------------------------------------------------------- 1 | import React, { useEffect, useState } from 'react' 2 | import RatingStars from '../../common/RatingStars' 3 | import GetAvgRating from '../../../utils/avgRating'; 4 | import { Link } from 'react-router-dom'; 5 | 6 | const Course_Card = ({course, Height}) => { 7 | 8 | const [avgReviewCount, setAvgReviewCount] = useState(0); 9 | 10 | useEffect(()=> { 11 | const count = GetAvgRating(course.ratingAndReviews); 12 | setAvgReviewCount(count); 13 | },[course]) 14 | 15 | 16 | 17 | return ( 18 |
19 | 20 |
21 |
22 | course thumbnail 27 |
28 |
29 |

{course?.courseName}

30 |

By {course?.instructor?.firstName} {course?.instructor?.lastName}

31 |
32 | {avgReviewCount || 0} 33 | 34 | {course?.ratingAndReviews?.length} Ratings 35 |
36 |

Rs. {course?.price}

37 |
38 |
39 | 40 | 41 | 42 |
43 | ) 44 | } 45 | 46 | export default Course_Card 47 | -------------------------------------------------------------------------------- /src/Components/core/Dashboard/AddCourse/CourseInformation/ChipInput.jsx: -------------------------------------------------------------------------------- 1 | import React from 'react' 2 | import { FaTimes } from 'react-icons/fa'; 3 | import { useState } from 'react'; 4 | import { useEffect } from 'react'; 5 | import { useSelector } from 'react-redux'; 6 | 7 | const ChipInput = ({name, label, register, errors, setValue}) => { 8 | const [tags, settags] = useState([]) 9 | const {editCourse, course} = useSelector((state) => state.course); 10 | 11 | 12 | 13 | useEffect(()=> { 14 | register(name, { 15 | required:true, 16 | // validate: (value) => value.length > 0 17 | 18 | }); 19 | if(editCourse ) { 20 | settags(JSON.parse(course?.tag)); 21 | setValue(name, JSON.parse(course?.tag)); 22 | } 23 | },[]) 24 | 25 | return ( 26 |
27 | 28 |
29 | { 30 | tags.map((tag, index) => ( 31 |
32 | {tag} 33 | 44 |
45 | )) 46 | } 47 |
48 | { 54 | if(e.key === 'Enter' || e.key === ',') { 55 | e.preventDefault(); 56 | if(e.target.value) { 57 | settags([...tags, e.target.value]); 58 | setValue(name, [...tags, e.target.value]); 59 | e.target.value = ""; 60 | } 61 | } 62 | }} 63 | /> 64 | { 65 | errors[name] && Tags are required 66 | 67 | } 68 | 69 |
70 | ) 71 | } 72 | 73 | export default ChipInput; -------------------------------------------------------------------------------- /src/Components/core/Dashboard/AddCourse/CourseInformation/RequirementField.jsx: -------------------------------------------------------------------------------- 1 | import React, { useEffect, useState } from 'react' 2 | import { useSelector } from 'react-redux'; 3 | import { useForm } from 'react-hook-form'; 4 | 5 | 6 | const RequirementField = ({name, label, register, errors, setValue, getValues}) => { 7 | const [requirement, setRequirement] = useState(""); 8 | const [requirementList, setRequirementList] = useState([]); 9 | const {editCourse, course} = useSelector((state) => state.course); 10 | 11 | 12 | useEffect(()=> { 13 | register(name, { 14 | required:true, 15 | // validate: (value) => value.length > 0 16 | }) 17 | },[]) 18 | 19 | useEffect(()=> { 20 | setValue(name, requirementList); 21 | if(editCourse) { 22 | setRequirementList(course?.instructions); 23 | setValue(name, course?.instructions); 24 | } 25 | },[requirementList]) 26 | 27 | const handleAddRequirement = () => { 28 | if(requirement) { 29 | setRequirementList([...requirementList, requirement]); 30 | //setRequirement(""); 31 | } 32 | } 33 | 34 | const handleRemoveRequirement = (index) => { 35 | const updatedRequirementList = [...requirementList]; 36 | updatedRequirementList.splice(index, 1); 37 | setRequirementList(updatedRequirementList); 38 | } 39 | 40 | return ( 41 |
42 | 43 | 44 |
45 | setRequirement(e.target.value)} 50 | className='form-style w-full' 51 | /> 52 | 58 |
59 | 60 | { 61 | requirementList.length > 0 && ( 62 |
    63 | { 64 | requirementList.map((requirement, index) => ( 65 |
  • 66 | {requirement} 67 | 73 |
  • 74 | )) 75 | } 76 |
77 | ) 78 | } 79 | {errors[name] && ( 80 | 81 | {label} is required 82 | 83 | )} 84 | 85 |
86 | ) 87 | } 88 | 89 | export default RequirementField 90 | -------------------------------------------------------------------------------- /src/Components/core/Dashboard/AddCourse/CourseInformation/Upload.jsx: -------------------------------------------------------------------------------- 1 | import React from 'react' 2 | import { useState } from 'react' 3 | import { useEffect } from 'react' 4 | import { useSelector } from 'react-redux' 5 | 6 | const Upload = ({name, label, register, errors, setValue}) => { 7 | const [image, setimage] = useState(null) 8 | const {editCourse, course} = useSelector((state) => state.course); 9 | 10 | const handelonchange = (e) => { 11 | const file = e.target.files[0]; 12 | setValue(name, e.target.files[0]); 13 | if(file) { 14 | const reader = new FileReader(); 15 | reader.onloadend = () => { 16 | setimage(reader.result); 17 | } 18 | reader.readAsDataURL(file); 19 | } 20 | else { 21 | console.log("no file"); 22 | } 23 | } 24 | 25 | useEffect(() => { 26 | if(editCourse) { 27 | setimage(course?.thumbnail); 28 | } 29 | }, []) 30 | 31 | 32 | 33 | 34 | return ( 35 |
36 | { 37 | image ? ( 38 |
39 | 40 | 41 |
42 | ) : ( 43 |
44 | 86 | { 87 | errors.courseImage && ( 88 | Course Image is required** 89 | ) 90 | } 91 |
92 | ) 93 | 94 | } 95 | 96 | 97 | 98 |
99 | ) 100 | } 101 | 102 | export default Upload -------------------------------------------------------------------------------- /src/Components/core/Dashboard/AddCourse/RenderSteps.jsx: -------------------------------------------------------------------------------- 1 | import React from 'react' 2 | import { FaCheck } from 'react-icons/fa'; 3 | import { useSelector } from 'react-redux' 4 | import CourseBuilderForm from './CourseBuilder/CourseBuilderForm'; 5 | import CourseInformationForm from './CourseInformation/CourseInformationForm'; 6 | import PublishCourse from '../PublishCourse/PublishCourse'; 7 | 8 | const RenderSteps = () => { 9 | 10 | const {step} = useSelector((state)=> state.course); 11 | const steps = [ 12 | { 13 | id:1, 14 | title: "Course Information", 15 | }, 16 | { 17 | id:2, 18 | title: "Course Builder", 19 | }, 20 | { 21 | id:3, 22 | title: "Publishing Course", 23 | }, 24 | ] 25 | 26 | return ( 27 | <> 28 |
29 |
30 |
31 | {steps.map( (item) => ( 32 |
33 |
34 |
37 | { 38 | step > item.id ? () :(item.id) 39 | } 40 |
41 |
42 | {item.id <3 && ( 43 |
item.id ? "border-yellow-50" : "border-richblack-700"} 44 | }`}>
45 | )} 46 |
47 | ) )} 48 |
49 |
50 | {steps.map((item) => ( 51 | <> 52 |
53 |

{item.title}

54 |
55 | 56 | ))} 57 |
58 |
59 |
60 | 61 | {step === 1 && } 62 | {step === 2 && } 63 | {step===3 && } 64 | 65 | ) 66 | } 67 | 68 | export default RenderSteps 69 | -------------------------------------------------------------------------------- /src/Components/core/Dashboard/AddCourse/index.jsx: -------------------------------------------------------------------------------- 1 | import React from 'react' 2 | import RenderSteps from './RenderSteps' 3 | 4 | const AddCourse = () => { 5 | return ( 6 |
7 |
8 |
9 |

Add Course

10 | 11 |
12 |
13 |

⚡ Course Upload Tips

14 |
    15 |
  • Set the Course Price option or make it free.
  • 16 |
  • Standard size for the course thumbnail is 1024x576.
  • 17 |
  • Video section controls the course overview video.
  • 18 |
  • Course Builder is where you create and organize a course.
  • 19 |
  • Add Topics in the Course Builder section to create lessons, quizzes, and assignments.
  • 20 |
  • Information from the Additional Data section shows up on the course single page.
  • 21 |
  • Make Announcements to notify any important
  • 22 |
  • Notes to all enrolled students at once.
  • 23 |
24 |
25 |
26 |
27 | ) 28 | } 29 | 30 | export default AddCourse -------------------------------------------------------------------------------- /src/Components/core/Dashboard/AdminPannel.jsx: -------------------------------------------------------------------------------- 1 | import React from 'react' 2 | import { createCategory } from '../../../services/operations/courseDetailsAPI'; 3 | import { useSelector } from 'react-redux'; 4 | 5 | const AdminPannel = () => { 6 | const { token } = useSelector((state) => state.auth); 7 | const [category, setCategory] = React.useState({ 8 | name: '', 9 | description: '' 10 | }) 11 | 12 | 13 | const handleSubmit = async (e) => { 14 | e.preventDefault(); 15 | if (!category.name || !category.description) { 16 | return; 17 | } 18 | console.log(category); 19 | const res = await createCategory({ 20 | name: category.name, 21 | description: category.description 22 | }, token); 23 | 24 | } 25 | return ( 26 | // create categories 27 |
28 |
29 |
30 | 31 | setCategory({ ...category, name: e.target.value }) 33 | } type="text" name="category" id="category" className="form-style" placeholder='Enter category name' /> 34 |
35 |
36 | 37 | 71 | {errors.userExperience && * Please provide your expirence} 72 |
73 |
74 | 75 | 76 |
77 |
78 |
79 | 80 |
81 | 82 | ) 83 | } 84 | 85 | export default ReviewModal -------------------------------------------------------------------------------- /src/assets/Images/Compare_with_others.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/himanshu8443/Study-Notion-master/d28626ce53c699e0f27f1071097a06ef11b8bb1d/src/assets/Images/Compare_with_others.png -------------------------------------------------------------------------------- /src/assets/Images/FoundingStory.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/himanshu8443/Study-Notion-master/d28626ce53c699e0f27f1071097a06ef11b8bb1d/src/assets/Images/FoundingStory.png -------------------------------------------------------------------------------- /src/assets/Images/Instructor.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/himanshu8443/Study-Notion-master/d28626ce53c699e0f27f1071097a06ef11b8bb1d/src/assets/Images/Instructor.png -------------------------------------------------------------------------------- /src/assets/Images/Know_your_progress.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/himanshu8443/Study-Notion-master/d28626ce53c699e0f27f1071097a06ef11b8bb1d/src/assets/Images/Know_your_progress.png -------------------------------------------------------------------------------- /src/assets/Images/Plan_your_lessons.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/himanshu8443/Study-Notion-master/d28626ce53c699e0f27f1071097a06ef11b8bb1d/src/assets/Images/Plan_your_lessons.png -------------------------------------------------------------------------------- /src/assets/Images/TimelineImage.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/himanshu8443/Study-Notion-master/d28626ce53c699e0f27f1071097a06ef11b8bb1d/src/assets/Images/TimelineImage.png -------------------------------------------------------------------------------- /src/assets/Images/aboutus1.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/himanshu8443/Study-Notion-master/d28626ce53c699e0f27f1071097a06ef11b8bb1d/src/assets/Images/aboutus1.webp -------------------------------------------------------------------------------- /src/assets/Images/aboutus2.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/himanshu8443/Study-Notion-master/d28626ce53c699e0f27f1071097a06ef11b8bb1d/src/assets/Images/aboutus2.webp -------------------------------------------------------------------------------- /src/assets/Images/aboutus3.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/himanshu8443/Study-Notion-master/d28626ce53c699e0f27f1071097a06ef11b8bb1d/src/assets/Images/aboutus3.webp -------------------------------------------------------------------------------- /src/assets/Images/banner.mp4: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/himanshu8443/Study-Notion-master/d28626ce53c699e0f27f1071097a06ef11b8bb1d/src/assets/Images/banner.mp4 -------------------------------------------------------------------------------- /src/assets/Images/boxoffice.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/himanshu8443/Study-Notion-master/d28626ce53c699e0f27f1071097a06ef11b8bb1d/src/assets/Images/boxoffice.png -------------------------------------------------------------------------------- /src/assets/Images/frame.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/himanshu8443/Study-Notion-master/d28626ce53c699e0f27f1071097a06ef11b8bb1d/src/assets/Images/frame.png -------------------------------------------------------------------------------- /src/assets/Images/login.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/himanshu8443/Study-Notion-master/d28626ce53c699e0f27f1071097a06ef11b8bb1d/src/assets/Images/login.webp -------------------------------------------------------------------------------- /src/assets/Images/rzp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/himanshu8443/Study-Notion-master/d28626ce53c699e0f27f1071097a06ef11b8bb1d/src/assets/Images/rzp.png -------------------------------------------------------------------------------- /src/assets/Images/signup.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/himanshu8443/Study-Notion-master/d28626ce53c699e0f27f1071097a06ef11b8bb1d/src/assets/Images/signup.webp -------------------------------------------------------------------------------- /src/assets/Logo/Logo-Full-Dark.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/himanshu8443/Study-Notion-master/d28626ce53c699e0f27f1071097a06ef11b8bb1d/src/assets/Logo/Logo-Full-Dark.png -------------------------------------------------------------------------------- /src/assets/Logo/Logo-Full-Light.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/himanshu8443/Study-Notion-master/d28626ce53c699e0f27f1071097a06ef11b8bb1d/src/assets/Logo/Logo-Full-Light.png -------------------------------------------------------------------------------- /src/assets/Logo/Logo-Small-Dark.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/himanshu8443/Study-Notion-master/d28626ce53c699e0f27f1071097a06ef11b8bb1d/src/assets/Logo/Logo-Small-Dark.png -------------------------------------------------------------------------------- /src/assets/Logo/Logo-Small-Light.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/himanshu8443/Study-Notion-master/d28626ce53c699e0f27f1071097a06ef11b8bb1d/src/assets/Logo/Logo-Small-Light.png -------------------------------------------------------------------------------- /src/assets/TimeLineLogo/Logo1.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /src/assets/TimeLineLogo/Logo2.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /src/assets/TimeLineLogo/Logo3.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /src/assets/TimeLineLogo/Logo4.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /src/data/dashboard-links.js: -------------------------------------------------------------------------------- 1 | import { ACCOUNT_TYPE } from "../utils/constants"; 2 | export const sidebarLinks = [ 3 | { 4 | id: 1, 5 | name: "My Profile", 6 | path: "/dashboard/my-profile", 7 | icon: "VscAccount", 8 | }, 9 | { 10 | id: 2, 11 | name: "Dashboard", 12 | path: "/dashboard/instructor", 13 | type: ACCOUNT_TYPE.INSTRUCTOR, 14 | icon: "VscDashboard", 15 | }, 16 | { 17 | id: 3, 18 | name: "My Courses", 19 | path: "/dashboard/my-courses", 20 | type: ACCOUNT_TYPE.INSTRUCTOR, 21 | icon: "VscVm", 22 | }, 23 | { 24 | id: 4, 25 | name: "Add Course", 26 | path: "/dashboard/add-course", 27 | type: ACCOUNT_TYPE.INSTRUCTOR, 28 | icon: "VscAdd", 29 | }, 30 | { 31 | id: 5, 32 | name: "Enrolled Courses", 33 | path: "/dashboard/enrolled-courses", 34 | type: ACCOUNT_TYPE.STUDENT, 35 | icon: "VscMortarBoard", 36 | }, 37 | { 38 | id: 6, 39 | id: 7, 40 | name: "Cart", 41 | path: "/dashboard/cart", 42 | type: ACCOUNT_TYPE.STUDENT, 43 | icon: "VscBookmark", 44 | }, 45 | { 46 | name: "Admin Panel", 47 | path: "/dashboard/admin-panel", 48 | type: ACCOUNT_TYPE.ADMIN, 49 | icon: "VscHistory", 50 | }, 51 | ]; 52 | -------------------------------------------------------------------------------- /src/data/footer-links.js: -------------------------------------------------------------------------------- 1 | export const FooterLink2 = [ 2 | { 3 | title: "Subjects", 4 | links: [ 5 | { title: "Al", link: "/al" }, 6 | { title: "Cloud Computing", link: "/cloud-computing" }, 7 | { title: "Code Foundations", link: "/code-foundations" }, 8 | { title: "Computer Science", link: "/computer-science" }, 9 | { title: "Cybersecurity", link: "/cybersecurity" }, 10 | { title: "Data Analytics", link: "/data-analytics" }, 11 | { title: "Data Science", link: "/data-science" }, 12 | { title: "Data Visualization", link: "/data-visualization" }, 13 | { title: "Developer Tools", link: "/developer-tools" }, 14 | { title: "DevOps", link: "/devops" }, 15 | { title: "Game Development", link: "/game-development" }, 16 | { title: "IT", link: "/it" }, 17 | { title: "Machine Learning", link: "/machine-learning" }, 18 | { title: "Math", link: "/math" }, 19 | { title: "Mobile Development", link: "/mobile-development" }, 20 | { title: "Web Design", link: "/web-design" }, 21 | { title: "Web Development", link: "/web-development" }, 22 | ], 23 | }, 24 | { 25 | title: "Languages", 26 | links: [ 27 | { title: "Bash", link: "/bash" }, 28 | { title: "C++", link: "/c++" }, 29 | { title: "C#", link: "/csharp" }, 30 | { title: "Go", link: "/go" }, 31 | { title: "HTML & CSS", link: "/html-css" }, 32 | { title: "Java", link: "/java" }, 33 | { title: "JavaScript", link: "/javascript" }, 34 | { title: "Kotlin", link: "/kotlin" }, 35 | { title: "PHP", link: "/php" }, 36 | { title: "Python", link: "/python" }, 37 | { title: "R", link: "/r" }, 38 | { title: "Ruby", link: "/ruby" }, 39 | { title: "SQL", link: "/sql" }, 40 | { title: "Swift", link: "/swift" }, 41 | ], 42 | }, 43 | { 44 | title: "Career building", 45 | links: [ 46 | {title: "Career paths", link: "/career-paths"}, 47 | {title: "Career services", link: "/career-services"}, 48 | {title: "Interview prep", link: "/interview-prep"}, 49 | {title: "Professional certification", link: "/professional-certification"}, 50 | {title: "-", link: "/hi"}, 51 | {title: "Full Catalog", link: "/full-catalog"}, 52 | {title: "Beta Content", link: "/beta-content"} 53 | ] 54 | } 55 | ]; 56 | -------------------------------------------------------------------------------- /src/data/navbar-links.js: -------------------------------------------------------------------------------- 1 | export const NavbarLinks = [ 2 | { 3 | title: "Home", 4 | path: "/", 5 | }, 6 | { 7 | title: "Catalog", 8 | // path: '/catalog', 9 | }, 10 | { 11 | title: "About Us", 12 | path: "/about", 13 | }, 14 | { 15 | title: "Contact Us", 16 | path: "/contact", 17 | }, 18 | ]; 19 | -------------------------------------------------------------------------------- /src/hooks/useOnClickOutside.js: -------------------------------------------------------------------------------- 1 | import { useEffect } from "react"; 2 | 3 | // This hook detects clicks outside of the specified component and calls the provided handler function. 4 | export default function useOnClickOutside(ref, handler) { 5 | useEffect(() => { 6 | // Define the listener function to be called on click/touch events 7 | const listener = (event) => { 8 | // If the click/touch event originated inside the ref element, do nothing 9 | if (!ref.current || ref.current.contains(event.target)) { 10 | return; 11 | } 12 | // Otherwise, call the provided handler function 13 | handler(event); 14 | }; 15 | 16 | // Add event listeners for mousedown and touchstart events on the document 17 | document.addEventListener("mousedown", listener); 18 | document.addEventListener("touchstart", listener); 19 | 20 | // Cleanup function to remove the event listeners when the component unmounts or when the ref/handler dependencies change 21 | return () => { 22 | document.removeEventListener("mousedown", listener); 23 | document.removeEventListener("touchstart", listener); 24 | }; 25 | }, [ref, handler]); // Only run this effect when the ref or handler function changes 26 | } -------------------------------------------------------------------------------- /src/index.css: -------------------------------------------------------------------------------- 1 | @tailwind base; 2 | @tailwind components; 3 | @tailwind utilities; 4 | -------------------------------------------------------------------------------- /src/index.js: -------------------------------------------------------------------------------- 1 | import React from "react"; 2 | import ReactDOM from "react-dom/client"; 3 | import App from "./App"; 4 | import "./index.css"; 5 | import {BrowserRouter} from "react-router-dom" 6 | import {Provider} from "react-redux"; 7 | import { configureStore } from "@reduxjs/toolkit"; 8 | import rootReducer from "./reducers"; 9 | import { Toaster } from "react-hot-toast"; 10 | import ScrollToTop from "./Components/ScrollToTop"; 11 | import swDev from "./swDev"; 12 | 13 | const store= configureStore({ 14 | reducer: rootReducer, 15 | }); 16 | const root = ReactDOM.createRoot(document.getElementById("root")); 17 | root.render( 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | ); 26 | swDev(); 27 | -------------------------------------------------------------------------------- /src/pages/Dashboard.jsx: -------------------------------------------------------------------------------- 1 | import React from 'react' 2 | import { useSelector } from 'react-redux' 3 | import {Outlet} from "react-router-dom" 4 | import Sidebar from '../Components/core/Dashboard/Sidebar' 5 | 6 | const Dashboard = () => { 7 | 8 | const {loading: authLoading} = useSelector( (state) => state.auth ); 9 | const {loading: profileLoading} = useSelector( (state) => state.profile ); 10 | 11 | 12 | 13 | if(profileLoading || authLoading) { 14 | return ( 15 |
16 | Loading... 17 |
18 | ) 19 | } 20 | 21 | 22 | return ( 23 |
24 | 25 |
26 |
27 | 28 |
29 |
30 |
31 | ) 32 | } 33 | 34 | export default Dashboard 35 | -------------------------------------------------------------------------------- /src/pages/Error.jsx: -------------------------------------------------------------------------------- 1 | import React from 'react' 2 | 3 | const Error = () => { 4 | return ( 5 |
6 |

Error-404

7 |
8 | ) 9 | } 10 | 11 | export default Error -------------------------------------------------------------------------------- /src/pages/ForgotPassword.jsx: -------------------------------------------------------------------------------- 1 | import React from 'react' 2 | import { useState } from 'react' 3 | import { useSelector } from 'react-redux' 4 | import { Link } from 'react-router-dom' 5 | import { forgotPassword } from '../services/operations/authAPI' 6 | import { useDispatch } from 'react-redux' 7 | 8 | const ResetPassword = () => { 9 | const dispatch = useDispatch() 10 | const handleOnSubmit = (e) => { 11 | e.preventDefault(); 12 | dispatch(forgotPassword(email,setemailSent)); 13 | 14 | } 15 | const {loading}= useSelector((state)=>state.auth) 16 | const [emailSent, setemailSent] = useState(false) 17 | const [email, setemail] = useState(""); 18 | return ( 19 |
20 | { 21 | loading?(
): 22 | (
23 |

24 | { 25 | !emailSent?("Reset your password"):"Check email" 26 | } 27 |

28 |

29 | { 30 | !emailSent?("Have no fear. We'll email you instructions to reset your password. If you dont have access to your email we can try account recovery"):(`We have sent the reset email to ${email}`) 31 | } 32 |

33 |
34 | { 35 | !emailSent && ( 36 | 39 | ) 40 | } 41 | 44 |
45 |
46 | 47 |

Back To Login

48 | 49 |
50 |
51 | ) 52 | } 53 |
54 | ) 55 | } 56 | 57 | export default ResetPassword -------------------------------------------------------------------------------- /src/pages/Login.jsx: -------------------------------------------------------------------------------- 1 | import loginImg from "../assets/Images/login.webp" 2 | import Template from "../Components/core/Auth/Template" 3 | import { login } from "../services/operations/authAPI" 4 | import { useDispatch } from "react-redux" 5 | import { useNavigate } from "react-router-dom" 6 | import { useState } from "react" 7 | import { TbCornerDownRightDouble } from "react-icons/tb" 8 | import { BsLightningChargeFill } from "react-icons/bs" 9 | 10 | function Login() { 11 | const [showDemo, setShowDemo] = useState(true) 12 | const dispatch = useDispatch() 13 | const navigate = useNavigate() 14 | return ( 15 | <> 16 | {/* test login ID */} 17 |
18 |
19 |
{setShowDemo(false)}} className="absolute top-[-30px] right-[-20px] text-5xl text-richblack-900 rounded-full w-[40px] h-[40px] flex justify-center items-center cursor-pointer"> 20 | 21 | 22 | 23 | 24 | 25 |
26 |
27 |

Take a Demo  

28 |
29 | 36 |
37 |
38 | 45 |
46 |
47 |
48 |
49 |