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

# Overview

> Embed a live Vizkraft dashboard in your product, or share it with stakeholders—securely, with liquid-tag tenant isolation.

Embed and share let you put Vizkraft analytics in front of people who never log in to [app.vizkraft.com](https://app.vizkraft.com).

* **Embed SDK** — your product (Customer X) shows one dashboard to many tenants (C1, C2, C3) with server-side isolation.
* **Share links** — password-optional URLs for stakeholders who just need a link.

Product site: [vizkraft.com](https://vizkraft.com) · App: [app.vizkraft.com](https://app.vizkraft.com) · SDK: [@vizkraft/embed on npm](https://www.npmjs.com/package/@vizkraft/embed)

## Start with these three pages

| Audience                | Page                                      | Why                                                              |
| ----------------------- | ----------------------------------------- | ---------------------------------------------------------------- |
| Security / architecture | [Security](/embed/security)               | How API keys and liquid tags protect tenant data (with diagram)  |
| Product / design        | [Viewer options](/embed/viewer-options)   | What end users see—title, filters, download, themes              |
| Engineering             | [Developer guide](/embed/developer-guide) | Step-by-step backend mint + frontend mount (forward this to eng) |

## How the SDK flow works

```mermaid theme={null}
flowchart LR
  PM[PM_in_Vizkraft] -->|enable_embed_liquid_keys| Config[Embed_config]
  EngBE[Host_backend] -->|mint_with_API_key| Config
  EngFE[Host_frontend] -->|getSessionToken| EngBE
  EngFE -->|mount_SDK| Viewer[Embed_iframe]
  Viewer -->|session_queries| Config
```

1. A product manager enables embed, liquid tags, coverage, and an API key in Vizkraft.
2. Your backend stores the API key and mints a short-lived session with tenant liquid values.
3. Your frontend installs `@vizkraft/embed` and mounts with `getSessionToken` only—never the API key.

## Embed SDK vs share links

|                  | Embed SDK                       | Share links                                 |
| ---------------- | ------------------------------- | ------------------------------------------- |
| Who uses it      | Partner / customer apps         | Humans with a URL                           |
| Auth             | Your backend + liquid tags      | Optional password + optional expiry         |
| Tenant isolation | Mandatory liquid claims at mint | Optional liquid defaults on the link        |
| Install          | `@vizkraft/embed`               | No SDK                                      |
| Best for         | Multi-tenant product analytics  | Board packs, vendor reviews, one-off access |

## Two filter layers (SDK)

| Layer            | Who configures | Who sets values      | Visible to end users? | Purpose                            |
| ---------------- | -------------- | -------------------- | --------------------- | ---------------------------------- |
| Liquid tags      | PM in Vizkraft | Your backend at mint | No                    | Tenant isolation (RLS)             |
| End-user filters | Embed setting  | Viewer in the iframe | Yes                   | Slice and dice inside liquid scope |
| Download         | Embed setting  | Viewer               | Yes (button)          | Export current view                |

Liquid tags never appear in the filter UI. Interactive filters cannot widen past liquid scope. Details: [Security](/embed/security) and [Liquid tags and coverage](/embed/liquid-and-coverage).

## Glossary

| Term              | Meaning                                               |
| ----------------- | ----------------------------------------------------- |
| Embed id          | Public id (`emb_…`)                                   |
| API key           | Long-lived secret for your backend (`vk_embed_…`)     |
| Liquid tag        | Named RLS placeholder (e.g. `customer_id`)            |
| Mint              | Create a short-lived session with bound liquid values |
| Session token     | JWT + server row; revocable before expiry             |
| `getSessionToken` | Frontend callback; the SDK decides when to call it    |

## Next steps

<CardGroup cols={2}>
  <Card title="Security" icon="shield" href="/embed/security">
    API key + liquid tags, threat model, and sequence diagram
  </Card>

  <Card title="Developer guide" icon="code" href="/embed/developer-guide">
    Install, mint, mount, verify—hand this to engineering
  </Card>

  <Card title="Admin setup" icon="sliders" href="/embed/admin-setup">
    Enable embed, origins, keys, and audit in the app
  </Card>

  <Card title="Partner demo" icon="flask" href="/embed/partner-demo">
    Try Acme Analytics before you integrate
  </Card>
</CardGroup>
