This project aims to create a web application that enables users to search for movies and get recommendations based on their preferences.
- Endpoints Documentation
- Architecture Diagram
- How to Run
- Features
- Architecture
- Technologies
- Response Structure
- Future Improvements
The endpoint documentation is available in the docs.json
file located in the root directory of the project. Additionally, thanks to FastAPI's automatic documentation, you can access the documentation by running the project and navigating to the /docs
endpoint for each Docker container.
To run the application, you need to have Docker and Docker Compose installed on your machine.
After installing Docker and Docker Compose, you can run the following command to start the application:
docker-compose up --build
This command will build the images and start the necessary containers for the application.
After the containers are up and running, you can access the frontend by going to http://localhost (on port 80) on your browser.
- Suggests movies based on user genre preferences
- Displays movie details including trailer, spotify playlist, trivia AI generated quiz and streaming availability in your favorite platforms (Netflix, Amazon Prime, Disney+ and HBO Max)
- Use both internal and external data sources to provide the best recommendations
- Scalable service-oriented architecture that can be easily extended to include more services
- Docker Compose used to deploy the multi-container application
- RESTful API with FastAPI
The architecture is divided into four layers:
- Data Layer: Contains the database and external data sources used by the services.
- Adapter Layer: Filters and standardizes data from external APIs.
- Business Logic Layer: Contains all of the necessary processing logic for the application.
- Process Centric Layer: Provides High-level services to the user.
In total, 15 services were built across the 4 layers. Docker compose is used to define and deploy the multi-container application.
Througout the project, all the responses are structured as follows:
{
"status": "success or error",
"message": "A brief message about the response",
"data": {
"key": "value",
}
}
Example of a successfull response, when retrieving movie details:
{
"status": "success",
"message": "Movie details retrieved successfully",
"data": {
"Title": "The Matrix",
"Year": "1999",
"imdbID": "tt0133093",
"Type": "movie",
"Director": "Lana Wachowski, Lilly Wachowski",
"Genre": "Action, Sci-Fi",
"Poster": "https://m.media-amazon.com/images/M/MV5BN2NmN2VhMTQtMDNiOS00NDlhLTliMjgtODE2ZTY0ODQyNDRhXkEyXkFqcGc@._V1_SX300.jpg",
"imdbRating": "8.7"
}
}
Example of an error response when the IMDB ID is incorrect:
{
"status": "error",
"message": "Incorrect IMDb ID."
}
- Improving session/token management leveraging sessions.
- Implementing a movie caching system to improve the performance of the application.
- Adding more services to provide more information about the movies.
- Testing deployment on a cloud platform like AWS or Azure.