This is a just-for-fun project to explore some technologies around Spring and the microservices architecture.
To start the system you just have to run the start.sh
script on the root directory:
./start.sh
And to stop the system you can run the stop.sh
script:
./stop.sh
- Create a user:
curl --location --request POST 'http://localhost:8080/users/users' \
--header 'Content-Type: application/json' \
--data-raw '{
"email": "user@example.com",
"password": "mypassword"
}'
- Authenticate within the system:
curl --location --request POST 'http://localhost:8080/users/authentication/login' \
--header 'Content-Type: application/json' \
--data-raw '{
"email": "user@example.com",
"password": "mypassword"
}'
-
Copy the JWT you get as a response to the previous request
-
Start creating orders:
curl --location --request POST 'http://localhost:8080/orders//orders' \
--header 'Authorization: Bearer <your-token-here>' \
--header 'Content-Type: application/json' \
--data-raw '{
"products": [
{
"productId": 1,
"quantity": 10
},
{
"productId": 2,
"quantity": 20
},
{
"productId": 3,
"quantity": 30
}
]
}'
NOTE: Order creation might return 504 status code some times due to a timeout on the api gateway because the threshold is pretty low