DEV Community

zvspany
zvspany

Posted on

Building an open-source crypto and fiat converter with Next.js 14

I recently built a small open-source project called NexCurrency – a fiat and crypto converter built with Next.js 14, TypeScript, Tailwind CSS, and shadcn-style UI components.

The goal was to create a clean system that can convert between:

• fiat → fiat
• fiat → crypto
• crypto → fiat
• crypto → crypto

The tricky part was combining fiat and crypto APIs. Fiat APIs usually return pair-based exchange rates, while crypto APIs return USD prices per asset.

To simplify this, the app normalizes both into a shared internal model using a usdPrice value. Conversions then become:

amount * (from.usdPrice / to.usdPrice)

This approach avoids needing direct pairs for every asset combination and keeps the system provider-agnostic.

Tech stack:
• Next.js 14 (App Router)
• TypeScript
• Tailwind CSS
• Zod validation
• CoinGecko API (crypto prices)
• Frankfurter API (fiat rates)

GitHub repository:
https://github.com/zvspany/NexCurrency

I'd really appreciate any feedback on the architecture, UI/UX, or overall project structure.

Top comments (0)