Build Your Own Currency Calculator App with Next.js 13, Node.js, Firebase, TypeScript and Tailwind CSS
Tags: nextjs, firebase, node, tutorial
Published: 2023-02-15 09:33:15

In this tutorial, you will learn how to build a Currency Calculator App using modern web development technologies. The tutorial assumes that you have some prior experience with web development, specifically with [Next.js](https://nextjs.org), [Node.js](https://nodejs.org), [Firebase](https://firebase.google.com), [TypeScript](https://www.typescriptlang.org), and [Tailwind CSS](https://tailwindcss.com).

The tutorial will guide you through building a currency calculator that allows users to convert one currency to another. The tutorial will use Next.js as the primary framework for building the app, with Node.js for the backend, and Firebase for storing data. The app will be designed using TypeScript, a typed superset of JavaScript, which provides better code readability, maintainability, and scalability.

Tailwind CSS, a utility-first CSS framework, will be used for styling the app. Tailwind CSS provides a set of pre-defined classes that you can use to create your user interface without having to write custom CSS code. This makes it easier to build a responsive and mobile-friendly UI.

Throughout the tutorial, you will learn how to set up the project, create the user interface, implement currency conversion, and handle data storage and retrieval using Firebase. You will also learn how to test the app and deploy it to production.

You will have a fully functional currency calculator app that you can use as a starting point for your own web development projects. The tutorial will provide you with a solid foundation in modern web development technologies, and you will have the confidence to explore and build more complex apps in the future.

---

## 🛰**Part #1 Backend**
{% embed https://www.youtube.com/embed/PpRBse5cOv8 %}

## 💻**Part #2 Frontend**
{% embed https://www.youtube.com/embed/b_IRH2StifI %}

---

## 📌**Demo**
[Currency Calculator App Vercel](https://currencycalculator.vercel.app)

---

## ⚙️**How does this application work?**

This application is a currency conversion tool that allows users to quickly and easily convert between different currencies. The backend server is responsible for fetching the conversion rates from an external API and storing them in a Firebase database. The rates are updated six times a day, ensuring that users have access to the most accurate and up-to-date information.


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/lak3x2qw6n0cx518w523.png)


On the frontend, the user interface displays a list of currencies and allows the user to select the currencies they wish to convert. When the page loads, the frontend fetches the latest conversion rates directly from the Firebase database. The user can then enter the amount they wish to convert, and the frontend will calculate the result using the fetched conversion rates.


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/kib8abakm95dxcfdl0eh.png)


In addition to fetching and displaying the latest conversion rates, the frontend of the application also includes a feature that displays the timestamp of the last update in relative time. This allows users to quickly see how recently the rates were updated and ensure that they are working with the most current information.

To make it even easier for users to see at a glance whether the conversion rates are up-to-date, the application uses a green or red indicator to show whether the rates have been updated within the past 24 hours. If the rates have been updated within the past day, the indicator will be green, indicating that the rates are current. If the rates have not been updated within the past 24 hours, the indicator will be red, signaling to the user that the rates may be out of date.

This feature helps ensure that users always have access to the most accurate and current conversion rates, making the application a reliable and trustworthy tool for all of their currency conversion needs.

This application is designed to be simple and easy to use, with a clean and intuitive interface that makes it easy for users to convert currencies on the go. With its reliable backend server and up-to-date conversion rates, users can trust that they are getting accurate and current information every time they use the tool.

---

## 🚀**How to Deploy Your Node.js Application for Free with Render?**

[Check @destrodevshow 's article](https://dev.to/destrodevshow/deploy-nodejs-express-app-to-heroku-in-less-than-5-minutes-with-video-2ebl)

[Check Freecodecamp's Article](https://www.freecodecamp.org/news/how-to-deploy-nodejs-application-with-render
)

---

## ✈️**Deploy Any Next.js App to Vercel for FREE**
[Watch Our YouTube Tutorial](https://youtu.be/Dtpnai6FjcM)

---

## 📊**API for Exchange Rates Data**
With this API, you can seamlessly integrate exchange rates data into your website or application, giving your users real-time updates on the latest exchange rates.

It offers a free plan that includes 250 requests per month, making it an affordable option for small-scale projects or personal use.

**API:**

```
https://api.apilayer.com/exchangerates_data/latest?base=USD&apikey={YOUR_API_KEY}
```

**API Provider:**
[APILayer](https://apilayer.com)

---

## ⚓️**App**

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/cx2jouqnont2pyqtn34j.png)

---

## **🍀Support**

Please consider following and supporting us by subscribing to our channel. Your support is greatly appreciated and will help us continue creating content for you to enjoy. Thank you in advance for your support!

[YouTube](https://youtube.com/@codeofrelevancy)
[Discord](https://discord.com/invite/f8jwnzcRz2)
[GitHub](https://github.com/codeofrelevancy)