ExchangeRateChecker

This is a microservice which pulls the exchange rate from euro to dollar from an API, and writes it to a DB. The exchange rates can be accessed via two REST endpoints which return a JSON payload. One returns the most recent exchange rate and the other returns all exchange rates in between two timestamps. For further details see the swagger file.

How to run

CREATE TABLE "public"."timestamps_and_rates" (
                    "date_time" timestamp without time zone,
                    "rate" real,
                    PRIMARY KEY ("date_time"));
  • if you want to change the DB / table / column names make sure to adjust the SQL queries aswell
  • clone/fork this repo
  • run the project

Tech Choices

  • Maven and MavenWrapper for managing libraries, executing tests and building the application
  • Spring for dependency injection, DB access, scheduling and so forth
  • Postgres for the DB because its open source, object relational and I have some minor experience with it already.
  • JUnit for unit testing
  • Swagger for API documentation