A comprehensive full-stack web application for discovering, browsing, and managing movie collections. Built with React, Node.js, Express, and MongoDB, integrating with The Movie Database (TMDB) API.
- Movie Discovery: Browse movies from TMDB API
- Multiple Views:
- Now Playing
- Upcoming Movies
- Popular Movies
- Top Rated Movies
- Movie Details: View comprehensive information about each movie
- Favorites System: Save and manage favorite movies
- Must-Watch List: Track movies you want to watch
- Recommendations: Get personalized movie suggestions
- Reviews: Read and write movie reviews
- Responsive Design: Fully responsive UI for all devices
- RESTful API: Clean API architecture
- MongoDB Integration: Persistent data storage with Mongoose
- Authentication: Secure JWT-based authentication
- Password Security: bcrypt password hashing
- CORS Support: Cross-origin resource sharing enabled
- React (with Vite)
- React Router - Client-side routing
- TanStack Query (React Query) - Data fetching and caching
- TMDB API - Movie data source
- Node.js - Runtime environment
- Express.js - Web framework
- MongoDB - Database
- Mongoose - ODM for MongoDB
- JWT - Authentication tokens
- bcrypt - Password hashing
full-stack-movie-platform/
├── movies-api/ # Backend Node.js API
│ ├── api/ # API routes
│ ├── authenticate/ # Authentication logic
│ ├── db/ # Database models
│ ├── public/ # Static files
│ ├── index.js # Server entry point
│ └── package.json
│
├── react-movies/ # Frontend React application
│ ├── src/
│ │ ├── api/ # API integration
│ │ ├── components/# React components
│ │ ├── contexts/ # React context providers
│ │ ├── pages/ # Page components
│ │ └── main.jsx # App entry point
│ └── package.json
│
├── package.json # Root package (orchestrates both apps)
├── README.md
└── .gitignore
- Node.js (v20.19.0 or higher)
- MongoDB
- TMDB API Key (Get one here)
git clone https://github.com/Elijah-Destigni/full-stack-movie-platform
cd full-stack-movie-platformnpm run install-allWindows (Command Prompt):
cd movies-api
echo. > .env
Mac/Linux:
cd movies-api
touch .env
Add the following to your .env file:
PORT=8080
MONGODB_URI=your_mongodb_connection_string
JWT_SECRET=your_jwt_secret_key
Getting MongoDB URI:
- Local MongoDB:
mongodb://localhost:27017/moviedb - MongoDB Atlas: Get from your Atlas dashboard (see Atlas Setup Guide)
JWT_SECRET: Any random string (example: kj34h5kj2h3k4jh5k2j3h4k5jhkj2h3k4)
Windows (Command Prompt):
cd ..\react-movies
echo. > .env
Mac/Linux:
cd ../react-movies
touch .env
Then open react-movies/.env and add:
VITE_TMDB_KEY=your_tmdb_api_key_hereOpen two terminal windows:
Terminal 1 - Start Backend:
npm run dev-apiBackend runs on http://localhost:8080
Terminal 2 - Start Frontend:
npm run dev-clientFrontend runs on http://localhost:5173
npm run dev # Start development server
npm run build # Build for production
npm run preview # Preview production build
npm run lint # Run ESLintnpm start # Start server with Babel
npm run dev # Start with nodemon (auto-restart)POST /api/auth/register- Register new userPOST /api/auth/login- User loginGET /api/auth/verify- Verify JWT token
GET /api/movies/discover- Get discover moviesGET /api/movies/:id- Get movie detailsGET /api/movies/favorites- Get user's favorite moviesPOST /api/movies/favorites- Add movie to favoritesDELETE /api/movies/favorites/:id- Remove from favorites
GET /api/reviews/:movieId- Get reviews for a moviePOST /api/reviews- Create a new reviewPUT /api/reviews/:id- Update a reviewDELETE /api/reviews/:id- Delete a review
- Password Hashing: bcrypt with salt rounds
- JWT Authentication: Stateless token-based auth
- Environment Variables: Sensitive data kept secure
- CORS: Configured for secure cross-origin requests
- Input Validation: Protected against common vulnerabilities
Elijah Destigni