A simple movie recommendation website built using Express, MongoDB, Swagger, JWT, Mailgun and The Movie Database API.
- 🤖 Introduction
- 🚀 Demo
- ⚙️ Tech Stack
- 🔋 Features
- 🤸 Quick Start
The website allows users to search for movies and TV shows, get recommendations, create and read reviews. Users can also create an account, log in, and save their favorite movies and TV shows.
Backend was inspired by the MoonFlix - Fullstack Responsive Movie Website 2022 tutorial, created by Tuat Tran Anh.
The frontend is built using React, TypeScript, shadcn/ui, TanStack Query, zustand, Zod and deployed on Vercel. You can find the repository here.
Check out the API documentation here.
Check out the website here.
- Express
- MongoDB
- Swagger
- JWT
- Mailgun
- Zod
- Cloudinary
- The Movie Database API
-
User authentication: Register, send verification email, login, forgot password, reset password, refresh token.
-
User profile: Upload avatar, update user information, change password, delete account.
-
Movies: Get movies, search movies, get movie details, get recommended movies.
-
TV Shows: Get TV shows, search TV shows, get TV show details, get recommended TV shows.
-
Reviews: Get reviews for a movie or TV show with pagination, create a review, get user reviews with pagination, delete a review.
-
Favorites: Add a movie or TV show to favorites, get user favorites, remove a movie or TV show from favorites.
-
Error handling: Handle errors with custom error messages.
-
Security: Protect routes with JWT, CORS, sanitize user input, prevent NoSQL injection, and more.
Follow these steps to set up the project locally on your machine.
Clone the repository
git clone https://github.com/nboraxxd/nmovies-server
cd nmovies-server
Installations
Install the dependencies using npm:
npm install
Environment Variables
Change the name of the .env.example
file to .env
and fill in the required environment variables.
Runnning the project
npm run dev