Currency Exchange App and Widget
"Kantor" is a mobile-friendly Currency Exchange App built on React and TypeScript. Exchange rates built on top of fake data from service rates.denis.app.
- User-friendly
- Mobile-friendly
- Written entirely in React, TypeScript, Hooks, styled components
- Accessible (super important for online banking)
- Covered by automated tests (widget)
- Rates from European Central Bank, refreshed every 10 seconds
- Three currency accounts with USD, EUR, GBP, - but widget supports more
- Supports account balances
The project consists of three parts:
- Currency Exchange Widget as ready-to-use ES Module
- UI library with ready-to-use ES Module with a styled components, color palette, etc
- Simple Client app with a simple state managment build on CRA with TypeScript.
The monorepo is managed by Yarn workspaces. Folders structure contains:
Directory for full-fledged applications. Contains main Client application.
Directory for reusable modules, that ready to be published to some private/public NPM registry, GitHub Packages or any other package registry. Contains two modules with a @bank/* scope:
import {CurrencyExchangeWidget} from "@bank/react-currency-exchange-widget";<CurrencyExchangeWidget
accounts={{
USD: 100.01,
EUR: 99,
}}
currencies={{
USD: { symbol: "$", name: "US Dollar", code: "USD" },
EUR: { symbol: "β¬", name: "Euro", code: "EUR" },
}}
defaultPair={{
from: "USD",
to: "EUR"
}}
onExchange={(value) => {}}
/>import {Heading1, PrimaryButton, Palette, GlobalStyles, ActionButton} from "@bank/ui-library";<PrimaryButton type="submit">Fancy Button</PrimaryButton>import {convert} from "@bank/exchange-rates";const amount = await convert(100, "USD", "EUR", "latest");Use yarn packages manager to install packages:
yarnyarn startyarn test- error handling
- cover client app with unit tests
- add storybook for ui library
- add cypress e2e tests
* "currency exchange bureau" from polish.