# Embeddable Docs

Embeddable is a **developer toolkit** for building fast, scalable customer-facing analytics experiences into your application.

Use it to build **[embedded dashboards](https://docs.embeddable.com/dashboards/introduction)**, **[self-serve analytics](https://docs.embeddable.com/self-serve/introduction)**, and **[AI-powered insights](https://docs.embeddable.com/self-serve/ai-chatbot)** on top of the same governed, code-based foundation. 

Engineers define components, data models, themes, and access policies in code. Your team can then assemble and publish native-feeling analytics experiences using the no-code builder or your existing development workflow.

## Getting started with Embeddable

New here? Follow the **Set up** path top to bottom. Already building? Jump to a common task or reference below.

Most of what you'll build along the way — [data models](https://docs.embeddable.com/data-modeling/build-with-ai), [components](https://docs.embeddable.com/component-libraries/build-with-ai), [dashboards](https://docs.embeddable.com/dashboards/build-with-ai), and [themes](https://docs.embeddable.com/component-libraries/remarkable-pro/theme-with-ai) — can also be generated by **prompting an AI agent**: Embeddable ships Claude skills for each, so setup is often a conversation rather than a coding project.

### Set up

- [Quickstart](https://docs.embeddable.com/getting-started/get-set-up/quick-start-guide) - clone the starter repo and connect it to Embeddable
- [Explore your workspace](https://docs.embeddable.com/getting-started/get-set-up/your-workspace) - find your way around the platform
- [Connect your data](https://docs.embeddable.com/data/connect-your-database) - point Embeddable at your database
- [Data modeling 101](https://docs.embeddable.com/data-modeling/introduction) - define your metrics, dimensions, and joins
- [Build your first dashboard](https://docs.embeddable.com/getting-started/get-set-up/first-embeddable) - assemble your first dashboard

### Common tasks

- [Embed a dashboard](https://docs.embeddable.com/deployment/embedding) - drop the web component into your app
- [Row-level security](https://docs.embeddable.com/data-modeling/row-level-security/introduction) - restrict rows per user
- [Configure self-serve dashboards](https://docs.embeddable.com/self-serve/custom-canvas/introduction) - let users explore and customise dashboards safely
- [Add an AI chatbot](https://docs.embeddable.com/self-serve/ai-chatbot) - let users ask questions of their data in natural language
- [Theme your dashboards](https://docs.embeddable.com/component-libraries/remarkable-pro/theming) - match your brand, by hand or [with AI](https://docs.embeddable.com/component-libraries/remarkable-pro/theme-with-ai)
- [Set up an environment](https://docs.embeddable.com/data/environments) - e.g. staging
- [Dashboards as code](https://docs.embeddable.com/dashboards/dashboards-as-code) - define dashboards in your repo
- [Build a custom component](https://docs.embeddable.com/component-libraries/build-components/defining-components) - write your own React components

### Reference

- [Tokens API](https://docs.embeddable.com/deployment/tokens-api) - mint scoped embed tokens with a lifetime you set
- [Embeddables API](https://docs.embeddable.com/deployment/embeddables-api) - manage embeddables programmatically
- [Versions API](https://docs.embeddable.com/deployment/versions-api) - manage deployments e.g. publish or roll back versions
- [Schemas API](https://docs.embeddable.com/data-modeling/schemas-api) - read your data model schema

## How Embeddable works

Embeddable has four main parts.

### 1. Code-first foundation

Define **reusable components** (optionally starting with Embeddable's production-grade [component suite](https://docs.embeddable.com/component-libraries/remarkable-pro/introduction)), **themes**, and **[data models](https://docs.embeddable.com/data-modeling/introduction)** in your own repository. These are version-controlled, reviewable, and extendable by your developers or agents.

### 2. Governed semantic layer

Your data models are a **semantic layer** that **centralises metrics, joins, dimensions, and [access policies](https://docs.embeddable.com/data-modeling/row-level-security/introduction)** — so every dashboard and AI experience is built on the same trusted definitions as you scale. 

### 3. Dashboards and AI experiences

Assemble **interactive dashboards and AI experiences** from your models and components using Embeddable’s [no-code builder](https://docs.embeddable.com/dashboards/introduction) or [in code](https://docs.embeddable.com/dashboards/dashboards-as-code) in your repo. Your team can publish directly, or route changes through your existing engineering release process.

### 4. Native embedding

Embed dashboards using Embeddable's **[HTML web component](https://docs.embeddable.com/deployment/embedding) and a server-side token**. The token tells Embeddable what to load, who the user is, and which access policies to apply.

## Architecture

At a high level, Embeddable separates what you define and publish at build time from what each end user is allowed to see at run time.

### Build time

Your components, data models, and (optionally) dashboards live in your repo. Running [`npm run embeddable:push`](https://docs.embeddable.com/getting-started/development/pushing-code) makes them available in your workspace, where you can manage everything in code, or build dashboards with the no-code builder. Either way, you [publish a version](https://docs.embeddable.com/dashboards/publishing), and that's what gets embedded.

![Build-time flow: from your repo, pushed to the platform, to a published version](https://docs.embeddable.com/img/embeddable-build-flow.svg)

### Run time

When an end-user loads a page, the **web component loads its published dashboard**, then fetches data through a pipeline that applies [row-level security](https://docs.embeddable.com/data-modeling/row-level-security/introduction) and [caches results](https://docs.embeddable.com/data-modeling/caching/in-memory) before reaching your database. Embeddable **does not** replicate your database - it queries it directly and can cache query results to improve performance.

You can set up **[multiple environments](https://docs.embeddable.com/data/environments)** e.g. production, staging, or a per-tenant database connection. Your server-side token request (explained below) specifies which environment to use, so a single deployment can serve different customers from isolated databases, or point at staging data without touching production.

![Run-time flow: the web component down through the cache and security pipeline to your database](https://docs.embeddable.com/img/embeddable-run-flow.svg)

### Securing the embed

The component never holds your credentials. When a user opens a dashboard, your server calls the [Tokens API](https://docs.embeddable.com/deployment/tokens-api) server-side, so your API key stays secret, and receives a scoped token with a lifetime you set.

The token tells Embeddable which dashboard and version to load, who the user is, which environment to query, and which filters, roles, and row-level security context to apply.

You embed the component as `<em-beddable token="…" />`. It sends the token with every request, so the runtime returns only the rows that token permits.

![Authorization handshake: your server to the token API to the web component to the runtime](https://docs.embeddable.com/img/embeddable-token-handshake.svg)

---
Source: https://docs.embeddable.com
