Skip to content

Conversation

daarpereira
Copy link

@daarpereira daarpereira commented Sep 18, 2025

ExchangeRateUpdater - .NET 8 Project

This PR has the intention of expanding the functionality of ExchangeRateUpdater, a service that retrieves and exposes daily exchange rates from the Czech National Bank. I attempted to make it scalable, easily tested both via the Program file, but also via the Swagger. In development, IDistributedCache is used, and in Production, Redis would be used.

Tried to separate concerns, such as Parsing, ApiCalls and logic of assessing cache and returning the Exchange Rates. Future documents could be needed besides XML, so that was considered as well.

Considered Exception Handling and Logging.

Implemented:

  • Implemented ExchangeRateUpdaterProvider with caching (IDistributedCache)
  • Integrated API client and XML parser for rate retrieval
  • Exposed a REST endpoint with Swagger documentation
  • Added basic unit tests (xUnit + FluentAssertions + NSubstitute)
  • Configured Docker + docker-compose for local and production use
  • Loggic and Exception Handling

Next Steps / Improvements

  • Expand unit test coverage to fully validate all edge cases (parser, caching, API errors)
  • Improve error handling and logging for resilience in production
  • Support additional data sources beyond CNB

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant