An AI-powered movie recommendation system that suggests movies based on user preferences using machine learning and natural language processing.
✅ AI-based movie recommendations
✅ User-friendly interface
✅ Uses machine learning models for recommendations
✅ Supports multiple genres and preferences
✅ Fast and scalable
/AI-Movie-Recommendation
│── /src # Source code files
│ ├── /components # UI components
│ ├── /services # API & data handling
│ ├── /utils # Utility functions
│ └── App.js # Main application entry
│── /data # Movie dataset and ML models
│── /public # Static assets
│── .gitignore # Files to ignore in Git
│── README.md # Documentation
│── package.json # Dependencies and scripts
└── index.js # Main server/app entry point -
Clone the Repository
git clone https://github.com/SakshamSwarup/airecomendation.git cd airecomendation -
Install Dependencies
npm install
-
Run the Project
npm start
-
Deploy the Project
npm run build
This project uses environment variables to store API keys. Ensure you have a .env file with the following keys:
VITE_API_KEY=your_tmdb_api_key
VITE_AI_API_KEY=your_ai_api_keyThe App.js component fetches movies from The Movie Database (TMDB) API:
const API_URL = "https://api.themoviedb.org/3";
const API_KEY = import.meta.env.VITE_API_KEY;
const options = {
method: 'GET',
headers: {
accept: 'application/json',
Authorization: `Bearer ${API_KEY}`,
},
};Movies are also fetched from an AI-powered recommendation API:
const AI_API_KEY = import.meta.env.VITE_AI_API_KEY;
const options2 = {
method: "GET",
headers: {
'x-rapidapi-key': `${AI_API_KEY}`,
'x-rapidapi-host': 'ai-movie-recommender.p.rapidapi.com',
},
};Search queries are debounced using react-use to optimize API requests:
useDebounce(() => setDebounce(search), 1000, [search]);Trending movies are fetched on component mount:
useEffect(() => {
TrendingMovies();
}, []);Contributions are welcome! Follow these steps:
- Fork the repository
- Create a new branch (
git checkout -b feature-branch) - Commit your changes (
git commit -m "Added new feature") - Push to your branch (
git push origin feature-branch) - Open a Pull Request
The AI recommendation section is not displaying any movie results. Even when a search query is entered, the API response does not populate the UI.
- Open the application.
- Enter a movie name in the search bar.
- Wait for the AI recommendation results.
The AI recommendation section should display movies based on the searched query.
The section remains empty, even after a successful API request.