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

# ThemeDocument Contract

> Understand pages, blocks, settings, render context, and browser commerce ownership.

# ThemeDocument Contract

| Layer                     | Owns                                                               |
| ------------------------- | ------------------------------------------------------------------ |
| ThemeDocument             | Pages, ordered blocks, design tokens, content settings, custom CSS |
| Shoppex backend           | Validation, drafts, revisions, catalog and route context           |
| Block renderer            | HTML, structured data, renderer-owned styles                       |
| Platform commerce runtime | Cart, product actions, coupons, checkout handoff                   |

Blocks have stable IDs, a registered type, visibility, and typed settings.
Unknown block types and invalid settings fail validation instead of selecting a
different implementation.

The backend supplies request data such as products, collections, locale, and
currency. Theme settings should never calculate final prices, stock, payment
eligibility, or checkout rules.
