This project is a microservice API written with framework Spring Boot. The main purpose of this project is to demonstrate how to build and gain experience with challenges that Microservice Architecture can offer.
This is an API REST to handle product orders delivery and track the status of the product during the shipping. This API uses concepts as TDD, SOLID e Automated tests to assure the quality of the code, the funcionality of the API and the maintenance capability of the system.
-
Ordering API REST
A microservice to manage products orders of a ecommerce application. See at: matheusinit/ordering-api-aspnet
To run the project:
docker compose up -d
To update the project with recent changes:
docker compose up -d api-rest --build
To stop the project:
docker compose down
To run the project:
./gradlew bootRun
To download the dependencies:
./gradlew build --refresh-dependencies
To run the unit tests:
./gradlew test
To run the integration tests:
./gradlew integrationTest
Instant
is a class to represent a instant of time, a moment, in seconds since 00:00:00 UTC on 1 January 1970 (Unix epoch). It is used to represent a moment in time since the
Unix epoch, so do even has information about a date or time.
LocalDateTime
has no information about time-zone, so it can represent different instants depending on
the time-zone the computer is localed. It is used more to represent date and time, such as Birthdays.
And ZonedDateTime
can represent a date and time with the information about the time-zone, so more suited for working with dates that
change time-zone that want date and time to be consistent.
- List products
- Register Product
- Update product
- Delete product
- Add delivery stations
- Get an order from the message queue
- Get delivery stations
- Set order out for delivery
- Set order as delivered
- Set stock by product
- Get stock by product
- Send to microservice the stock data every time the stock is updated via Message Queue
- Receive order data from Message Queue from a microservice
As a courier, I want to set an order out for delivery, so that the consumer can track the status of the order.
- 🔗 Spring Boot
- 🔗 What are microservices?
- 📖 Microservice Patterns: With Examples in Java
- 🔗 Best practices for REST API design
Built with ❤️ by matheusinit