Skip to main content
Learn how to run the Snapshot X services in your local development environment.

Quick Start

UI Only

To run just the frontend without backend services:
yarn dev
This starts the UI app with hot-reload for development. The UI will connect to production backend services.

All Services (Interactive)

To run all services (UI, API, Mana) with an interactive service selector:
yarn dev:interactive
This command presents an interactive menu where you can select which services to run. Local APIs will only be used for Ethereum Sepolia and Starknet Sepolia.
Running local backend services requires Docker to be running on your machine.

Setting Up Backend Services

If you want to run the API or Mana services locally, follow these setup steps:
1

Ensure Docker is Running

Verify Docker is installed and running:
docker --version
docker ps
2

Configure API Environment

Copy the example environment file in apps/api:
cd apps/api
cp .env.example .env
The default values in .env.example should work for local development.
3

Configure Mana Environment

Copy the example environment file in apps/mana:
cd apps/mana
cp .env.example .env
Update the following variables in apps/mana/.env:
# Relayer wallet private key (for Starknet and Ethereum)
WALLET_SECRET=your_private_key_here

# Herodotus API keys for L1<->L2 messaging
HERODOTUS_API_KEY=your_api_key
HERODOTUS_LEGACY_API_KEY=your_legacy_api_key
WALLET_SECRET is required if you want to use Mana as a transaction relayer.
Herodotus API keys are only needed if you want to test L1↔L2 messaging features (voting with strategies that use L1 proofs).

Running Individual Services

You can run services individually using Turborepo:
turbo run dev --filter=ui

Tips for Faster Syncing

When running yarn dev:interactive for the first time, the API will sync all blocks from the configured starting block, which can take a long time.

Adjust Starting Block

To speed up initial syncing, you can change the starting block for indexing:
1

For Starknet

Edit apps/api/src/starknet/config.ts and update the starting block number (around line 40).Find the configuration that sets the initial block for indexing and change it to a more recent block number.
2

For Ethereum

Edit apps/api/src/evm/config.ts and update the starting block number (around line 23).Find the configuration that sets the initial block for indexing and change it to a more recent block number.
If you change the starting block, make sure to create a new test space. Spaces created before the new starting block won’t be available in your local API.

Common Commands

Here are other useful commands for development:
yarn build

Troubleshooting

Docker Issues

If services fail to start, ensure Docker is running:
docker ps

Port Conflicts

If you see port conflict errors, check if other services are using the default ports:
  • UI: 3000
  • API: 3000 (GraphQL)
  • Mana: varies by configuration

Environment Variables

If Mana fails to start, double-check that required environment variables are set in apps/mana/.env.

Next Steps

Build docs developers (and LLMs) love