The easiest way to get everything up is to run
docker compose up frontend -d
- Make sure you have the following installed:
- Node.js (≥ v18) – Install via nvm.
- Rust (≥ 1.74) – Install using the Rust installer.
- PostgreSQL (via Homebrew or system package manager)
brew install postgresql@15
brew services start postgresql@15
- SQLx CLI (for running migrations):
cargo install sqlx-cli --no-default-features --features postgres
- Create the database with
$ psql postgres << EOF
CREATE USER postgres WITH PASSWORD 'password';
ALTER USER postgres WITH SUPERUSER;
CREATE DATABASE batch_explorer_db OWNER postgres;
EOF
- Apply migrations with
cd backend
export DATABASE_URL=postgres://postgres:password@localhost:5432/batch_explorer_db
cargo run --bin migration
- Run the backend with
export APP_DATABASE_URL=postgres://postgres:password@localhost:5432/batch_explorer_db
export STRATA_FULLNODE=https://rpc.testnet-staging.stratabtc.org
export APP_FETCH_INTERVAL=5
cargo run --bin batch-explorer
- Run the frontend with
cd frontend
npm install
npm run dev -- --host