Skip to content

prashantsaraswat1/Study_Notion

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

7 Commits
ย 
ย 
ย 
ย 

Repository files navigation

StudyNotion Logo

๐Ÿ“š StudyNotion โ€” Full Stack EdTech Platform

A production-grade Learning Management System built with the MERN Stack

Live Demo MIT License Node.js React MongoDB


StudyNotion is a scalable, production-deployed EdTech platform where instructors publish courses and students enroll, pay, and learn โ€” with full RBAC, payment gateway, and cloud media management.


StudyNotion Banner


๐ŸŒŸ Why This Project Stands Out

Feature Detail
๐Ÿ” JWT Auth + RBAC 3 roles (Student, Instructor, Admin) with 15+ protected API endpoints
๐Ÿ’ณ Payment Gateway Full Razorpay checkout flow with order creation & webhook verification
โ˜๏ธ Cloud Media Cloudinary integration for video/image storage with CDN delivery
๐Ÿš€ Production Deployed Vercel (frontend) + Render (backend) โ€” 99% uptime
๐Ÿ—๏ธ Scalable Architecture MVC pattern, modular routers, and service-layer separation

๐Ÿ“ธ Screenshots

๐Ÿ  Homepage โ€” Hero Section

Homepage

๐Ÿ“š Course Catalog Page

Course Catalog

๐Ÿ’ป Unlock Coding Potential Section

Coding Section

About Page Contact Page
About Contact

๐Ÿ” Signup โ€” Role-Based Registration (Student / Instructor)

Signup


๐Ÿ›๏ธ System Architecture

โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚                     CLIENT (React.js)                    โ”‚
โ”‚  Redux Toolkit โ”‚ Tailwind CSS โ”‚ Axios โ”‚ React Router     โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
                           โ”‚ REST API (JSON / HTTPS)
โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ–ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚                   SERVER (Node + Express)                 โ”‚
โ”‚   Auth Middleware โ”‚ RBAC Guards โ”‚ MVC Controllers         โ”‚
โ”‚   JWT Verification โ”‚ Razorpay SDK โ”‚ Cloudinary SDK        โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
           โ”‚                               โ”‚
โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ–ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”       โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ–ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚  MongoDB Atlas      โ”‚       โ”‚  Cloudinary CDN          โ”‚
โ”‚  (Primary Database) โ”‚       โ”‚  (Media Storage)         โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜       โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜

โœจ Features

๐Ÿ‘จโ€๐ŸŽ“ Student

  • Browse and search course catalog with filters
  • Secure Razorpay checkout for course enrollment
  • Video player with progress tracking per lecture
  • Profile management with avatar upload
  • Wishlist and cart functionality

๐Ÿ‘จโ€๐Ÿซ Instructor

  • Create / edit / delete courses with rich content editor
  • Upload videos directly to Cloudinary
  • Dashboard with revenue insights and enrollment stats
  • Manage course sections and sub-sections dynamically

๐Ÿ›ก๏ธ Admin

  • Platform-level analytics overview
  • Instructor and student account management
  • Course approval and moderation controls

๐Ÿ”’ Security & Auth

  • JWT Access Tokens with secure httpOnly cookie support
  • Password hashing with bcrypt (salt rounds: 10)
  • OTP-based email verification via NodeMailer
  • Role-based route protection on both frontend & backend

๐Ÿ› ๏ธ Tech Stack

Frontend

Technology Purpose
React.js 18 UI library with component-based architecture
Redux Toolkit Global state management (auth, cart, course)
Tailwind CSS Utility-first styling
React Router v6 Client-side navigation with protected routes
Axios HTTP client with request/response interceptors
Vite Lightning-fast dev server and build tool

Backend

Technology Purpose
Node.js + Express.js RESTful API server with MVC architecture
MongoDB + Mongoose NoSQL database with schema validation
JWT (jsonwebtoken) Stateless authentication
Bcrypt Secure password hashing
NodeMailer OTP and notification emails
Multer File upload middleware

Cloud & Services

Service Role
MongoDB Atlas Managed cloud database
Cloudinary Video/image CDN and storage
Razorpay Payment processing
Vercel Frontend hosting
Render Backend hosting

๐Ÿ“ Project Structure

StudyNotion/
โ”œโ”€โ”€ ๐Ÿ“‚ src/                         # React Frontend
โ”‚   โ”œโ”€โ”€ ๐Ÿ“‚ components/
โ”‚   โ”‚   โ”œโ”€โ”€ ๐Ÿ“‚ Auth/                # Login, Signup, OTP forms
โ”‚   โ”‚   โ”œโ”€โ”€ ๐Ÿ“‚ Dashboard/           # Role-specific dashboards
โ”‚   โ”‚   โ”œโ”€โ”€ ๐Ÿ“‚ Course/              # Course cards, player, catalog
โ”‚   โ”‚   โ””โ”€โ”€ ๐Ÿ“‚ Common/              # Navbar, Footer, Spinner
โ”‚   โ”œโ”€โ”€ ๐Ÿ“‚ pages/                   # Route-level page components
โ”‚   โ”œโ”€โ”€ ๐Ÿ“‚ services/                # API call functions (apiConnector)
โ”‚   โ”œโ”€โ”€ ๐Ÿ“‚ slices/                  # Redux Toolkit slices
โ”‚   โ””โ”€โ”€ ๐Ÿ“‚ utils/                   # Helper functions
โ”‚
โ”œโ”€โ”€ ๐Ÿ“‚ server/                      # Express Backend
โ”‚   โ”œโ”€โ”€ ๐Ÿ“‚ controllers/             # Route handler logic
โ”‚   โ”‚   โ”œโ”€โ”€ Auth.js
โ”‚   โ”‚   โ”œโ”€โ”€ Course.js
โ”‚   โ”‚   โ”œโ”€โ”€ Payment.js
โ”‚   โ”‚   โ””โ”€โ”€ Profile.js
โ”‚   โ”œโ”€โ”€ ๐Ÿ“‚ middlewares/             # Auth, RBAC, file upload
โ”‚   โ”œโ”€โ”€ ๐Ÿ“‚ models/                  # Mongoose schemas
โ”‚   โ”‚   โ”œโ”€โ”€ User.js
โ”‚   โ”‚   โ”œโ”€โ”€ Course.js
โ”‚   โ”‚   โ”œโ”€โ”€ Section.js
โ”‚   โ”‚   โ””โ”€โ”€ SubSection.js
โ”‚   โ”œโ”€โ”€ ๐Ÿ“‚ routes/                  # Express route definitions
โ”‚   โ”œโ”€โ”€ ๐Ÿ“‚ utils/                   # Mailer, Cloudinary helpers
โ”‚   โ””โ”€โ”€ index.js                    # Server entry point
โ”‚
โ””โ”€โ”€ ๐Ÿ“„ README.md

๐Ÿ—„๏ธ Database Schema (Key Models)

// User Model (simplified)
{
  firstName, lastName, email,
  password,        // bcrypt hashed
  accountType,     // "Student" | "Instructor" | "Admin"
  courses,         // ref โ†’ Course[]
  courseProgress,  // ref โ†’ CourseProgress[]
  image            // Cloudinary URL
}

// Course Model (simplified)
{
  courseName, courseDescription, price,
  instructor,     // ref โ†’ User
  studentsEnrolled: [ref โ†’ User],
  courseContent:  [ref โ†’ Section],
  thumbnail,      // Cloudinary URL
  status          // "Draft" | "Published"
}

๐Ÿš€ Getting Started

Prerequisites

  • Node.js v18+
  • MongoDB Atlas account
  • Cloudinary account
  • Razorpay account (test mode works)

1. Clone the repository

git clone https://github.com/prashantsaraswat1/Study_Notion.git
cd Study_Notion

2. Setup Backend

cd server
npm install

Create server/.env:

MONGODB_URL=your_mongodb_atlas_uri
JWT_SECRET=your_super_secret_key
JWT_EXPIRE=24h

# Cloudinary
CLOUD_NAME=your_cloud_name
API_KEY=your_api_key
API_SECRET=your_api_secret

# Razorpay
RAZORPAY_KEY=your_razorpay_key
RAZORPAY_SECRET=your_razorpay_secret

# NodeMailer
MAIL_HOST=smtp.gmail.com
MAIL_USER=your_email@gmail.com
MAIL_PASS=your_app_password

PORT=4000

3. Setup Frontend

cd ..   # back to root
npm install

Create .env:

REACT_APP_BASE_URL=http://localhost:4000/api/v1
REACT_APP_RAZORPAY_KEY=your_razorpay_key

4. Run the app

# Terminal 1 โ€” Backend
cd server && npm run dev

# Terminal 2 โ€” Frontend
npm start

Open http://localhost:3000 in your browser. ๐ŸŽ‰


๐Ÿ”Œ API Reference

Method Endpoint Auth Description
POST /api/v1/auth/signup Public Register new user
POST /api/v1/auth/login Public Login + JWT
POST /api/v1/auth/sendotp Public Send OTP to email
GET /api/v1/course/getAllCourses Public Fetch all courses
POST /api/v1/course/createCourse Instructor Create new course
PUT /api/v1/course/editCourse Instructor Edit course
DELETE /api/v1/course/deleteCourse Instructor Delete course
POST /api/v1/payment/capturePayment Student Initiate payment
POST /api/v1/payment/verifyPayment Student Verify & enroll
GET /api/v1/profile/getUserDetails Any Auth Get profile
PUT /api/v1/profile/updateProfile Any Auth Update profile

Full API documentation: Postman Collection (add your exported collection)


โšก Performance Highlights

  • 20+ REST APIs with consistent error handling and response structure
  • 15+ protected routes secured via JWT middleware + RBAC guards
  • Cloudinary CDN for sub-200ms media delivery
  • MongoDB indexing on frequently queried fields (email, courseId)
  • Redux Toolkit for zero-redundancy API calls via cached state

๐Ÿงช Testing

# Run backend tests (if configured)
cd server && npm test

# Lint frontend
npm run lint

Manual testing done via Postman โ€” collection available in /postman_collection.json


๐Ÿšข Deployment

Layer Platform Status
Frontend Vercel Vercel
Backend Render Render
Database MongoDB Atlas โœ… Live
Media Cloudinary โœ… Live

๐Ÿ”ฎ Future Roadmap

  • Next.js migration โ€” SSR for SEO and performance
  • TypeScript โ€” End-to-end type safety
  • Docker โ€” Containerized deployment
  • Redis caching โ€” Course catalog caching layer
  • WebSocket notifications โ€” Real-time enrollment alerts
  • AI-powered quiz generator โ€” Auto-generate MCQs from course content
  • Mobile app โ€” React Native companion app

๐Ÿค Contributing

Contributions are welcome! Please follow these steps:

  1. Fork the repository
  2. Create a feature branch: git checkout -b feature/amazing-feature
  3. Commit your changes: git commit -m 'feat: add amazing feature'
  4. Push to branch: git push origin feature/amazing-feature
  5. Open a Pull Request

Please read CONTRIBUTING.md for details on our code of conduct.


๐Ÿ“„ License

Distributed under the MIT License. See LICENSE for more information.


๐Ÿ‘จโ€๐Ÿ’ป Author

Prashant Saraswat Full Stack Developer | MERN Stack | REST APIs | Cloud Deployment

Portfolio LinkedIn GitHub Email


If this project helped you or impressed you, please โญ star the repo โ€” it means a lot!

Made with โค๏ธ and a lot of โ˜• by Prashant Saraswat

Releases

No releases published

Packages

 
 
 

Contributors

Languages