Create a new .env file following the .env.example file, to generate a key you can do it using the following command:
openssl rand -base64 64 | tr -d '\n'
After that, replace it in your JWT.SECRET property and type "docker-compose up -d" in a terminal where you have Docker and Docker Compose downloaded, this will create the app image using the Dockerfile (as it's not uploaded to any Docker repository).
This project consist on a multi-module Maven project, there is a single Spring Boot application but uses many modules. Every module except the application one is structured using a clean architecture, hexagonal architecture in this case. In this way, we can change the different adapters like the database and the number of changes will be minor. Apart from that, the understanding of the code is better, as it tells to the reader (developers) the actions.
Exposes all the endpoints, defines the application configuration (like security) and handles the different exceptions It depends on the main modules orders and auth (bounded contexts). The routes are exposed using openapi and generating the API interfaces from the yaml definitions.
Contains common utilities for all modules
Contains all the logic related to authentication
Logic associated to the orders. Depends on the modules products and payments
Logic of the products. Depends on the module categories
Logic associated to the categories
Logic associated to the payments (it can be useful in the future)
It creates users and then generates the access token
It generates the access token from existing user credentials
It retrieves the different categories
It retrieves the different products
It creates an order based on the products informed (if any) and the seat
It allows us to add products to an existing order
It allows us to finish an order
It allows us to cancel an order
It allows us to delete an existing product from an existing order
It allows us to update the buyer details of an order
The database used in this case is MongoDB, which is easy to configure and we reduce the time spent on the data structure. This kind of no-relation database fits more with the agile methodology.