> ## Documentation Index
> Fetch the complete documentation index at: https://pessoal-86816071.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Quickstart

> How to install, configure, validate, and operate the Build a Bear Vault repository.

# Quickstart

This page is the fastest path to understand and validate the repository.

## Prerequisites

* Node.js `18+`
* `pnpm`
* Rust toolchain
* Solana CLI
* Anchor CLI for program deployment and local program work

## Install dependencies

```bash theme={null}
pnpm install
```

## Start with offline validation

Run the complete offline suite first:

```bash theme={null}
node --test --experimental-strip-types tests/offchain/*.test.ts
```

Useful local demos:

```bash theme={null}
node --experimental-strip-types services/solver/src/cli/demo.ts
node --experimental-strip-types services/solver/src/cli/backtest.ts
node --experimental-strip-types services/ranger/src/demo.ts
```

## Create your environment file

```bash theme={null}
cp .env.example .env
```

Then fill the values in [Operations / Environment](./operations/environment).

## Validate runtime configuration

Before any live test, run:

```bash theme={null}
node --experimental-strip-types services/ranger/src/doctor.ts
```

This checks:

* RPC URLs
* local signer loading
* protocol owner/signer alignment
* derived vault PDA
* on-chain visibility of the configured program and vault

## Recommended validation order

If your goal is to bring the whole vault up on Solana devnet first, follow:

* [Operations / Devnet Deploy](./operations/devnet-deploy)

### 1. Protocol build-only checks

Validate that the protocol adapters can build real bundles:

```bash theme={null}
node --experimental-strip-types services/ranger/src/drift-smoke.ts
node --experimental-strip-types services/ranger/src/kamino-smoke.ts
```

### 2. Direct protocol transaction

Validate `Drift` without depending on the vault:

```bash theme={null}
node --experimental-strip-types services/ranger/src/drift-live-send.ts
```

### 3. Vault bootstrap

Once the program is deployed and wallets are funded:

```bash theme={null}
node --experimental-strip-types services/ranger/src/vault-bootstrap.ts
node --experimental-strip-types services/ranger/src/vault-status.ts
```

### 4. Full rebalance path

After the vault exists on-chain:

```bash theme={null}
node --experimental-strip-types services/ranger/src/demo.ts
```

## What not to do first

Do not start with a mainnet bootstrap unless these are already true:

* the program ID points to a real executable program
* the operator wallets have SOL
* `VAULT_SHARE_MINT_KEYPAIR_PATH` and `VAULT_TREASURY_KEYPAIR_PATH` are set
* the protocol owner addresses match local signers

## Next pages

* [Current Status](./current-status)
* [Operations / Devnet Deploy](./operations/devnet-deploy)
* [Operations / Environment](./operations/environment)
* [Operations / Protocol Testing](./operations/protocol-testing)
