Skip to content

Omanshsingh/MovieRec

Repository files navigation

MOVIEREC

Your next favorite movie, found faster.

A full-stack recommendation platform with secure accounts, intelligent discovery, and personal watch tracking.

Status React Node MongoDB


Product Pitch

MovieRec helps users stop scrolling and start watching.

  • Personalized recommendations driven by user behavior
  • Powerful discovery tools by genre, rating, year, and sort
  • Secure authentication and protected user routes
  • One personal hub for favorites, wishlist, and ratings

What Makes It Strong

Capability Outcome
JWT Auth Secure sign up and login flow
Smart Discovery Faster filtering and better exploration
Personalized Feed Recommendations shaped by user choices
Profile Library Favorites, watchlist, and ratings in one place
Responsive UI Smooth experience across desktop and mobile

Stack

Frontend

  • React 18
  • Vite
  • Tailwind CSS v4
  • React Router
  • Axios
  • Lucide Icons

Backend

  • Node.js
  • Express.js
  • MongoDB with Mongoose
  • JWT Authentication
  • bcrypt
  • TMDB API Integration

Quick Start

1. Clone

git clone https://github.com/Omanshsingh/MovieRec.git
cd MovieRec

2. Run Backend

cd movie-app-backend
npm install

Create env file:

Windows:

copy .env.example .env

macOS/Linux:

cp .env.example .env

Set env values:

TMDB_API_KEY=your_tmdb_api_key
PORT=5000
MONGODB_URI=your_mongodb_connection_string
JWT_SECRET=your_generated_jwt_secret

Generate a secure JWT secret:

node -e "console.log(require('crypto').randomBytes(32).toString('hex'))"

Start backend:

npm run dev

3. Run Frontend

cd ../movie-app-frontend
npm install

Create env file:

Windows:

copy .env.example .env.local

macOS/Linux:

cp .env.example .env.local

Use:

VITE_API_URL=http://localhost:5000/api

Start frontend:

npm run dev

4. Open App


Environment Variables

Backend: movie-app-backend/.env

Variable Required Purpose
TMDB_API_KEY Yes TMDB API access key
PORT Yes Backend port
MONGODB_URI Yes Database connection URI
JWT_SECRET Yes JWT signing secret

Frontend: movie-app-frontend/.env.local

Variable Required Purpose
VITE_API_URL Yes Backend API base URL

API Snapshot

Auth

  • POST /api/auth/register
  • POST /api/auth/login

Movies

  • GET /api/movies/trending
  • GET /api/movies/top-rated
  • GET /api/movies/:id
  • GET /api/movies/:id/recommendations
  • GET /api/genres
  • GET /api/discover

User

  • GET /api/user/recommendations
  • POST /api/user/favorites
  • DELETE /api/user/favorites/:movieId
  • POST /api/user/wishlist
  • DELETE /api/user/wishlist/:movieId
  • POST /api/user/rate
  • DELETE /api/user/ratings/:movieId

Project Structure

MovieRec/
|-- movie-app-backend/
|   |-- middleware/
|   |-- models/
|   |-- server.js
|   |-- fallback-data.js
|   |-- test-tmdb.js
|   `-- package.json
|-- movie-app-frontend/
|   |-- src/
|   |   |-- api/
|   |   |-- components/
|   |   |-- context/
|   |   |-- hooks/
|   |   `-- pages/
|   `-- package.json
`-- README.md

Dev Commands

Backend:

cd movie-app-backend
npm run dev

Frontend:

cd movie-app-frontend
npm run dev

TMDB test:

cd movie-app-backend
node test-tmdb.js

Troubleshooting

MongoDB connection fails

  • Verify MONGODB_URI format and credentials
  • Whitelist your IP in MongoDB Atlas
  • Confirm DB user permissions

TMDB requests fail

  • Verify TMDB_API_KEY
  • Check internet connection
  • Retry after rate limit cooldown

Frontend cannot reach backend

  • Confirm backend is running on port 5000
  • Check VITE_API_URL in .env.local
  • Confirm backend CORS configuration

Security

  • JWT-based authentication
  • bcrypt password hashing
  • Protected API routes
  • Environment-variable-based secret management
  • No secrets committed to source control

Contributing

Pull requests are welcome. For major changes, open an issue first.


License

MIT

About

Movie recommendation app with personalized suggestions, advanced search, and user profiles

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors