Welcome to the Movie and Actor Management Backend! This is a backend application for managing movies and actors via a REST API. The application is built using the Quarkus framework and utilizes PostgreSQL as the database for data persistence.
The Movie and Actor Management Backend provides RESTful endpoints to manage movies and actors. It allows you to perform CRUD operations for both movies and actors. Additionally, you can list all movies and actors, use pagination support for listing, and search for movies by keyword in Title and Description using SQL statement.
- RESTful API for movies and actors management
- PostgreSQL database for data persistence
- Request counter for all REST calls
- CRUD operations for movies
- CRUD operations for actors
- List all movies with pagination support
- List all actors with pagination support
- Search movies by title
Before running the application, make sure you have the following installed:
- Java 17 or later
- Apache Maven
- Docker (for Postgres DB)
-
Clone this Git repository to your local machine.
-
Set up PostgreSQL on your local machine or use a remote PostgreSQL instance.
-
Update the
src/main/resources/application.propertiesfile to configure the PostgreSQL connection properties. Modify the following properties with your PostgreSQL database details:quarkus.datasource.jdbc.url=jdbc:postgresql://your-postgresql-host:5432/your-database-name quarkus.datasource.username=your-database-username quarkus.datasource.password=your-database-password
-
Build the application using Maven:
./mvnw clean package
-
Run the application:
./mvnw quarkus:dev
The application should now be running on http://localhost:8080.
Please check openapi.json file for the available endpoints.
To run the application in a Docker container, follow these steps:
-
Package the project
./mvnw package
-
Build the Docker image:
docker build -f src/main/docker/Dockerfile.jvm -t src-backend-coding-challenge . -
Run the Docker container:
docker run -p 8080:8080 src-backend-coding-challenge
The application should now be accessible at http://localhost:8080.
To run the unit tests for the application, execute the following command:
# With Maven
./mvnw test