Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/surajgharpankar28/currency-converter
This is a simple currency converter web application built using React, Axios, and the ExchangeRate API. The app allows users to convert an amount from one currency to another in real-time using up-to-date exchange rates.
https://github.com/surajgharpankar28/currency-converter
api currency-converter currency-exchange-rates currrency exchange-rates-api javascript react reactjs
Last synced: 16 days ago
JSON representation
This is a simple currency converter web application built using React, Axios, and the ExchangeRate API. The app allows users to convert an amount from one currency to another in real-time using up-to-date exchange rates.
- Host: GitHub
- URL: https://github.com/surajgharpankar28/currency-converter
- Owner: surajgharpankar28
- Created: 2024-10-27T14:26:25.000Z (2 months ago)
- Default Branch: main
- Last Pushed: 2024-12-11T13:03:15.000Z (25 days ago)
- Last Synced: 2024-12-11T14:19:07.245Z (25 days ago)
- Topics: api, currency-converter, currency-exchange-rates, currrency, exchange-rates-api, javascript, react, reactjs
- Language: JavaScript
- Homepage: https://currency-converter-ssg.vercel.app/
- Size: 77.1 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Currency Converter
This is a simple currency converter web application built using **React**, **Axios**, and the **ExchangeRate API**. The app allows users to convert an amount from one currency to another in real-time using up-to-date exchange rates.
## Demo
Check out the live demo [here](https://currency-converter-ssg.vercel.app/)## Features
- Convert currency from one unit to another (USD, EUR, INR, GBP, AUD).
- Real-time exchange rates using the ExchangeRate API.
- Error handling for API failures and invalid inputs.
- Formatted currency display for better readability.## Technologies Used
- **React**: Front-end library for building the user interface.
- **Axios**: Library for making HTTP requests to fetch exchange rates from the API.
- **ExchangeRate API**: Provides real-time exchange rates for currency conversion.## Installation
1. **Clone the repository**:
```bash
git clone [https://github.com/your-username/currency-converter.git](https://github.com/surajgharpankar28/Currency-Converter.git)
cd currency-converter2. **Install dependencies**:
```bash
npm install3. **Set up the ExchangeRate API**:
- To obtain an API key, sign up on [ExchangeRate API](https://www.exchangerate-api.com/).
- Create a .env file in the project root and add your API key:
```bash
VITE_API_KEY=your_api_key_here
4. **Add the following to your 'vite.config.js' file.**
```bash
import { defineConfig } from "vite";
import react from "@vitejs/plugin-react";
// https://vite.dev/config/
export default defineConfig({
plugins: [
react(),
{
name: "replace-process-env",
// Use the "transform" hook to replace process.env variables
transform(code) {
return code.replace(
/process\.env\.VITE_API_KEY/g,
JSON.stringify(process.env.VITE_API_KEY)
);
},
},
],
});
```
5. **Run the application**
```bash
npm start