The Forex Applicaiton is built on top of the Next.js and use tailwind CSS library.
Before you get start, you will ensure you have Node.JS, yarn, Docker installed.
Please run the following command to install the depencies:
yarn
Before start the application, you will need to specific the application environment variables, for instance, create a .env.local file and with the following content:
// The forex-api endpoint
NEXT_PUBLIC_FOREX_API_BASE_URL=http://localhost:8080
// The forex-api token
NEXT_PUBLIC_FOREX_API_TOKEN=10dc303535874aeccc86a8251e6992f5
Then run the following command to start the application:
yarn dev
You can also start the local development environment by just using docker-compose up
Please follow the following practice when you are contribte to the project.
- Adding the components into
src/componentsfolder - Adding the React Hook into
src/hooksfolder and expose the API insrc/hooks/index.tsfile - Adding pages into
src/pages - Adding shared libraries into
src/libfolder - Adding unit testing into
__test__ - Plz follow https://www.conventionalcommits.org/ to write your git commit message
There are some usefull commands that can help you improve your commit quality:
- Auto prettier your changes:
yarn prettier - Lint your change:
yarn lint
The project is using cypress to write the E2E testing scripts. Please the read doc adding the proper testing script under cypress/integration folder.
Please run the following command to create the production build.
yarn build