Skip to main content
This guide walks you through setting up the Snapshot X monorepo for local development.

Prerequisites

Before you begin, ensure you have the following installed:
1

Node.js >=22.6

Snapshot X requires Node.js version 22.6 or higher.
node --version
If you need to upgrade, download from nodejs.org or use a version manager like nvm.
2

Yarn 1.22

The project uses Yarn 1.22 for package management.
yarn --version
Install Yarn if needed:
npm install -g [email protected]
3

Docker

Docker is required for running local backend services (API and Mana).
docker --version
Download from docker.com if not installed.

Clone the Repository

Clone the Snapshot X monorepo from GitHub:
git clone [email protected]:snapshot-labs/sx-monorepo.git
cd sx-monorepo

Install Dependencies

Install all dependencies across the monorepo:
yarn
This will install dependencies for all workspaces using Yarn workspaces.
The monorepo uses Turborepo for task orchestration, allowing efficient parallel builds and caching.

Project Structure

The monorepo is organized into apps and packages:

Apps

DirectoryDescription
apps/uiVue 3 frontend for Snapshot
apps/apiApollo GraphQL server + Checkpoint blockchain indexer
apps/manaExpress transaction relayer for gasless voting
apps/highlightHighlight integration app

Packages

DirectoryDescription
packages/sx.jsShared TypeScript SDK (published as @snapshot-labs/sx)

Other Directories

  • scripts/ - Monorepo development scripts
  • tests/ - E2E tests using Playwright
  • docs/ - Documentation for common patterns

Architecture Overview

Understanding the architecture helps when developing: UI (Vue 3) → Queries API via GraphQL for governance data, submits transactions to Mana via JSON-RPC. API (Apollo + Checkpoint) → Indexes governance events from EVM, Starknet, and offchain. Serves unified GraphQL for spaces, proposals, votes, and users. Supports Snapshot X, Compound Governor, and OpenZeppelin Governor. Mana (Express) → Relays transactions for gasless voting, handles cross-chain execution (L1↔L2), manages relayer wallets and automated proposal execution. SX.js → Shared SDK used by all services for signing and blockchain interactions.

External Services

Tooling

The monorepo uses:
  • Turborepo - Task orchestration and caching
  • ESLint - Code linting with @snapshot-labs config
  • Prettier - Code formatting with @snapshot-labs/prettier-config
  • TypeScript - Type checking across all packages

Next Steps

Now that your environment is set up:
  1. Run the development services
  2. Learn about contributing to the project
  3. Explore the SDK overview

Build docs developers (and LLMs) love