Skip to content

Rufaisashah/Currency-Calculator-App

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 

Repository files navigation

🌍 Currency Converter App

A sleek, responsive, and functional currency converter built with vanilla JavaScript. This application fetches real-time exchange rates from a live API to provide accurate financial conversions.

🚀 Live Demo

View the Live Project Here


🛠️ Features

  • Real-Time Data: Fetches the latest exchange rates using the Open Exchange Rates API.
  • Smart Conversions: Utilizes base-rate logic to convert between any two supported currencies (e.g., EUR to DKK).
  • Professional UI: Styled with CSS Root variables for high maintainability and a modern aesthetic.
  • Validation: Built-in error handling for invalid or negative inputs.

🏗️ Core Logic Explained

As a developer, I focused on several key programming principles for this project:

1. Asynchronous Data Handling

I used the fetch API combined with async/await to ensure a smooth user experience while retrieving data from an external server.

2. Object Manipulation

The application parses a complex JSON object from the API. I used Object.keys() to dynamically populate the dropdown menus, ensuring the UI stays updated if the API adds new currencies.

3. Mathematical Ratio Formula

Since the API provides rates relative to USD, I implemented the following cross-conversion logic: $$Result = (Amount / Rate_{From}) \times Rate_{To}$$


💻 Tech Stack

  • Frontend: HTML5, CSS3 (Flexbox, CSS Variables)
  • Logic: JavaScript (ES6+, Fetch API, DOM Manipulation)
  • API: Open Exchange Rates API

📖 How to Run Locally

  1. Clone the repository:
    git clone [https://github.com/your-username/your-repo-name.git](https://github.com/your-username/your-repo-name.git)

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors