A full-stack Netflix clone built with the MERN stack (MongoDB, Express.js, React, Node.js) that allows users to browse, search, and watch movies and TV shows.
- User authentication (signup, login, logout)
- Browse trending movies and TV shows
- Search for movies and TV shows
- View detailed information about movies and TV shows
- Watch trailers and videos
- Responsive design for all device sizes
- User profile with avatar selection
- Search history tracking
- React 18
- React Router v7
- Tailwind CSS
- Zustand (State Management)
- Axios (HTTP Client)
- React Player (Video Playback)
- Lucide React (Icons)
- React Hot Toast (Notifications)
- Node.js
- Express.js
- MongoDB with Mongoose
- JSON Web Tokens (JWT) for authentication
- Bcrypt.js for password hashing
- TMDB API for movie/TV show data
- Cookie Parser for handling cookies
Before you begin, ensure you have met the following requirements:
- Node.js >= 14.x
- MongoDB instance (local or cloud)
- TMDB API Key (get it from The Movie Database)
.
βββ backend/
β βββ config/ # Configuration files
β βββ controllers/ # Request handlers
β βββ middleware/ # Custom middleware
β βββ models/ # Database models
β βββ routes/ # API routes
β βββ services/ # External services (TMDB API)
β βββ utils/ # Utility functions
β βββ server.js # Entry point
βββ frontend/
β βββ src/
β β βββ components/ # React components
β β βββ hooks/ # Custom hooks
β β βββ pages/ # Page components
β β βββ store/ # State management (Zustand)
β β βββ utils/ # Utility functions
β β βββ App.jsx # Main App component
β β βββ main.jsx # Entry point
β βββ ...
βββ .env.sample # Environment variable template
βββ package.json # Backend dependencies
βββ README.md
POST /api/v1/auth/signup- User signupPOST /api/v1/auth/login- User loginPOST /api/v1/auth/logout- User logoutGET /api/v1/auth/authCheck- Check if user is authenticated
GET /api/v1/movie/trending- Get trending moviesGET /api/v1/movie/:id- Get movie detailsGET /api/v1/movie/:id/videos- Get movie videosGET /api/v1/movie/:id/similar- Get similar movies
GET /api/v1/tv/trending- Get trending TV showsGET /api/v1/tv/:id- Get TV show detailsGET /api/v1/tv/:id/videos- Get TV show videosGET /api/v1/tv/:id/similar- Get similar TV shows
GET /api/v1/search/:query- Search for movies/TV showsGET /api/v1/search/history- Get user search historyDELETE /api/v1/search/history- Clear user search history