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

# Apps and local runtime

> Run the NodalMerge demo host, infinite room workspace demo, and replay lab playground from this repository.

## What this page covers

This repo now includes interactive app surfaces alongside docs:

* `apps/hosts/nodalmerge-demo-host`
* `apps/demos/infinite-room-workspace`
* `apps/demos/collab-maps`
* `apps/playground/replay-lab`
* `apps/playground/protocol-inspector`
* `apps/playground/collab-text`

Use this page as the canonical local run and smoke-validation entrypoint.

## Start the local host

From `apps/hosts/nodalmerge-demo-host`:

```powershell theme={null}
dotnet run --project .\NodalMerge.DemoHost.csproj -p:NodalMergePackageVersion=0.1.0-local
```

Verify:

* `http://127.0.0.1:5074/api/host/health`
* `http://127.0.0.1:5074/api/host/providers`

## Start the app surfaces

From repo root:

```powershell theme={null}
npm run dev:apps
```

Apps:

* `http://127.0.0.1:4173` (`infinite-room-workspace`)
* `http://127.0.0.1:4174` (`replay-lab`)
* `http://127.0.0.1:4175` (`collab-maps`)
* `http://127.0.0.1:4176` (`protocol-inspector`)
* `http://127.0.0.1:4177` (`collab-text`)

## Infinite room workspace

### What to validate

1. Connect to a room in `direct websocket` mode.
2. Switch to `npm sdk + wasm`.
3. Connect again and confirm diagnostics show an open sdk session.
4. Add workspace nodes and confirm they mirror across peers.

### Why this matters

This demo focuses on spatial workspace state (nodes, branches, replay lanes) — not collaborative text.

## Collab text

### What to validate

1. Connect (default room `collab-text`; use a new id if an old room is polluted).
2. Type in the editor; confirm peers converge on `notes/demo/body`.
3. Open **DAG replay timeline** and scrub lamport cursor while editing.
4. Confirm local peer-colored preview updates for inserted letters (not spaces).

### Why this matters

This playground showcases RGA text ops, contiguous edit batching, and history DAG reads — the right surface for fast typing and tombstone-aware text runtime behavior.

## Replay lab

### What to validate

1. Connect to a room.
2. Capture one or more replay snapshots.
3. Select a snapshot and inspect event payload summary lines.
4. Adjust replay range start/size controls to inspect event windows.

### Why this matters

This provides a lightweight replay-oriented inspection surface aligned with protocol and diagnostics docs.

## Protocol inspector

### What to validate

1. Connect to a room.
2. Observe incoming runtime message stream.
3. Apply command-family presets (`Presence`, `Peer lifecycle`, `Welcome/session`, `Replay/query`).
4. Select a message and inspect raw payload.
5. Export a filtered trace snippet.

### Why this matters

This is the first dedicated Phase C playground for learning websocket/runtime behavior through direct observation.

## Collab maps

### What to validate

1. Connect to a room.
2. Click on map board to add shared pins.
3. Confirm pin list and board markers update.
4. Confirm diagnostics panel remains healthy while map interactions occur.

### Why this matters

This is the second flagship demo path for Phase B and validates spatial shared-state interactions beyond document workflows.

## Browser smoke checklist

Use the detailed runbook in `plans/slice-8-browser-smoke-and-runbook.md` for package-mode smoke validation and troubleshooting.

## Related docs

* `quickstart`
* `sdk/javascript`
* `protocol/websocket-messages`
* `api-reference/websocket-commands`
* `operators/troubleshooting`
