# Overview — BrandApp Playground

> What the playground is, the three credential modes the SDK supports, and a map of every live demo.

- Canonical page: https://brandapp-playground.vercel.app/
- Markdown: https://brandapp-playground.vercel.app/index.md
- SDK module: `@reopt-ai/brandapp-sdk`

## What this is

An interactive playground and reference implementation for `@reopt-ai/brandapp-sdk`,
the TypeScript SDK for building applications on a Reopt BrandApp. Every page pairs a
running demo with the exact source you would ship.

## The three credential modes

| Mode | Credential | Used by |
| --- | --- | --- |
| Basic Auth | `clientId:clientSecret` (app-scoped) | `sdk.eav`, `sdk.ai`, `sdk.cms`, `sdk.files`, `sdk.plans.list`, `sdk.terms.list` |
| Bearer | end-user OAuth access token | `sdk.auth.*`, `sdk.plans.getMyPlan`, `sdk.terms.listMyConsents` |
| Dev mode | none — `REOPT_DEV_MODE=true` | the in-memory server on port 4300 |

All three share a single SDK instance and can be mixed inside one request.

## Install

```bash
npm install @reopt-ai/brandapp-sdk
```

```ts
import { createReoptSDK } from "@reopt-ai/brandapp-sdk";

export const sdk = createReoptSDK({
  clientId: process.env.BRANDAPP_CLIENT_ID!,
  clientSecret: process.env.BRANDAPP_CLIENT_SECRET!,
  brandappId: process.env.BRANDAPP_ID!,
});
```

## SDK module map

The SDK ships sub-path exports so bundlers can tree-shake what you do not use.

| Sub-path | Purpose |
| --- | --- |
| `@reopt-ai/brandapp-sdk` | `createReoptSDK`, error classes, runtime types |
| `/auth` | user-scoped Bearer calls (`getUserInfo`, link, withdraw) |
| `/eav` | entities, records, the `where()` filter DSL |
| `/eav/schema` | `defineSchema()` / `defineEntity()` |
| `/eav/migrate` | data-aware schema migrations |
| `/ai`, `/ai-provider` | AI client and the Vercel AI SDK provider |
| `/cms` | posts, post groups, tags, SEO helpers |
| `/files` | folders, uploads, content preview, storage usage |
| `/better-auth` | Better Auth database adapter and OAuth plugin |
| `/webhooks` | signed webhook handler and verifier |
| `/logout` | OIDC single logout — back-channel receiver, end-session URL |
| `/react/hooks` | TanStack Query hooks |
| `/dev`, `/testing` | in-memory dev server and test fixtures |

## Related

- [Quick Start](https://brandapp-playground.vercel.app/getting-started.md)
- [Connection](https://brandapp-playground.vercel.app/connection.md)
- [Health Check](https://brandapp-playground.vercel.app/health.md)

---

Index of every document: https://brandapp-playground.vercel.app/llms.txt
Single-file copy: https://brandapp-playground.vercel.app/llms-full.txt
HTTP API description: https://brandapp-playground.vercel.app/openapi.json
