This project includes some Rest APIs have been provided for a mobile/web application in about movies.
This project includes 3 API:
- Search Movies
- Popular Movies
- Get movie by ID
The APIs of this project have been documented using Swagger
.
You can access it on this link in you local system:
http://localhost:8080/swagger-ui/index.html
Data set for this project has been generated by AI and almost is real (except poster urls).
In order to have test data when you deploy the project, they will be inserted to db using flyway.
The selected database for this project is PostgreSQL
.
There are 3 tables here.
movies
: includes movies listapi_keys
: includes list of all valid api keysflyway_schema_history
: history of data migrations have been applied by flyway
In this version, considered only one Genres for each movie. If we wanted multiple Genres per movie or dynamic Genres, we would need two more tables:
genres
: to keep list of all defined genresgenres_mapping
: to map genres to movies by ids
In this project we used API key authentication.
Access to all Rest APIs requires a valid API Key.
To Authorize in Swagger UI, click on the Authorize
key on top right part of swagger ui.
To Simplify the project setup, Dockerfile
and docker-compose.yaml
files have been provided.
the only needed steps to deploy the project are:
- Clone the project:
git clone https://github.com/rezayi/MoviesListSampleApp.git
or to clone by ssh key as bellow:
git clone git@github.com:rezayi/MoviesListSampleApp.git
- Move to project directory:
cd MoviesListSampleApp
- Start docker compose:
sudo docker-compose up --build
- If you don't have installed
docker-compose
on your system you can install it this way:
sudo snap install docker
The project has been deployed on this address:
http://194.5.192.219/swagger-ui/index.html
Accessing to APIs requires API key. Email me, if you need it.