A simplified e-commerce API with a single endpoint that performs a checkout action. The single endpoint takes a list of watches and return the total cost.
Simply navigate to the project path and run the following command to start the server locally.
./gradlew bootRun
Additionally, a docker images for the master branch are available at DockerHub. Use the following to pull and run it:
docker pull joaofolino/hbbcc
docker run -p 8080:8080 joaofolino/hbbcc
Simply navigate to the project path and run the following command to start the server locally.
./gradlew test
This application was developed from an endpoint description that encapsulated a specific business logic.
- I started by describing tests to ensure the requirements on the business logic would be met;
- Worked my way down do the data layer, to ensure I would have coverage for reasonably generic persistence of the necessary data structures;
- Worked my way up from the business layer, to cover the expected requests.
- Built the application from the bottom up, layer by layer.
- Started the application and checked that everything was actually working as intended.
- Finished documenting it.
- Reviewed the requirements and made some additional changes to tests, storage and build.
- Added CI/CD for master branch
Additional functionality that was not added but would be nice to have:
- I'm happy with the unit tests but would like to have had included more integration tests
- SWAGGER endpoints, for ease of integration
- Finish extreme case coverage, with more understanding of what the limits should look like
- Caching layer, to avoid direct access to a database