This repository contains the code for the Stacks Blockchain Status Page code used by the Stacks Foundation to display blockchain metrics. This is a next.js react app that reads Stacks Blockchain API data from a postgres database to display chainstate data.
- PostgreSQL is a required dependency with a Stacks Blockchain API instance writing chainstate data.
- Vercel cron is used for updating mempool txs
# Clone this repo and enter its directory
git clone https://github.com/stacksfoundation/stacksstatus && cd stacksstatuscp .env.local.example .envset DATABASE_URL to your Stacks Blockchain API database instance.
ex:
DATABASE_URL="postgresql://user:pass@localhost:5432/stacks_blockchain_api?schema=stacks_blockchain_api"
npm installnpm run devnpm run build && npm run prismamigrate && npm run startOpen http://localhost:3000 with your browser to see the result.
| Name | Description | Default Value |
|---|---|---|
NODE_ENV |
Sets the node environment | development |
DATABASE_URL |
Postgresql connection URI | postgresql://user:pass@localhost:5432/stacks_blockchain_api?schema=stacks_blockchain_api |
CRON_SECRET |
Auth key to refresh mempool data via vercel cron | secret |