GithubHelp home page GithubHelp logo

exchange-widget's Introduction

Exchange Widget

This project uses an ejected version for CRA, as well it uses Chakra UI as a component library. It is a good idea to use Chakra for this application, because it allows to build accessible apps fast. A small summary of the folder structure:

  • config: contains CRA specific config after being ejected

  • cypress/integration: contains the E2E tests

  • public: contains files that should be public

  • scripts: contains the CRA scripts to work after being ejected

  • src/api: contains functions that mock an API

  • src/components: contains shared components

  • src/config: contains configuration such as constants and the currencies

  • src/mocks: contains mocks to use in unit tests

  • src/pages: contains the pages, for this case only Home and ExchangeCurrency

  • src/types: contains shared types

  • src/utils: contains utils such as number formatting

With more time I would probably spend more time improving the structure of the pages, so that it is clearer what is shared.

Getting started

Install dependencies using:

yarn install

Running the project

You can run the project using

yarn tart

This will try to automatically open your browser, but if it does not work just open http://localhost:3000 to view it in the browser. It will automatically refresh if you make any changes

Testing

Unit tests

To run unit tests you just need to run:

yarn test

This will launch the test runner in interactive mode.

E2E tests

First, make sure the application is running in http://localhost:3000. Then, open cypress with:

yarn cypress:open

You can run any tests from there.

Building

yarn build

This builds the app for production to the build folder. It correctly bundles React in production mode and optimizes the build for the best performance. The build is minified and the filenames include the hashes.

exchange-widget's People

Watchers

Dominik Garcia avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.