---
title: "Annotated example"
description: "A complete .trevize/settings.json walked through section by section, based on a real repository."
---

> Documentation Index
> Fetch the complete documentation index at: https://docs.trevize.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Annotated example

Here's a complete `.trevize/settings.json` that uses every top-level block. It's
based on a real monorepo — a web app plus a companion sync process, backed by a
Neon database — and is walked through below.

```json
{
  "$schema": "https://trevize.dev/schemas/settings.json",
  "workspaceId": "your-workspace-id",
  "projectId": "trevize-dev/trevize",
  "hooks": {
"SandboxReady": [
  { "command": "source /usr/local/share/nvm/nvm.sh && nvm use 24" },
  { "command": "bun install" }
]
  },
  "preview": {
"targets": {
  "dev": {
    "defaultProcess": "web",
    "processes": [
      {
        "name": "web",
        "command": "bun run dev",
        "port": 4321,
        "env": { "VITE_ZERO_CACHE_URL": "${PREVIEW_URL_ZERO}" }
      },
      {
        "name": "zero",
        "command": "bun run --cwd apps/web dev:zero",
        "port": 4848,
        "env": {
          "ZERO_QUERY_URL": "${PREVIEW_URL_WEB}/api/zero/query",
          "ZERO_MUTATE_URL": "${PREVIEW_URL_WEB}/api/zero/mutate"
        }
      }
    ]
  }
}
  },
  "resources": {
"neon": {
  "env": {
    "DATABASE_URL": "NEON_DATABASE_URL",
    "ZERO_UPSTREAM_DB": "NEON_DATABASE_URL"
  }
}
  }
}
```

## Walking through it

**Identity.** `$schema` enables editor autocomplete; `workspaceId` and
`projectId` identify the project to Trevize. See
[Overview & schema](/configuration/settings-json).

**Hooks.** On [`SandboxReady`](/configuration/hooks), the sandbox selects Node 24
and installs dependencies with `bun install` — so the repository is ready before
anything runs.

**Preview.** The [`dev` target](/configuration/preview) runs two processes:

- `web` (port 4321) is the default process reviewers see. Its
  `VITE_ZERO_CACHE_URL` points at the other process using `${PREVIEW_URL_ZERO}`.
- `zero` (port 4848) is a sync service that points back at the web process with
  `${PREVIEW_URL_WEB}` — showing how processes reference each other by name.

**Resources.** The [`neon` resource](/configuration/resources) gives each run its
own Postgres branch. Both `DATABASE_URL` and `ZERO_UPSTREAM_DB` are set from the
injected `NEON_DATABASE_URL`, so the app and the sync service share the same
isolated database.

> **Start small**
>
> You don't need all of this at once. A `hooks.SandboxReady` with your install
> command plus a single-process `preview` target is enough to get a working
> preview; add `resources` when you want a real database per run.

Source: https://docs.trevize.dev/configuration/example/index.mdx
