- Clone the repo:
git clone https://github.com/harsh-2711/crypto-manager.git && cd crypto-manager
- Go to
api
directory:cd api
- Create a virtual environment (optional):
virtualenv venv
- If virtual environment package is not installed, first do:
pip install virtualenv
- If virtual environment package is not installed, first do:
- Start virtual environment:
source venv/bin/activate
- Install dependencies:
pip install -r requirements.txt
- Get your api keys from Crypto Compare and Nomics
- Create a
.env
file in theapi
folder and paste the api keys:touch .env && echo CRYPTO_API_KEY=<crypto_key> >> .env && echo NOMICS_API_KEY=<nomics_key> >> .env
- Head over to main project directory
- Install NodeJs from NodeJs Official Page.
- Install node dependencies:
npm install
- Start frontend:
npm start
- Start backend:
yarn start-api
ornpm run start-api
- Navigate to
http://localhost:3000/
- (optional) Run in terminal
npm i -g cross-env
For testing react components and functions,
- Head over to root directory
- Write
npm test
in terminal
For adding new frontend tests, go to __tests__
folder in src
directory. Please follow the below convention to add new test files -
- For adding component tests -
<component_name>.test.js
- For adding functional tests -
<package_name>_<function_name>.test.js
- For adding unit tests -
<package_name>_unit.test.js
For testing flask server and API endpoints,
- Head over to root directory OR into
api
folder - Write
pytest
in terminal
For adding new backend tests, go to tests
folder in api
directory. Please follow the below convention to add new test files -
- For adding functional tests -
test_functional_<function_name>.py
- For adding unit tests -
test_unit.py