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

# Quick Start

> Clone the repo, start Compose, and run the first Record → verify-live loop as Junnu.

Shortest path: **Docker Compose** (Python demo + Postgres + Redis + control plane).

## 1. Clone and start

```bash theme={null}
git clone https://github.com/valid22/alibi-ai.git
cd alibi-ai
docker compose up --build
```

| Service | URL |
| - | - |
| Control plane UI + API | [http://127.0.0.1:4100](http://127.0.0.1:4100) |
| Demo coffee (FastAPI) | [http://127.0.0.1:4200](http://127.0.0.1:4200) |
| Demo coffee (Express, optional) | `docker compose --profile node up` → :4201 |
| Postgres | `postgres://alibi:alibi@127.0.0.1:5432/alibi_sandbox` (schema `alibi_sandbox`) |
| Redis | `redis://127.0.0.1:6379/1` (prefix `alibi:`) |

You do **not** need a host `pnpm build` before Compose — the control-plane image builds and runs from `/app`.

## 2. Smoke: record → verify-live

```bash theme={null}
./scripts/smoke_record_verify.sh
```

What the script does, in order (as **Junnu**):

1. Seeds menu data and captures a **baseline** (SQL + Redis snapshot).
2. Starts Junnu’s **Record** session (`recorder: Junnu`, warm-pool checkout, `x-alibi-api-key: junnu-key-demo`).
3. Drives `/menu` → `/orders` → `/orders/:id/pay` with `x-alibi-sandbox: 1` and the session/sandbox headers.
4. **Saves a case** from Junnu’s session (now project-shared).
5. Runs **verify-live** (control plane replays with `x-alibi-mode: verify`; SDK restores baseline, diffs, reports the run — Laddu could run this next).

Open [http://127.0.0.1:4100](http://127.0.0.1:4100) to inspect Junnu’s case, step timeline, and run diffs. In the UI, pick **As Junnu** (default), open a case, and click **Run verify-live**; or use **Record** → Start → Stop → **Save as case**.

Prove concurrent isolation (Junnu + Laddu each get a distinct `sandboxId`):

```bash theme={null}
./scripts/smoke_junnu_laddu_sandboxes.sh
```

Isolation 5–6 smoke:

```bash theme={null}
./scripts/smoke_isolation_56.sh
```

## 3. Manual curl (Junnu records one step)

```bash theme={null}
# Junnu starts a private Record session
SESSION=$(curl -s -X POST http://127.0.0.1:4100/api/projects/demo-coffee/sessions \
  -H 'content-type: application/json' -H 'x-alibi-api-key: junnu-key-demo' \
  -d '{"recorder":"junnu","isolationMode":"warm_pool"}')
SID=$(echo "$SESSION" | python3 -c "import json,sys; print(json.load(sys.stdin)['id'])")
SBX=$(echo "$SESSION" | python3 -c "import json,sys; print(json.load(sys.stdin).get('sandboxId') or '')")

# Drive the demo under Junnu’s sandbox
curl -si -H 'x-alibi-sandbox: 1' -H "x-alibi-session-id: $SID" \
  ${SBX:+-H "x-alibi-sandbox-id: $SBX"} \
  http://127.0.0.1:4200/menu

# Junnu can read his live session; Laddu with laddu-key-demo cannot while status=recording
curl -s -H 'x-alibi-api-key: junnu-key-demo' "http://127.0.0.1:4100/api/sessions/$SID"
```

Optional: start Laddu’s parallel session with `x-alibi-api-key: laddu-key-demo` and `{"recorder":"laddu"}` — expect a different `sandboxId`.

## Local without Docker

```bash theme={null}
pnpm install && pnpm build
pip install -e "python/alibi_sdk[dev]"
# Postgres + Redis matching .env.example; apply docker/postgres/init.sql

pnpm --filter @alibi/control-plane dev   # :4100

DATABASE_URL=postgres://alibi:alibi@127.0.0.1:5432/alibi_sandbox \
REDIS_URL=redis://127.0.0.1:6379/1 \
ALIBI_CONTROL_PLANE_URL=http://127.0.0.1:4100 \
ALIBI_MODE=record \
uvicorn app.main:app --app-dir apps/demo-coffee-py --port 4200
```

Then run `./scripts/smoke_record_verify.sh`.

## Next

* [Coffee demo](https://alibi.itsdote.tech/examples/coffee-demo.md) — why mocks alone fail on this journey
* [Python SDK](https://alibi.itsdote.tech/examples/sdk-python.md) — FastAPI integration
* [API overview](https://alibi.itsdote.tech/api/overview.md) — control plane HTTP surface


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.