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

# API Routes As Source Of Truth

> Why the web app owns backend route contracts and how other surfaces should consume them.

The web app owns backend route contracts for every surface. Desktop, mobile, Chrome, and future surfaces should call the same `/api/v1/*` endpoints through `@overlay/api-client` rather than copying route-specific fetch logic.

## Rules

* Add or update endpoint contracts in `@overlay/app-core`.
* Add transport wrappers in `@overlay/api-client`.
* Keep route behavior backward compatible unless a real bug is found.
* Prefer parsed typed methods when callers only need data.
* Add `*Response` methods when callers need status codes, streaming bodies, redirects, or custom error handling.

## Bootstrap

`/api/v1/bootstrap` returns the canonical serializable frontend registry:

* brand config
* navigation
* settings sections and panels
* feature flags
* feature modules
* tool and integration registry metadata
* model provider metadata
* policy gates
* theme metadata
* models, user, entitlements, defaults, and UI settings

Surfaces should use bootstrap first, then render their native shell from those registries.

## Cross-Surface Adoption

Desktop and Chrome can use the React DOM packages directly where practical. Mobile should use `@overlay/app-core`, `@overlay/api-client`, and pure controllers from `@overlay/app-core/modules`, while keeping React Native rendering in mobile-specific components.
