A Flask-based web application that allows users to search for movies, add them to a database, update their ratings and reviews, and delete entries. The app integrates with The Movie Database (TMDB) API to fetch movie details.
- Home Page: Displays a list of movies sorted by their rating in descending order.
- Add a Movie: Search for a movie title using TMDB API and add it to the database.
- Edit Movie: Update a movie's rating and review.
- Delete Movie: Remove a movie entry from the database.
- Ranking System: Automatically ranks movies based on their ratings.
- Python: Core language for backend development.
- Flask: Web framework for building the application.
- Flask-Bootstrap: For integrating Bootstrap to improve UI design.
- Flask-SQLAlchemy: For database management.
- WTForms: To manage forms for adding and editing movie details.
- TMDB API: To fetch movie details such as titles, posters, and descriptions.
- SQLite: Database to store movie information.
- HTML/CSS: Frontend structure and styling.
https://github.com/MostafaHima/Movie-Manager-App.git
cd Movie-Manager-App
Make sure you have Python installed, then run:
pip install -r requirements.txt
Create a .env
file in the project root directory to store your secret key and API configurations:
SECRET_KEY=your_secret_key
DATABASE_URL=sqlite:///Movies_database.db
python main.py
The app will be accessible at http://127.0.0.1:5000/
.
- Visit the home page to view your movie list.
- Click Add Movie to search for a new movie title.
- Edit a movie's rating or review by clicking Edit.
- Delete a movie by clicking Delete.
The app uses The Movie Database (TMDB) API to fetch movie details. You must provide an API token for authentication.
- Search Movie:
https://api.themoviedb.org/3/search/movie?query=<movie_title>
- Movie Details:
https://api.themoviedb.org/3/movie/<movie_id>
- The app uses SQLite as the database backend.
- A table
Movie
is created to store movie details with the following schema:id
: Primary keytitle
: Movie titleyear
: Release yeardescription
: Movie overviewrating
: User-defined ratingranking
: Rank based on ratingreview
: User reviewimg_url
: Poster image URL
- Flask
- Flask-Bootstrap
- Flask-SQLAlchemy
- Flask-WTF
- Requests