Skip to content

Basant1Saini/youtubeproject

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

36 Commits
 
 
 
 
 
 
 
 

Repository files navigation

YouTube Clone - MERN Stack

A YouTube clone built using MongoDB, Express, React, and Node.js.

GitHub: https://github.com/Basant1Saini/youtubeproject

Demo Video: https://drive.google.com/file/d/1K5V_S-6FdE4mfeMimPLEo51cHTCFvByW/view?usp=drivesdk

Features

  • Home page with video grid, sidebar, search bar, and category filters
  • User registration and login with JWT authentication
  • Video player with like/dislike and comments
  • Channel page to upload, edit, and delete videos
  • Responsive design for mobile and desktop

Tech Stack

Frontend: React, Vite, React Router, Axios
Backend: Node.js, Express, MongoDB, JWT, bcrypt

How to Run

Backend

cd backend
npm install

Create .env file:

MONGO_URI=your_mongodb_connection_string
JWT_SECRET=your_secret_key
PORT=5000
npm run seed    # Add sample data
npm run dev     # Start server

Frontend

cd frontend
npm install
npm run dev

Open http://localhost:5173

Test Login

API Endpoints

Auth:

  • POST /api/auth/register - Register user
  • POST /api/auth/login - Login user

Videos:

  • GET /api/videos - Get all videos
  • GET /api/videos/:id - Get single video
  • POST /api/videos - Create video
  • PUT /api/videos/:id - Update video
  • DELETE /api/videos/:id - Delete video
  • POST /api/videos/:id/like - Like video
  • POST /api/videos/:id/dislike - Dislike video

Channels:

  • GET /api/channels/:id - Get channel
  • POST /api/channels - Create channel

Comments:

  • GET /api/comments/:videoId - Get comments
  • POST /api/comments - Add comment
  • PUT /api/comments/:id - Edit comment
  • DELETE /api/comments/:id - Delete comment

Author

Basant Saini

GitHub: https://github.com/Basant1Saini/youtubeproject
Demo Video: https://drive.google.com/file/d/1K5V_S-6FdE4mfeMimPLEo51cHTCFvByW/view?usp=drivesdk

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors