Skip to content

aloelabs/aloe-frontend

Repository files navigation

Aloe Frontend

This repository contains the frontend source code for the 3 Aloe web apps:

Getting Started

Prerequisites

Installing dependencies

From within the root directory:

yarn install

The frontend repository is a monorepo that contains 3 separate apps. Additionally, the shared directory contains shared components and utilities that are used by both earn and prime.

Setting up the environment

The frontend uses environment variables to configure the app. These variables are stored in a .env file in each app directory. For example, the .env file for the Earn app is located at earn/.env. The .env file is not included in the repository, so you will need to create it yourself. The .env file should contain the following variables:

REACT_APP_ETHERSCAN_API_KEY=YOUR_ETHERSCAN_API_KEY
REACT_APP_ALCHEMY_API_KEY=YOUR_ALCHEMY_API_KEY
REACT_APP_INFURA_ID=YOUR_INFURA_ID

We also include a REACT_APP_SENTRY_DSN variable, but this is optional. If you do not have a Sentry account, you can leave this variable out.

Running the apps

Blend

To run the Blend app, run the following command from the root directory:

cd blend
yarn start

To build the Blend app for production, run the following command from the root directory:

cd blend
yarn build

The build will be output to the build directory. See the section about deployment for more information.

Earn

To run the Earn app, run the following command from the root directory:

cd earn
yarn start

Note that the yarn start command will also build the shared directory. If you are making changes to the shared directory, you will need to stop the app and run yarn start again to see the changes. Changes made to the earn directory will be reflected immediately, however. If you want to see changes made in shared immediately, run yarn start in the shared directory while earn is also running.

To build the Earn app for production, run the following command from the root directory:

cd earn
yarn build

The build will be output to the build directory. See the section about deployment for more information.

Prime

To run the Prime app, run the following command from the root directory:

cd prime
yarn start

Note that the yarn start command will also build the shared directory. If you are making changes to the shared directory, you will need to stop the app and run yarn start again to see the changes. Changes made to the prime directory will be reflected immediately, however. If you want to see changes made in shared immediately, run yarn start in the shared directory while prime is also running.

To build the Prime app for production, run the following command from the root directory:

cd prime
yarn build

The build will be output to the build directory. See the section about deployment for more information.

Learn More

You can learn more in the Aloe documentation.

To learn React, check out the React documentation.

License

This project is licensed under the MIT License - see the LICENSE file for details