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

# Bily developer documentation

> Connect website data to Bily and build trusted browser, server, and AI workflows.

Bily is the programmable customer data and activation layer for websites. Connect once to collect and normalize events, route trusted data, and run governed work across browser, server, and AI surfaces.

**Bily Apps — install capabilities, not scripts.** Bily Apps is the installable capability layer of Bily. Discover a capability, review its permissions, configure it for a site, then install, observe, update, or revoke it without rebuilding the website connection.

<CardGroup cols={2}>
  <Card title="What is Bily?" icon="sparkles" href="/concepts/what-is-bily">
    Understand the customer data and activation layer behind every Bily developer surface.
  </Card>

  <Card title="Explore Bily Apps" icon="puzzle-piece" href="/concepts/bily-apps">
    Install capabilities, not scripts, through the website connection you already govern.
  </Card>

  <Card title="Install in minutes" icon="bolt" href="/quickstart">
    Choose the one installation path that matches your website.
  </Card>

  <Card title="Track page views" icon="window" href="/guides/pageviews">
    Capture the initial page automatically and later SPA routes explicitly.
  </Card>

  <Card title="Track product activity" icon="cart-shopping" href="/guides/ecommerce">
    Send products, carts, checkouts, and completed orders with typed payloads.
  </Card>

  <Card title="Use the SDK reference" icon="brackets-curly" href="/api-reference/overview">
    Review every exported method, event type, and payload type.
  </Card>

  <Card title="Build with the Bily API" icon="terminal" href="/rest-api/overview">
    Discover the user, organization, and store in one request, then build trusted server workflows.
  </Card>

  <Card title="Connect an AI client" icon="robot" href="/mcp/overview">
    Discover supported Bily operations and run scoped analytics or actions through MCP.
  </Card>
</CardGroup>

## One layer, three developer surfaces

The SDK is the browser contract. It installs Bily and sends page, commerce, and custom events.

The API is the server contract. It authenticates your backend, applies organization and store boundaries, and exposes Bily data and supported actions.

MCP is the AI-client contract. It discovers the current Bily operation catalog and runs scoped work through two stable tools.

All three surfaces connect to the same Bily data and activation layer. Bily Apps can evolve without asking every website team to replace its integration.

## Plan, validate, and launch

<CardGroup cols={2}>
  <Card title="Plan the implementation" icon="clipboard-list" href="/guides/implementation-planning">
    Define outcomes, event ownership, identity boundaries, and release gates before writing code.
  </Card>

  <Card title="Model events and data" icon="diagram-project" href="/guides/event-data-model">
    Keep names, payloads, products, orders, and custom fields stable.
  </Card>

  <Card title="Validate each boundary" icon="list-check" href="/guides/validation-debugging">
    Prove loading, event behavior, API scope, and MCP execution separately.
  </Card>

  <Card title="Read the customer FAQ" icon="circle-question" href="/troubleshooting/faqs">
    Get direct answers about implementation, identity, attribution, privacy, API, and MCP behavior.
  </Card>
</CardGroup>

## Choose one installation path

<CardGroup cols={2}>
  <Card title="HTML" icon="code" href="/sdk/html">
    Add the exact Bily script tag to a site that does not use an application bundler.
  </Card>

  <Card title="JavaScript" icon="js" href="/sdk/javascript">
    Initialize Bily from a browser application built with npm.
  </Card>

  <Card title="React" icon="react" href="/sdk/react">
    Mount one SDK integration inside your router.
  </Card>

  <Card title="Next.js" icon="n" href="/sdk/nextjs">
    Initialize from one App Router client component.
  </Card>
</CardGroup>

<Warning>
  Do not combine the raw script tag and `@bilyai/js` on the same website surface. Both installation paths load Bily, so combining them can duplicate the initial page view.
</Warning>

## What the SDK handles

* It preserves the exact script URL and every query parameter you copy from Bily.
* It safely queues calls while Bily loads.
* It generates an event ID and timestamp when you do not provide them.
* It gives known Bily events autocomplete while accepting your own event names.
* It remains safe to import during server rendering.

<Card title="Start with the quickstart" icon="arrow-right" href="/quickstart">
  Install Bily and verify your first event.
</Card>
