AUTHOR: SZYMON KORNIK
LINKEDIN: https://www.linkedin.com/in/szymon-kornik-3b12ba217/
WEBSITE: https://www.szymonkornik.com/
- Spring Boot web application
- Architecture: Modular monolith hexagonal architecture
- MySQL database for storing users and movies.
- Facade's design pattern
- High coverage with unit tests and integration tests
- MockMvc was used to test the controlle.
- Full containerization in Docker
MovieLibrary is developed using following technologies:
- Docker to run.
- Just run following command, and wait for containers to be pulled up and started.
docker compose up
- Alternatively you can run docker-compose file through you IDE
After everything builds and ready, you can start the application and test the application using Postman or use Swagger.
Application provides seven endpoints: for retrieving all movies, for retrieving specific movie by title, for saving a movie, for updating a movie, for deleting a movie, for registration and login. Please follow the specification below:
Service url: http://localhost:8080
| HTTP METHOD | Endpoint | REQUEST | RESPONSE | Function |
|---|---|---|---|---|
| GET | /movies | - | JSON | Retrieve all available movies |
| GET | /movies/{movieId} | PATH VARIABLE (movieId) | JSON | Retrieve an movie for a given ID |
| POST | /movies | BODY-JSON (movie) | JSON | Add new movie |
| PUT | /movies | BODY-JSON (movie) | JSON | Update existing movie |
| DELETE | /movies/{movieId} | PATH VARIABLE (movieId) | JSON | Delete movie |
| POST | /register | BODY-JSON (registerRequest) | JSON | Register a new user |
| POST | /token | BODY-JSON (loginRequest) | JSON | Generate an access token with login details |