Movie App
doneSource
- react
- flask
- python
- rest-api
- tailwind
- tmdb
- university
A movie browser: a Flask REST API over TMDB and a React + Tailwind frontend to look up movies, like them and find similar ones.
Why
A university assignment: design a RESTful API that wraps a third-party API, then build a frontend that consumes it. The data comes from TMDB; my API adds its own resources on top (favourites, similar movies, comparison plots).

How it works
React frontend ──> Flask API (/api/*) ──> TMDB API (movie data)
└──> QuickChart API (bar plots)
- Backend: Flask + Flask-RESTful, one resource class per endpoint, all under an
/apiprefix. Swagger docs generated with Flasgger. - Frontend: React with React Router, Axios calls through a small
useFetchhook, styled with Tailwind. - Test script:
consume_api.pycalls every endpoint and prints the results.
Endpoints
| Method | Endpoint | Does |
|---|---|---|
GET | /movies/{id} | Movie details |
PUT | /movies/{id} | Like or unlike a movie |
DELETE | /movies/{id} | Remove a movie |
GET | /movies/favourites | Liked movies |
GET | /movies/popular?amount= | Popular movies |
GET | /movies/{id}/same_genre | Movies sharing its genres |
GET | /movies/{id}/same_runtime | Movies with a similar runtime |
GET | /movies/bar_plot?movie_ids= | Bar chart comparing up to 10 movies (QuickChart) |
With the API running, all endpoints can be tried interactively in the Swagger UI at /apidocs/ (generated by Flasgger).
Frontend pages
Home, movie details, popular, similar movies, favourites and bar plot.
Design notes
- RESTful: URLs name resources, not actions (
/movies/5,/movies/popular), HTTP methods carry the verb, and paths are hackable up the tree (/movies/{id}/same_genre). - Errors: path and query parameters are type- and value-checked; bad input returns
400, a failed TMDB call returns500. The bar plot still draws the remaining movies when one ID is not found, and the frontend tells the user which one failed. - Known limits: liked and deleted movies live in in-memory sets (no database), there is no caching, and lists are capped instead of paginated (popular at 20 movies per request, bar plot at 10).
Stack
- Backend: Python, Flask 3.1, Flask-RESTful, Flask-CORS, Flasgger, requests, python-dotenv.
- Frontend: React 19, React Router 7, Axios, Tailwind CSS, Create React App.
- APIs: TMDB (movie data), QuickChart (plots).
- Run scripts: one-command start for the API, frontend and test script, on Linux and Windows.