On https://fixer.io/ you can sign up to get access to an WebApi that provides you with currency exchange rates. The API provides the rates in JSON structures. Sign up to get access and familiarize you with the API. Below are a few programming tasks that utilize this service in different ways.
- Create a ruby script within the rails project that takes in two currency codes and one amount as input. The amount is in the first currency, and the script should calculate the currency amount for the second currency code (using the latest exchange rates). The program should do the calculation in process and not utilize any external calculation api.
- Extend the program with an optional input date, do the same calculation as in step 1 but use the currency rate for the date inputted to the program. You need to find out the url for retrieving exchange rate a given date using the documentation on fixer.io.
- Create a program that will be executed once a day. The program should retrieve the latest exchange rate and store it in a database. This task involves designing a suitable database structure. Optional tasks (time permitting)
- Create an API that offers the same calculations as in task 1-1 and task 1-2
- Build a simple web on top of the service you created in task 2, that offers this calculation service to the user.
- Extend the API from task 2-1, with a new method to return all the exchange rates for one currency for a given period of time. The exchange rates should be extracted from the database created in task 1-3.
- Build a web page on top of task 2-3, to show how an exchange rate develops for a time period, find a satiable graphical component to visualize the exchange rate. models:
- Exchange
- Currency
Kindly open a PR and ask for review so anyone available can have a deeper look and give you some feedback. before doing anything else check the jobs controller and understand what it does. the code are basic to start the project however any update or changes is welcome.
- Rails
- Ruby
- Postgresql
- Sidekiq
- Sidekiq cron
- Redis
- Rswag
Here are the steps to follow in order to get this project on your local computer.
rails v7.0.2 +
ruby v3.0.2 +
clone this repo by typing git clone https://github.com/vic778/money-exchange
install the dependencies by typing bundle install
start the local server by running rails s
run the tests by typing rails rswag
👤 Victor Barh
- GitHub: @Vvic778
- Twitter: @victoirBarh
- LinkedIn: LinkedIn
Contributions, issues and feature requests are welcome!
Feel free to check the issues page
Give a ⭐️ if you like this project!
N/A
This project is MIT licensed.