This service integrates with the OMDb API and a provided CSV file to fetch and store movie details locally. It can also determine whether a given movie title won the Best Picture award. The application supports user management (creation and deletion), JWT-based authentication (login and logout), movie ratings, and provides an endpoint to retrieve the top 10 highest-rated movies, ranked by box office revenue.
- Determine whether a given movie title won the Best Picture award using data from a CSV file
- Fetch movie details from the OMDb API
- Store user ratings on a scale of 1 to 100 (one rating per user per movie)
- Retrieve all ratings for a specific movie title
- List the top N highest-rated movies, ranked by box office revenue
- Create and delete user accounts, with JWT based authentication
- Java 21
- Spring Boot 3
- Maven 3.9
- Docker
- docker-compose
- Github Actions
- Liquibase
- MapStruct
- MySql 8
- Redis
- JWT
- Jasypt
- Junit 5
- TestContainers
- Heroku
- swagger
- postman
- Wiremock
Ensure the following tools are installed:
- Java 21
- Apache Maven 3.9
- Docker
- Docker Compose
- Jasypt CLI Tool (Only required if modifying encrypted properties)
The application relies on environment variables for configuration. You can set them in a .env file at the project root.
📝 Example .env file
SPRING_DATASOURCE_URL=jdbc:mysql://localhost:3306/cinemetrics
SPRING_DATASOURCE_USERNAME=root
SPRING_DATASOURCE_PASSWORD=password
JASYPT_ENCRYPTOR_PASSWORD=sample-jasypt-encrypt-passwd
SPRING_REDIS_HOST=redis
SPRING_REDIS_PORT=6379
This application is Dockerized using docker-compose.yml, bundling the backend, MySQL, and Redis.
- Clone the repository
git clone git@github.com:ImShakthi/CineMetrics.git
cd CineMetrics
- Build the application using Maven
./mvnw clean package
- Build and start the server with Docker Compose, export all environment variables
docker-compose up --build
- Access Swagger UI to explore available APIs:
http://localhost:8080/swagger-ui/index.html
CI/CD is handled via GitHub Actions and Heroku.
-
CI/CD Pipeline = GitHub Actions
-
Live Deployment (Heroku) https://cinemetrics-api-d21f2e62e3ca.herokuapp.com/swagger-ui/index.html
📝 Note: The Heroku server is hosted on a free-tier plan. Expect some delay due to cold starts when inactive.