Skip to content

StudyHub is an online learning platform designed to provide interactive educational resources, courses, and study materials to help students learn effectively and stay organized.

License

Notifications You must be signed in to change notification settings

aayanofficial5/StudyHub

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸ“š StudyHub

A Full Stack Online Learning Platform built with the MERN stack, enabling instructors to create and manage courses, and learners to access quality education from anywhere.


πŸ“ Project Description

StudyHub is a fully functional ed-tech platform that enables instructors to create, manage, and deliver courses, and allows students to browse, enroll, and track their learning journey. The platform is built using the MERN stack (MongoDB, Express, React, Node.js) and aims to provide:

  • A seamless and interactive learning experience for students, making education more accessible and engaging.
  • A platform for instructors to showcase their expertise and connect with learners across the globe.

In the following sections, we will cover the technical details of the platform, including:

  1. System Architecture: High-level overview of the platform's components.
  2. Front-end: Description of the front-end architecture, UI design, features, frameworks, and tools.
  3. Back-end: Description of the back-end architecture, features, frameworks, libraries, tools, data models, and database schema.
  4. API Design: List of API endpoints, their functionalities, and sample requests and responses.
  5. Deployment: Overview of the deployment process, hosting environment, and infrastructure.
  6. Testing: Testing process, types, frameworks, and tools used.
  7. Future Enhancements: Potential future improvements to the platform.

πŸ—οΈ System Architecture

StudyHub follows a client-server architecture, consisting of the following components:

Front-end

The platform's frontend is built using React.js, providing a dynamic and responsive user interface. It communicates with the back end via RESTful APIs to handle user actions such as course browsing and enrollment.

Back-end

Built with Node.js and Express.js, the back end serves APIs for functionalities such as user authentication, course management, and content delivery. The server logic handles the processing and storing of course data and user information.

Database

MongoDB stores unstructured and semi-structured data, including course content (videos, PDFs, images) and user data. Its flexibility allows for easy scalability and efficient management of dynamic content.

Architecture Diagram

Here is a high-level diagram that illustrates the architecture of the StudyHub ed-tech platform: Architecture Diagram


🌐 Live Demo

πŸ”— Deployed Link


✨ Features

πŸ‘¨β€πŸ« Instructor Features

  • Instructor Registration/Login
  • Course creation with title, description, and video content
  • Video uploads using Cloudinary
  • Dashboard to manage courses and view enrolled students

πŸ‘©β€πŸŽ“ Learner Features

  • Student Registration/Login
  • Browse and enroll in courses
  • Stream course videos
  • View enrolled courses and track progress

πŸ” Common Features

  • JWT-based authentication
  • Role-based access control (Instructor & Student)
  • Responsive and clean UI using Tailwind CSS
  • Modular and scalable codebase

πŸ› οΈ Tech Stack

Layer Technology
Frontend React.js, Redux Toolkit, Tailwind CSS, Axios
Backend Node.js, Express.js, Mongoose
Database MongoDB Atlas (Cloud-hosted NoSQL DB)
Authentication JWT, bcrypt.js, Google OAuth 2.0
Cloud Storage Cloudinary
Payments Razorpay
Email Service Nodemailer with SMTP (e.g., Gmail)
Dev Tools Postman, VS Code, GitHub, ESLint, Prettier
Environment Config dotenv
Build & Deploy Vite (Frontend), Vercel (Frontend Hosting), Vercel (Backend Hosting)

πŸ“ Folder Structure

StudyHub/
β”œβ”€β”€ Client/                           # Frontend React app
β”‚   β”œβ”€β”€ .env                          # Frontend environment variables
β”‚   β”œβ”€β”€ index.html                    # Main HTML file
β”‚   β”œβ”€β”€ package.json                  # Frontend dependencies and scripts
β”‚   β”œβ”€β”€ vite.config.js                # Vite config for frontend build
β”‚   β”œβ”€β”€ public/                       # Static assets
β”‚   └── src/                          # Source code
β”‚       β”œβ”€β”€ App.jsx                   # App root component
β”‚       β”œβ”€β”€ main.jsx                  # Entry point
β”‚       β”œβ”€β”€ index.css                 # Global styles
β”‚       β”œβ”€β”€ assets/                   # Images, icons, banners, logos
β”‚       β”œβ”€β”€ components/               # Reusable UI components
β”‚       β”‚   β”œβ”€β”€ Authentication/       # Login, signup, Google button, etc.
β”‚       β”‚   β”œβ”€β”€ Common/               # Shared UI elements (Navbar, Footer, etc.)
β”‚       β”‚   β”œβ”€β”€ Core/                 # Course-related views and logic
β”‚       β”‚   β”œβ”€β”€ Dashboard/            # Student & Instructor dashboards
β”‚       β”‚   └── Home/                 # Homepage sections
β”‚       β”œβ”€β”€ data/                     # JSON/static mock data
β”‚       β”œβ”€β”€ pages/                    # Route-based pages (Home, Login, Signup, etc.)
β”‚       β”œβ”€β”€ redux/                    # Redux store and feature slices
β”‚       β”œβ”€β”€ services/                 # API connectors and operations
β”‚       └── utils/                    # Utility functions
β”‚
β”œβ”€β”€ Server/                           # Backend Express app
β”‚   β”œβ”€β”€ .env                          # Backend environment variables
β”‚   β”œβ”€β”€ server.js                     # Server entry point
β”‚   β”œβ”€β”€ package.json                  # Backend dependencies and scripts
β”‚   β”œβ”€β”€ Configurations/              # DB, Cloudinary, Razorpay setup
β”‚   β”œβ”€β”€ Controllers/                 # API logic and route handlers
β”‚   β”œβ”€β”€ Extra/                       # File upload handling, additional logic
β”‚   β”œβ”€β”€ Middlewares/                # Custom middleware
β”‚   β”‚   β”œβ”€β”€ Authentication/          # JWT auth middleware
β”‚   β”‚   └── Authorization/           # Role-based access control
β”‚   β”œβ”€β”€ Models/                      # MongoDB models/schemas
β”‚   β”œβ”€β”€ Routes/                      # Route definitions
β”‚   β”œβ”€β”€ Templates/                  # Email templates and assets
β”‚   β”‚   β”œβ”€β”€ Controllers/             # Mail preview images
β”‚   β”‚   └── Mails/                   # Email HTML/JS templates
β”‚   └── utils/                       # Utility functions (e.g., fileUploader, mailSender)
β”‚
β”œβ”€β”€ LICENSE                          # License file
└── README.md                        # Main documentation file

βš™οΈ Getting Started

1. Clone the Repo

git clone https://github.com/aayanofficial5/StudyHub.git
cd StudyHub

2. Install Dependencies

# For frontend
cd Client
npm install

# For backend
cd Server
npm install

3. Set up Environment Variables

For the Backend:

Create a .env file inside the /Server folder with the following configuration:

# Server Configuration
PORT=4000
BACKEND_URL=<your_backend_url_here>/api/v1   # (e.g., http://localhost:4000/api/v1)
FRONTEND_URL=<your_frontend_url_here> # (e.g., http://localhost:5173)
DATABASE_URL=<your_database_connection_url_here>

# JWT Secret for Authentication
JWT_SECRET=<your_jwt_secret_here>

# Cloud Storage (e.g., Cloudinary) Configuration
CLOUD_NAME=<your_cloud_name_here>
API_KEY=<your_api_key_here>
API_SECRET=<your_api_secret_here>
FOLDER_NAME=<your_folder_name_here>

# Mail Service Configuration
MAIL_HOST=<your_mail_host_here>
MAIL_USER=<your_mail_user_here>
MAIL_PASS=<your_mail_password_here>

# Razorpay Payment Gateway Configuration
RAZORPAY_ID=<your_razorpay_id_here>
RAZORPAY_SECRET=<your_razorpay_secret_here>

# Google Signup/Login Configurations
GOOGLE_CLIENT_ID = <your_google_client_id>
GOOGLE_CLIENT_SECRET = <your_google_client_secret>

For the Frontend:

Create a .env file inside the /Client folder with the following configuration:

# Vite API URL (to connect with the backend API)
VITE_API_URL=<your_backend_url_here>/api/v1   # (e.g., http://localhost:4000/api/v1)

# Razorpay Payment Gateway Configuration
VITE_RAZORPAY_ID=<your_razorpay_id_here>

# Google Signup/Login Configurations
VITE_GOOGLE_CLIENT_ID = <your_google_client_id>

4. Run the App

# Start backend in a terminal with the following commands:
cd Server
npm run dev

# Start frontend in another terminal with the following commands:
cd Client
npm run dev

πŸ’‘ Future Improvements

  • Chat or forum feature for learners
  • Admin dashboard for platform management

🀝 Contributing

Contributions, issues and feature requests are welcome!
Feel free to check the issues page.


πŸ“§ Contact

Developed with ❀️ by Aayan Patel
πŸ“¬ Email: aayanofficial5@gmail.com


πŸ“„ License

This project is licensed under the MIT License.


About

StudyHub is an online learning platform designed to provide interactive educational resources, courses, and study materials to help students learn effectively and stay organized.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Languages