This project is a movie and TV show review platform built as part of my CS50 final project. The application allows users to search for movies and TV shows, explore trending and popular titles, view detailed information about individual items, and leave reviews for their favorite content. The platform is designed to provide users with an engaging and interactive experience while exploring the world of entertainment.
-
User Registration and Authentication:
- New users can register with a unique username, email, and password.
- Passwords are securely hashed using
werkzeug.securitybefore being stored in the database. - Registered users can log in and access personalized features like adding reviews or editing their profiles.
-
Trending and Popular Movies:
- The homepage displays trending and popular movies fetched dynamically using The Movie Database (TMDb) API.
- Users can explore the most talked-about content with ease.
-
Search Functionality:
- Users can search for movies, TV shows, or both using a multi-search feature.
- Results are displayed dynamically with pagination for seamless navigation through large datasets.
-
Detailed Movie and TV Show Pages:
- Each movie or TV show has its dedicated page with detailed information such as release date, rating, and synopsis.
- Reviews from other users are displayed, including their usernames, profile pictures, and the review content.
-
Review System:
- Logged-in users can leave reviews for movies or TV shows, including a title and detailed content.
- Reviews are displayed alongside the relevant content and stored in a SQLite database.
-
Genre-Based Browsing:
- Users can browse movies and TV shows by genre, making it easier to find content that matches their preferences.
-
User Profiles:
- Each user has a profile page where they can update their username, email, and profile picture.
- Profile pictures are resized and stored securely on the server.
-
Responsive Design:
- The application features responsive templates that work seamlessly on desktop and mobile devices.
- Flask: The core framework used to build the application, handle routing, and manage server-side logic.
- SQLite: A lightweight database for managing user accounts, reviews, and other application data.
- Flask-Session: For session management, storing user login states, and handling session data securely.
- Jinja2: Used for dynamic HTML templating.
- Bootstrap: Provides responsive design and user interface elements.
- TMDb API: Used to fetch movie and TV show data, including details, trending content, genres, and search results.
- Werkzeug: For password hashing and authentication.
- Pillow: For processing and resizing user-uploaded profile pictures.
-
Users:
- Stores user account details such as
id,username,email,password,image_file, andcreated_at.
- Stores user account details such as
-
Movie Reviews:
- Contains reviews for movies, including
id,author_id,movie_id,title,content, andcreated_at.
- Contains reviews for movies, including
-
TV Reviews:
- Stores reviews for TV shows with similar fields as the movie reviews table.
- Registration and login routes ensure secure handling of user data.
- Passwords are hashed with
generate_password_hashand verified during login.
- The TMDb API provides real-time data on trending and popular titles.
- Functions like
fetch_datahandle API requests and parse responses.
- Users can leave reviews for movies and TV shows.
- Reviews are stored in a database and displayed alongside relevant content.
- Users can update their profiles and upload profile pictures.
- Images are resized and securely stored using the
Pillowlibrary.
format_yearfilter extracts the year from a release date string.rating_to_starsconverts numeric ratings into a star-based visual representation.
-
API Data Parsing:
- Added error handling for unexpected API response formats or missing data.
-
Session Management:
- Utilized Flask’s
@app.context_processorto inject session data into templates globally.
- Utilized Flask’s
-
Profile Picture Uploads:
- Resized and stored images with unique filenames for secure handling.
-
Dynamic Pagination:
- Implemented pagination to fetch and display large datasets seamlessly.
-
Improved Search:
- Add filters for year, rating, and other parameters in the search functionality.
-
Social Features:
- Allow users to follow each other and see reviews from their network.
-
Advanced Profile Customization:
- Include a bio and favorite genres in user profiles.
-
Deployment:
- Host the platform on a service like Heroku or AWS for public access.
-
Review Editing:
- Allow users to edit their reviews directly from the movie or TV show page for better flexibility and content management.
This project demonstrates the integration of Flask, external APIs, and modern web development techniques to create a feature-rich movie review platform. The application combines real-time data, user interaction, and responsive design to provide an engaging experience. This journey helped me deepen my understanding of full-stack development and solve real-world challenges.