Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/tswayne/cnb-currency-converter
https://github.com/tswayne/cnb-currency-converter
Last synced: about 1 month ago
JSON representation
- Host: GitHub
- URL: https://github.com/tswayne/cnb-currency-converter
- Owner: tswayne
- Created: 2023-02-05T21:06:46.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2023-02-06T20:24:55.000Z (almost 2 years ago)
- Last Synced: 2023-08-04T12:10:11.753Z (over 1 year ago)
- Language: TypeScript
- Size: 171 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# CNB currency converter
## Tech overview
Application bootstrapped with:
* Create React App w/ typescript ([docs](https://create-react-app.dev/docs/adding-typescript/#installation))
* Styled Components, using [Grommet](https://v2.grommet.io/) as a quick-start component library (found through Styled Components [ecosystem page](https://styled-components.com/ecosystem))
* I had never used Grommet before, but wanted to use a component library in order to move a bit faster. The developer experience is pretty nice, but the resulting DOM is a bit verbose. Would need to spend a little more time with it to form an opinion.
* Base Http Client (my [own package](https://github.com/tswayne/base-http-client-js)), for very simple http interactions
* React Query## Callouts
* The CNB website sets a specific CORS allowed origin (to `apl.cnb.cz`), which causes modern browsers to reject an api request directly to their domain.
To get around that, I have a simple proxy route to pass all requests to `cnb.cz` through. **Note** The server implementation is very bare bones (i.e. a simple express server written in js) as it's simply a means to complete the exercise as instructed.## Running the application
* Requires node, safest version to use would be LTS (18)
* Install dependencies with `yarn` (or `npm i`, version ranges in package.json should be safe)
* Start the client and proxy server together with `npm start`
* Go to `http://localhost:3000/` (tested on Chrome)
* Run tests with `npm test`