Movie recommender with a Next.js frontend and FastAPI backend.
-
Install frontend dependencies:
npm install
-
Install Python backend dependencies:
python -m pip install -r backend/requirements.txt
-
Start MongoDB locally or provide a MongoDB Atlas URI.
-
Create
.env.localfor the Next.js frontend:NEXT_PUBLIC_API_BASE_URL=http://127.0.0.1:8000
-
Set backend environment variables in your shell:
MONGODB_URI=mongodb://127.0.0.1:27017 MONGODB_DB=movie_recommender AUTH_SECRET=replace-with-a-long-random-secret FRONTEND_ORIGINS=http://localhost:3000,http://127.0.0.1:3000
-
Run both apps in separate terminals:
npm run dev:backend npm run dev:frontend
/- movie search and popular movies/favorites- MongoDB-backed user favorites- FastAPI
/api/movies/popular- popular movies from MongoDBtop_movies - FastAPI
/api/movies/search?query=avatar- movie search from MongoDBtop_movies - FastAPI
/api/favorites- user favorites - FastAPI
/api/auth/register,/api/auth/login,/api/auth/me,/api/auth/logout- auth routes