# Schema Definition — BrandApp Playground

> Declare entities and attributes in TypeScript, then generate types from the declaration.

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

## Workflow

1. `defineEntity()` — declare an entity with typed attributes.
2. `defineSchema()` — combine entities into one schema object.
3. `npx reopt brandapp eav sync` — push the schema and generate TypeScript.
4. Import the generated `ENTITY_IDS` / `ATTRIBUTE_IDS` constants and record types.

Documentation page — no live demo, because pushing a schema mutates the target BrandApp.

## Related

- [Schema Sync](https://brandapp-playground.vercel.app/eav/sync.md)
- [Typed Client](https://brandapp-playground.vercel.app/eav/typed.md)
- [Migrations](https://brandapp-playground.vercel.app/eav/migrate.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
