Secure place for your recipes!
RecipesEngine is an API providing the ability to save your own recipes in a secure location and access to intelligently search for them.
Feel free to use it through my heroku instance or build the project on your own computer!
- Register as a new user
- Add your own recipes
- Change or delete individual recipes
- Use the search engine to search your recipes with restrictions
git clone https://github.com/Franek-Antoniak/recipes-engine.git
cd recipes-engine
docer-compose up
- As the application only contains an API, I have included and implemented Swagger 3.0 to make it easy to see its capabilities.
- The web module contains the controllers which handle the requests from user
- There are three controllers:
- RecipeController
- UserController
- GlobalExceptionController
- The first two controllers deal with the recipes and the user in turn. They also include exception handling.
- The last controller deals with exception handling, which is repeated in each controller.
- It is responsible for the facade between the service logic and the controller logic.
- It is, in a sense, an adapter between controller and service. Uses individual UseCases to achieve individual actions.
- Facade is also connection between other services not directly related to recipes - for example: UserService.
- Each of the ucecases is responsible for solving a problem, often a recurring one.
- It is a class with only one method - execute. This increases the readability of the code, and reduces the likelihood of errors.
- The services are responsible for communication with the repository and operations on the data.
- They do not contain much domain-related logic, thus reducing the number of methods or the possibility of errors.
- Repositories communicate with the database. They also create personalised methods through the implementation of JpaSpecificationExecutor.
- To implement the back-end, I have used Java 11 along with the Spring framework with the following modules:
- Spring Boot
- Spring Data
- Spring Security
- Spring MVC
- Spring Actuator
- I have used Gradle for the build automation tool.
- Other libraries in the project:
- Mapstruct
- Lombok
- Hibernate Validator
- Hibernate
- Swagger 3.0
- JPA Model Generator
- PostgreSQL
- Patterns such as Builder, Facade, UseCase, DTO, Adapter, Decorator, Observer, State, Dependency Injection, and Proxy were used in the design all across of the application.
- All connections are authorized, and the user should not be able to find vulnerable places in the application.
- The database used in this application is PostgreSQL.
- The schema and the data are automatically generated when the application starts.
- The application has been deployed on Heroku platform along with PostgreSQL addon.
- To make it easier to work with the application, I used Docker together with Docker Compose.
- This increases security and makes it easier to configure the application.
- By using a container, we do not need to download PostgreSQL additionally.