> For the complete documentation index, see [llms.txt](https://plimsoll-protocol.gitbook.io/plimsoll-protocol-docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://plimsoll-protocol.gitbook.io/plimsoll-protocol-docs/developers/local-setup.md).

# Local setup

You can run all three parts on one machine. Every default points at the testnet deployment, so nothing needs deploying first.

## Requirements

| Tool        | Version                      | For                              |
| ----------- | ---------------------------- | -------------------------------- |
| Rust        | stable, with `wasm32v1-none` | contracts                        |
| Stellar CLI | 28.1 or later                | building and deploying contracts |
| Go          | 1.27 or later                | indexer                          |
| Node.js     | 22.12 or later               | app and SDK                      |

No Docker or Postgres install is needed: the indexer ships an embedded Postgres for development.

## Contracts

```bash
git clone https://github.com/plimsoll-protocol/plimsoll-contracts && cd plimsoll-contracts
rustup target add wasm32v1-none
cargo test               # 53 tests
stellar contract build   # soroban-sdk 28 requires building through the Stellar CLI
```

`cargo build --target wasm32v1-none` fails on purpose with soroban-sdk 28: "soroban-sdk requires stellar-cli v25.2.0+ to build a contract". Use `stellar contract build`.

## Indexer

```bash
git clone https://github.com/plimsoll-protocol/plimsoll-indexer && cd plimsoll-indexer
go run ./cmd/devdb &               # Postgres on localhost:54329
cp .env.example .env
set -a; . ./.env; set +a
go run ./cmd/plimsoll-indexer      # API on :8080
curl localhost:8080/v1/assets
```

Quote `STELLAR_NETWORK_PASSPHRASE` in `.env`: it contains spaces and a `;`.

## App

```bash
git clone https://github.com/plimsoll-protocol/plimsoll-app && cd plimsoll-app
npm install
echo "NEXT_PUBLIC_INDEXER_URL=http://localhost:8080" > apps/web/.env.local   # optional
npm run dev                         # http://localhost:3000
```

Without `NEXT_PUBLIC_INDEXER_URL` the app reads straight from the contracts.

## Signing transactions

Install [Freighter](https://www.freighter.app/), switch it to **Testnet**, and fund the account with Friendbot:

```bash
curl "https://friendbot.stellar.org/?addr=<YOUR_G_ADDRESS>"
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://plimsoll-protocol.gitbook.io/plimsoll-protocol-docs/developers/local-setup.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
