Skip to content

🔄️ The world's most trusted, fast and secure currency converter

License

Notifications You must be signed in to change notification settings

Evavic44/currencee

Repository files navigation

logo

Currencee

The World's Most Trusted, Fast and Secure Currency Converter


Currencee - Trusted | Product Hunt

Run project locally

This project utilizes a simple nodejs express backend which is hosted on Vercel to hide the API credentials. To run the project locally, follow the steps below:

  • First generate your own API keys from Currencybeacon
  • Fork and clone the project to your machine.
  • Rename .env.example in the server directory to .env
  • Insert your API keys
  • Run the commands below
cd server
npm install
npm start

This should start the backend server on localhost:5000

Vite App

With the server running, you can now run the converter locally,

  • Rename .env.example to .env
  • Set VITE_API_URL to the hosted backend URL (Only relevant for production)
  • Run the commands below
npm install
npm run dev

Now you can visit localhost:5173 to see the project live.

Server Endpoints

Important

The convert endpoint takes in three parameters, a base currency code base, a foreign currency code foreign, and the amount you would like to convert.

Example endpoint

http://localhost:5000/convert?base=USD&foreign=NGN&amount=1

This should return an object that contains the conversion details.

If you notice any bugs or errors, kindly raise an issue to discuss it. Contributions are also welcome.

Attribution

The converter is powered by the CurrencyBecacon API, which supports over 161 commonly circulating world currencies listed here. These cover 99% of all UN recognized states and territories.

The flags used are embedded using Flagcdn which offers countries images based on their code.