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

# Tech stack

> The languages, frameworks, and packages that make up Carry — and how the monorepo is laid out.

## Stack at a glance

| Layer              | Technology                                                                                               |
| ------------------ | -------------------------------------------------------------------------------------------------------- |
| **Smart contract** | Sui Move (`carry::access`), testnet — owned `Receipt` objects + blake2b256 hash chain                    |
| **Storage**        | Walrus (HTTP API), Seal via MemWal (optional)                                                            |
| **Frontend**       | Next.js 16, React 19, TypeScript (strict), Tailwind CSS v4                                               |
| **On-chain reads** | `@mysten/sui` v2.22 (`SuiJsonRpcClient` via `jsonRpc`) — read-only `getObject` + `devInspect`, no wallet |
| **Anchoring**      | server-side via the Sui CLI keystore (no wallet dependency)                                              |
| **Crypto**         | `@noble/hashes` blake2b256 (TS) ↔ `sui::hash::blake2b256` (Move), pinned to a golden vector              |
| **LLMs**           | OpenAI GPT-4o + Anthropic Claude (behind interfaces, mock fallback)                                      |
| **Agent interop**  | MCP server + a Vercel AI SDK adapter                                                                     |
| **Tests**          | Vitest (TS) + Sui Move unit tests                                                                        |

## Monorepo layout

```
carry/
├─ apps/
│  └─ web/                 # Next.js app
│     ├─ app/
│     │  ├─ (app)/         #   chat-a · chat-b · dashboard · access
│     │  ├─ companion/     #   Aria — the health companion
│     │  ├─ verify/[id]/   #   the walletless proof verifier
│     │  └─ api/           #   chat · companion · memories · policy · anchor · anchor-sui · reset
│     ├─ components/       #   UI (chat, receipts, access matrix, companion, verifier)
│     └─ lib/              #   sui.ts · blake.ts · verify.ts · store.ts · llm-providers · companion
├─ packages/
│  ├─ carry-core/          # framework-free: types, gate, policy, receipt (unit-tested)
│  ├─ carry-walrus/        # Walrus HTTP client + MockWalrus
│  ├─ carry-mcp/           # @usecarry/mcp — MCP server (5 tools)
│  ├─ carry-cli/           # @usecarry/cli — the `carry` command
│  └─ carry-vercel-ai/     # @usecarry/vercel-ai — Vercel AI SDK middleware
├─ contracts/              # Sui Move package (carry::access) + tests
└─ deployments/            # testnet.json (package + object IDs + example proofs)
```

## Design principles

<CardGroup cols={2}>
  <Card title="Pure core" icon="cube">
    `@carry/core` holds the gate, policy, and receipt logic with zero framework deps — so the web app, the CLI, the MCP server, and the SDK adapter enforce identically.
  </Card>

  <Card title="Adapters behind interfaces" icon="plug">
    LLM and Walrus clients sit behind interfaces with deterministic mock fallbacks — offline-friendly and test-friendly.
  </Card>

  <Card title="Typed boundaries" icon="shapes">
    A few typed contracts (`Memory`, `Policy`, `AnswerReceipt`) define the seams; the rest composes.
  </Card>

  <Card title="On-chain source of truth" icon="link">
    The access policy and the proof chain live on Sui; anchoring recomputes the verdict there, and the verifier reads it — the app doesn't get to assert it.
  </Card>
</CardGroup>

## Local commands

```bash theme={null}
npm run dev    # run the web app
npm run build  # production build
npm test       # all TS test suites (core, walrus, vercel-ai, web)
cd contracts && sui move test   # Move unit tests (gate, blake2b256 golden, anchor)
```

<Card title="Source on GitHub" icon="github" href="https://github.com/Enoch208/carry">
  Enoch208/carry — the full monorepo.
</Card>
