Environment | Status |
---|---|
Prod | |
Staging |
The Stacks Explorer is built with React, next.js and @stacks/ui.
To run the explorer locally, first clone this repo.
Next let's make sure you have the tools to install the projects dependencies:
We highly recommend using Homebrew.
Now open your Terminal, and make sure you are in the /explorer
folder to run yarn
to install the dependencies:
yarn
The application needs a couple of env variables to work properly:
NEXT_PUBLIC_MAINNET_API_SERVER=https://stacks-node-api.stacks.co
NEXT_PUBLIC_TESTNET_API_SERVER=https://stacks-node-api.testnet.stacks.co
NEXT_PUBLIC_LEGACY_EXPLORER_API_SERVER=https://explorer-api.legacy.blockstack.org
NEXT_PUBLIC_DEPLOYMENT_URL=https://explorer.stacks.co
NEXT_PUBLIC_MAINNET_ENABLED="true"
NEXT_PUBLIC_DEFAULT_POLLING_INTERVAL="10000"
If you are in a mac, you'll need to add this to /etc/paths
To build and run the application locally, you can run this yarn task which will launch the application at http://localhost:3000.
yarn dev
To build for production, run yarn build
which will run the default next.js build task.