The Stacks Explorer is built with react, next.js and @blockstack/ui. To run the explorer locally, you can clone this repo and install the dependencies needed. Make sure you have yarn installed.
yarnThe application needs a couple of env variables to work properly:
MOCKNET_API_SERVER=https://crashy-stacky.zone117x.com
TESTNET_API_SERVER=https://sidecar.staging.blockstack.xyz
To build and run the application, you can run this yarn task which will launch the application at http://localhost:3000.
yarn devThe Stacks Explorer connects to the Stacks Blockchain via an API server found here: stacks-blockchain-sidecar.
The Explorer can connect and switch between a few different versions of the network: testnet, mocknet, and a local instance. To run a local instance of the Sidecar API, please read this.
Once you have the Sidecar API running, it should be located at http://localhost:3999. You can then from within your local version of the Explorer switch between the three network options:
To build for production, run yarn build which will run the default next.js build task.