/Currency-Converter

A simple currency converter app written with React.

Primary LanguageJavaScript

Currency Converter

What's that?

Currency Converter is an application for calculating what the amount is worth in another currency.

Prerequisites

For development:

To download the dependencies of the project, you can use the following command in the directory of package.json:

npm install

Please note that Node.js with version 14.5.0 and npm with version 6.14.5 must be also installed in order to run this command.

For production:

By using Dockerfile in the project's directory, you can run the following command in order to create a Docker image:

docker build -t <name-of-the-image> .

Please note that Docker must be installed in the machine that you want to run the app.

You can verify the Docker image by using the following command:

docker images

Usage

Use the following command to run the application:

npm start

Or alternatively, you can run the Docker image that you have created by using the following command:

docker run -d -it -p 80:80/tcp --name <name-of-the-container> <name-of-the-image>:latest

After running the application, you can browse to localhost:3000(with npm install) or localhost:80(with Docker) and the following screen welcomes you.

Type the amount that you want to convert and then press the green button(with check icon) on the right in order to perform the conversion and see its result.

You can also use the yellow button(with double arrow icon) in the middle to switch between the currencies.

After performing the conversion you can also see the exchange rates historically in a table or in a graph. By changing the days from the dropdown(default is 7 days), you can see more historical data.

Moreover, all of your conversion results are stored in your browser's local storage and it can be reached via the Conversion History tab on top.

Action buttons will be shown when the mouse arrow enters the actions column. By pressing the blue button(with eye icon) you can switch to the Currency Converter tab and perform the conversion. Also if you want to delete the specific conversion from the history you can press the red button(with bin icon).