This is the backend for the TV app. It is a API based on the following statement:
We have several types of contents: movies, tv_shows, seasons, episodes.
All contents have a title, original title and year, those fields are mandatory. An episode belongs to one season, one season belongs to a tv_show. Season and episodes have a number (the number of seasons in the tv show and the number of episodes in the season: season 1, season 2, episode 1 of season 1, episode 2 of season 2).
We have a backoffice where we can define lists of contents The operator can define, manually, the order of the contents of a list.
Implement an endpoint that returns the index of the contents of a list (in the order manually defined). This is a non authenticated endpoint that will be used in the public API in the TV app. The endpoint has one optional parameter: content_type to filter by the type of content. The endpoint is paginated
Implement the tests that you think are necessary.
This project was built using the following technologies:
- Ruby 3.2.2
- Ruby on Rails 7.1.3
- PostgreSQL 16
- Docker
- Clone the repository
git clone git@github.com:v999dka/tv-backend.git- Execute docker-compose
docker-compose up --build- Enter to http://localhost:1337/up to check if the application is running as expected
Swagger API Doc When you have the application running, you can access the API documentation at http://localhost:1337/api-docs