This project illustrates three different data types (date, currency and vat) for the purpose of coding challenge and for sample calculations. Third-party APIs are used to get actual currency rates and vat validation.
Docker way:
./gradlew clean build && docker build -t conichi-challenge . && docker run -it -p 8081:8081 conichi-challenge:latest
Simple jar launch:
./gradlew clean build && java -jar build/libs/conichi-challenge-0.0.1-SNAPSHOT.jar
(TODO: export to swagger)
- Get current date by
/api/date/current
curl -X GET http://localhost:8081/api/date/current
- Convert source amount and currency to target currency by
/api/currency/convert
curl -X GET 'http://localhost:8081/api/currency/convert?sourceAmount=144500.00&sourceCurrencyCode=RUB&targetCurrencyCode=USD' -H 'Content-Type: application/json'
- Validate VAT code by
/api/vat/validate
curl -X GET 'http://localhost:8081/api/vat/validate?vatCode=DE%20260543043' -H 'Content-Type: application/json'
- Kotlin, Spring Boot, Feign, Junit
- Was written in a single night :)
- JDK 8
- Externalize api keys injection through docker volume
- Pass jar name to Dockerfile to avoid version hard-coding
- Integration tests using WireMock
- Caching for VAT requests (because date and currencies are updating constantly)
- Swagger documentation