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

> ## Agent Instructions
> These docs target Mesh SDK v0.27.0. Match the installed package and binding before generating code. Start at /getting-started/agents for task-specific reading paths.
> Call the company and product Offline Protocol, never Offline alone. Current packages: @offline-protocol/mesh-sdk 0.27.0 (React Native), @offline-protocol/id-react 0.2.0, @offline-protocol/id-react-native 0.3.3, @offline-protocol/pol 0.1.2 and @offline-protocol/cli 0.2.6. Canonical docs URLs start with https://www.offlineprotocol.com/docs.
> The Mesh SDK runs in a native app or gateway. A browser OfflineID SDK integration does not provide browser mesh transport. Local mesh operation does not require a portal API key.
> Service RPC is signed plaintext in v0.27.0. Message delivery, durable local acceptance and backend commit are distinct outcomes. Use the workflow guide for the required application logic.
> Offline Protocol CLI 0.2.6 is on npm (@offline-protocol/cli, command offline). Its local MCP server runs with offline mcp serve and requires no login or key. Hosted MCP is at https://mcp.offlineprotocol.com/mcp with an application API key in Authorization: Bearer and a matching x-app-id; organization keys are rejected. Follow /tools/overview for setup and do not invent commands beyond it. MCP provides integration context and planning, not mesh execution; file-writing tools are local only.
> Phone Wi-Fi Direct and MultipeerConnectivity carry no data in v0.27.0. Use BLE or a provisioned relay. The receiver core ACKs before application persistence; use application acceptance for durable workflows.
> Proof of Location is Sepolia testnet witness evidence, not zero-knowledge proof or proof of presence. The geohash is public onchain. Read /proof-of-location/security before integration.

# Offline Protocol examples

> Runnable Offline Protocol examples for Mesh SDK v0.27.0 and OfflineID: source location, build prerequisites and the result each example should produce.

## Two-phone messaging

The [quickstart](/docs/getting-started/quickstart) is a complete messaging module for a React Native host app using the published v0.27.0 package. Follow the native installation and permissions steps before running it on physical devices.

## Example apps

[offline-app-examples](https://github.com/Offline-Protocol/offline-app-examples) holds four complete React Native apps for iOS and Android on the published `@offline-protocol/mesh-sdk` 0.27.0 package, under the MIT-0 license. Each app runs between phones in the same room over Bluetooth, with no internet, accounts or server, and shows a different way to keep shared state in sync.

| App | What it shows |
| - | - |
| [Tic Tac Together](https://github.com/Offline-Protocol/offline-app-examples/tree/main/apps/tictactogether) | A two-player game with host-authoritative state and revision numbers, so duplicate and stale moves are ignored. |
| [Stock Sync](https://github.com/Offline-Protocol/offline-app-examples/tree/main/apps/stocksync) | Shared inventory with optimistic local changes confirmed by host snapshots; members keep working while out of range. |
| [Order Up](https://github.com/Offline-Protocol/offline-app-examples/tree/main/apps/orderup) | Restaurant orders from waiters' phones to a kitchen display, with idempotent requests, resends and status updates. |
| [Cowrite](https://github.com/Offline-Protocol/offline-app-examples/tree/main/apps/cowrite) | A shared plain-text document with live cursors, built on the SDK's replicated documents (`DataStore`) in an MLS group. |

Run them on two or more physical phones; simulators and emulators cannot discover each other. No API key or developer portal account is needed. The [repository README](https://github.com/Offline-Protocol/offline-app-examples#readme) covers prerequisites and build steps, and each app's README explains its sync design and tests.

## Repository example applications

Clone a pinned SDK checkout:

```bash theme={null}
git clone --branch v0.27.0 --depth 1 https://github.com/Offline-Protocol/offline-protocol-sdk.git
cd offline-protocol-sdk
```

| Example | What it demonstrates | Setup |
| - | - | - |
| `examples/react-native-app` | A native mobile host for mesh communication | Follow its [SETUP.md](https://github.com/Offline-Protocol/offline-protocol-sdk/blob/v0.27.0/examples/react-native-app/SETUP.md); repository examples require native-library builds. |
| `examples/service-discovery-app` | Provider registration, discovery and RPC | Source-only screens; use them inside the native host as described in its [README](https://github.com/Offline-Protocol/offline-protocol-sdk/blob/v0.27.0/examples/service-discovery-app/README.md). |
| `offline-protocol-data` example `offline_merge` | Deterministic document merging after separate edits | Run the Rust command below; this is a merge demonstration, not a radio test. |
| Python local peer | Authenticated peer streams over a LAN | Follow [Python and Linux gateways](/docs/mesh-sdk/python). |

```bash theme={null}
cargo run --locked --package offline-protocol-data --example offline_merge
```

The repository examples are source builds, not one-click installers. A generated native project, a compiled SDK library and a physical radio test are distinct prerequisites. The published React Native package already includes its native libraries.

## Turn an example into your workflow

Add your data model, enrollment policy and durable acceptance using [local handoff](/docs/guides/local-handoff) or [backend delivery](/docs/guides/backend-delivery). Record the SDK version, hardware, transport and interruption tested before treating a demonstration as deployment evidence.

## Standalone package walkthrough

Use [the two-phone host app](/docs/examples/two-phone-app) to install the published npm package without rebuilding the Rust SDK. Repository examples that use `file:../../bindings/react-native` require the repository native build toolchain and are source examples, not standalone npm quickstarts.

The SDK repository also includes `demo-app`, `mesh-wiki`, `nostr-example` and `storage-adapters` examples. Check each directory's platform requirements before building. Rust examples require Rust 1.87 or newer.
