https://github.com/janniks/explorer
https://github.com/janniks/explorer
Last synced: about 1 year ago
JSON representation
- Host: GitHub
- URL: https://github.com/janniks/explorer
- Owner: janniks
- License: mit
- Created: 2023-05-25T23:19:12.000Z (about 3 years ago)
- Default Branch: feat/hackathon-whytxfail
- Last Pushed: 2024-05-03T09:44:38.000Z (about 2 years ago)
- Last Synced: 2025-02-14T09:51:10.135Z (over 1 year ago)
- Language: TypeScript
- Size: 10.8 MB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
Awesome Lists containing this project
README
# Stacks 2.0 Explorer


| Environment | Status |
| ----------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Prod | [](https://argocd.blockstack.xyz/applications/prod.explorer) |
| Staging | [](https://argocd.blockstack.xyz/applications/staging.explorer) |
### Getting started
The Stacks Explorer is built with [React](https://reactjs.org/), [next.js](https://github.com/zeit/next.js) and [@stacks/ui](https://github.com/blockstack/ui).
To run the explorer locally, first [clone this repo](https://docs.github.com/en/github/creating-cloning-and-archiving-repositories/cloning-a-repository).
Next let's make sure you have the tools to install the projects dependencies:
1. Install [NodeJS](https://nodejs.dev/) that includes `npm`
1. Install [Pnpm](https://pnpm.io/installation)
We highly recommend using [Homebrew](https://brew.sh/).
Now open your Terminal, and make sure you are in the `/explorer` folder to run `pnpm i` to install the dependencies:
```sh
pnpm i
```
### Env variables
The application needs a couple of env variables to work properly:
```
NEXT_PUBLIC_MAINNET_API_SERVER=https://api.hiro.so
NEXT_PUBLIC_TESTNET_API_SERVER=https://api.testnet.hiro.so
NEXT_PUBLIC_LEGACY_EXPLORER_API_SERVER=https://explorer-api.legacy.blockstack.org
NEXT_PUBLIC_DEPLOYMENT_URL=https://explorer.hiro.so
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`
### Run in development mode
To build and run the application locally, you can run this pnpm task which will launch the application at http://localhost:3000.
```sh
pnpm dev
```
### Building for production
To build for production, run `pnpm build` which will run the default next.js build task.