A modern web application that helps users discover movies and TV shows based on their preferences and viewing history.
- User Authentication: Secure sign-up and login functionality
- Search & Filtering: Search for movies and TV shows by title, genre, release year, or rating
- Personalized Recommendations: Get content recommendations based on your preferences and watch history
- Watchlist: Save movies and shows to watch later
- Rating System: Rate movies and TV shows with a 5-star system
- Trending Content: Discover what's popular right now
- Frontend: Next.js 14 with App Router
- Backend: Next.js API Routes
- Database: PostgreSQL with Prisma ORM
- Authentication: NextAuth.js
- External API: TMDB (The Movie Database)
- Styling: Tailwind CSS
- Node.js 18.x or later
- PostgreSQL database
- TMDB API key
- Clone the repository
- Copy
.env.exampleto.envand fill in your environment variables:
# Database
DATABASE_URL="postgresql://user:password@localhost:5432/movie_recommendation?schema=public"
# NextAuth.js
NEXTAUTH_URL="http://localhost:3000"
NEXTAUTH_SECRET="your-nextauth-secret"
# TMDB API
TMDB_API_KEY="your-tmdb-api-key"
TMDB_API_BASE_URL="https://api.themoviedb.org/3"- Install dependencies:
npm install- Set up the database:
npx prisma generate
npx prisma db push- Start the development server:
npm run devPOST /api/auth/signup: Create a new user accountPOST /api/auth/signin: Sign in to an existing account
GET /api/search?query={query}&page={page}: Search for movies and TV shows
GET /api/recommendations: Get personalized recommendations (requires authentication)GET /api/trending: Get trending movies and TV shows
GET /api/watchlist: Get user's watchlistPOST /api/watchlist: Add item to watchlistDELETE /api/watchlist?id={id}: Remove item from watchlist
GET /api/ratings: Get user's ratingsPOST /api/ratings: Rate a movie or TV showDELETE /api/ratings?id={id}: Remove a rating
- Fork the repository
- Create a feature branch
- Commit your changes
- Push to the branch
- Open a pull request
This project is licensed under the MIT License - see the LICENSE file for details.