A hybrid recommender system powered by Flask, TMDB API, and MovieLens data.
Video Demo: Watch on YouTube
GitHub Repo: github.com/frissonitte/popcorn-wagon
- About
- Features
- Getting Started
- Project Structure
- Reflections
- Roadmap
- License
- Acknowledgments
- Powered By
Popcorn Wagon is a Flask-powered web application that helps users discover and manage movies they love. It leverages a hybrid recommendation engine that combines:
- Content-based filtering (TMDB API)
- Collaborative filtering (MovieLens + SVD + Annoy)
- Search movies via the TMDB API
- View movie details: posters, genres, overviews
- Like/dislike movies and add custom tags
- Create and manage personalized movie lists
- Hybrid AI-powered recommendations using SVD + Annoy
- User authentication and session management
- Responsive UI built with Bootstrap 5
- Login and register functionality with secure session management
- Python 3.x
- Flask
- SQLite
- TMDB API Key (stored in a .env file as TMDB_API_KEY) (Also set a secure SECRET_KEY for Flask sessions)
# Clone the repository
git clone https://github.com/frissonitte/popcorn-wagon.git
cd popcorn-wagon
# (Optional) Set up a virtual environment
python -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate
# Install dependencies
pip install -r requirements.txt-
Download the full MovieLens dataset:
https://grouplens.org/datasets/movielens/latest/ -
Place these files in
app/data/:links.csvratings.csvtags.csv
-
Remove
gnome-tags.csvandgnome-scores.csvif included.
# (Optional) Clean and filter active users
python filter_csv.py
# Initialize the SQLite database
python data_loader.py
# Train the recommendation model
python train_model.py
# Run the Flask app
python run.py # or use: flask runThen open your browser to:
http://127.0.0.1:5000
popcorn-wagon/
├── app/
│ ├── data/ # MovieLens dataset
│ ├── static/ # CSS, JS, images
│ ├── templates/ # HTML templates
│ ├── utils/ # Utility scripts
│ ├── routes.py # Main views
│ ├── auth.py # Login/register
│ ├── models.py # SQLAlchemy models
│ └── extensions.py # Flask extensions
├── instance/ # SQLite DB
├── .env # Your API keys
├── train_model.py # SVD + Annoy trainer
├── filter_csv.py # Dataset cleaner
├── data_loader.py # DB initializer
├── run.py # App entry point
├── requirements.txt
└── README.md
This project taught me:
- Flask routing, sessions, and form handling
- Designing normalized SQL databases with SQLAlchemy
- Building hybrid recommender systems
- Using SVD + Annoy for fast similarity searches
- Data cleaning and optimization with Pandas and Dask
Planned enhancements:
- UI/UX overhaul
- REST API support
- OAuth login (e.g. Google)
- TMDB/IMDB list import
- Shareable movie lists
- Dark mode
MIT License — See LICENSE for details.
- CS50 team — for the CS foundation
- MovieLens — for the public dataset
- TMDB — for the movie metadata API
- Flask & SQLAlchemy — backend technologies