- Install minimum
node
andnpm
version (seepackage.json
engine
section) - Provide correct env variables by creating
frontend/.env
file - Install dependencies via
npm install
- Run the application in development mode via
npm run dev
- Configure formatting and linting setup
# build for production and launch server
$ npm run build
$ npm run start
# generate static project
$ npm run generate
# for component development
$ npm run storybook
# to run jest tests
$ npm run test
RPC_URL
: (required) Etherium RPC url used for fetching data from the blockchain- In case infura url is used, we automatically add list of default networks
DEMO_MODE
: (optional) When set to true the page will only show a "Coming soon" screen. Can be used for production while the page is not ready yet.PRODUCTION_DOMAIN
: (optional) Required in order to enable plausible.io statistics. In addition to adding it here, the domain (e.g.auctions.makerdao.network
) should also be registered within plausible dashboard.CONTACT_EMAIL
: (optional) Required in order to display contact link in the footer. This email should be able to accept and manage bug reports and other contact requests.STAGING_BANNER_URL
: (optional) When set a banner will be displayed, warning the user that they are using a staging version. The text will useSTAGING_BANNER_URL
as a link to production UI.MAX_PRIORITY_FEE_PER_GAS_WEI
: (optional, default can be found in core/src/gas.ts) – EIP-1559max_priority_fee_per_gas
valueHEAPIO_ID
: (optional) HeapIO analytics Project's Environment ID. Required for tracking analytics.FRONTEND_ORIGIN
: (optional, default empty) – public url of the frontend, eghttps://unified-auctions.makerdao.com
. Used to correctly specify open graph meta tagsENABLE_FILE_PROTOCOL
: (optional, defaultfalse
) – By setting this variable totrue
,npm run generate
will set vue router mode tohash
and produce html that can be opened without http server, viafile://
protocol
Notes:
- Env variables are accessible via the
secret
command underauction-ui/${environment}/frontend
- In order to provide environment variables to the frontend inside the container, they have to be available at build time. For this:
- modify
build-and-deploy-(staging|production).yml
file,parameterPairs
variable to include comma-separated key-value pairs like/auction-ui/main.auction-ui.k8s.sidestream.tech/frontend/rpc_url = RPC_URL
- modify
build-and-deploy-(staging|production).yml
file,build-args
variable to include newline-separated key-value pairs likeRPC_URL=${{ env.RPC_URL }}