A React and TypeScript dashboard for checking currency exchange rates, converting amounts, and viewing exchange-rate trends.
- Currency converter with live rates
- Historical exchange-rate chart with selectable ranges
- Light and dark theme toggle using React Context
- Loading, empty, and error states for API-driven views
- React Query caching and request state management
- Responsive layout for desktop and mobile
- React
- TypeScript
- Vite
- TanStack React Query
- React Icons
- Vitest
- React Testing Library
Exchange-rate data is fetched from the Frankfurter API:
https://api.frankfurter.devAPI request functions live in src/services/currencyService.ts. Pure formatting and calculation helpers live in src/utils.
Install dependencies:
npm installStart the development server:
npm run devBuild for production:
npm run buildRun tests:
npm testThe test suite intentionally focuses on high-value coverage rather than testing every component:
- Currency converter component tests with React Testing Library
- Utility test for currency code formatting used by the converter
- Dashboard integration test for the initial full-page loading state
For Netlify, use:
Base directory: currency-dashboard
Build command: npm run build
Publish directory: distIf the Netlify base directory is not set, use:
Build command: npm run build
Publish directory: currency-dashboard/dist