This project consists of 3 microservices working together to provide ToDo list CRUD functionality with Login/Registration and Exception Handling. All the love in this project went to Backend microservice whilst Frontend is more of a proof of concept and has a few major flaws.
Backend allows users to register and login into the application using Spring Security 6 also providing the CRUD functionality for ToDo tasks for every user. It also sets up the PostgreSQL database (configured in docker-compose.yml) using liquibase migrations, provides Exception Handling with customized exception responses, ability to sort and filter ToDo lists using JPA Specifications as well DTO-level Validation and unit tests for creation and updating ToDo tasks. Additionally Backend provides an endpoint allowing to check how many requests did it handle since launch (requests counted using Actuators HttpExchangeRepository).
Frontend displays the Gui using Thymeleaf templates and sends requests to backend upon entering specific URLs. It requires backend to be constantly working in the background since the requests count handled by backend is displayed in the index page footer.
Gateway is here only to route requests for frontend or backend based on the request path.
The project has dependencies on the following frameworks, libraries, and tools:
- Spring Framework: Used for creating RESTful APIs and handling HTTP requests.
- Lombok: Used for generating boilerplate code, such as getters and setters, reducing the amount of manual coding.
- MapStruct: Used for object mapping between DTOs and response objects, simplifying the conversion process.
- Actuator: Used for counting the amount of handled requests.
- Spring Security: Used for login and registration functionality using JWT Tokens and also secures endpoints which require user to be logged in.
- Validation: Provides data validation so that the correct data would be passed to database.
- PostgreSQL driver: Used to work with Postgres database.
- jjwt-api, jjwt-impl, jjwt-jackson - Used for JWT Token logic.
- Spring Framework: Used as a starter for Frontend service.
- Thymeleaf: Used to display prepared .html templates and connect them with Java logic.
- Thymeleaf-extras java8time: Used to display date formatted using thymeleaf.
- Spring Framework: Used as a starter for Gateway service and Spring Gateway.
- Spring Gateway: Used to route requests for frontend or backend based on the request path
Adam Szałański |
|
|