---
title: Share live data between two AI-built apps, without API keys
overline: TUTORIAL
nav: Multi-app sync
updated: 2026-12
minutes: 5
next: rollback
---

# Share live data between two AI-built apps, without API keys

Connect two apps to one Kovlet Data Space, and their tables and files stay in sync in real time. You approve each app once with a short code, so neither app needs an API key.

> **What you'll build**
>
> - Two apps, a receipt scanner on your phone and a spending dashboard on your laptop, that read and write the same data.
> - A row added in one app appears in the other within a second.
> - Each app joins with `@kovlet/client`, with no API key, and gets only the access you grant it.
> - If one app writes bad data, you can roll back its edits alone.

A [Data Space](/docs/glossary#data-space "The unit of storage, live sync and permissions in Kovlet: a set of typed tables plus a tree of files, shared by every app with access to it.") is where Kovlet keeps the shared data. It is the single source of truth for the tables and files of both apps.

Diagram: two apps, Receipt Scanner and Spending Dashboard, both connected to one Data Space named Family Budget.

<!-- diagram: multi-app -->

## Before you start

- A Kovlet account. Sign in at `https://kovlet.com` (the Free plan is enough), or [run Kovlet locally](/docs/run-locally).
- An AI coding tool: Claude Code, Cursor, Lovable, v0 or Bolt.
- For Claude Code and Cursor, Node.js 22.12 or newer. The Kovlet MCP server needs it.

## 1. Create the Data Space and the first app

Pick the tool you build with. Add the MCP server if the tab shows one, then paste the prompt.

Claude Code and Cursor first connect to the [Kovlet MCP server](/docs/glossary#kovlet-mcp-server "The Model Context Protocol server that lets coding agents list Data Spaces, read schemas and generate app code."). With it, the agent creates the Data Space and reads its schema itself. The MCP server needs Node.js 22.12 or newer.

The prompts for Lovable, v0 and Bolt declare the table in the app code instead.

<!-- tabs: AI tool -->

### Claude Code

```sh title="terminal"
claude mcp add kovlet -- npx -y @kovlet/mcp
```

```text title="Prompt for Claude Code"
Build a receipt scanner web app that stores its data in Kovlet. Read https://kovlet.com/llms.txt first. Use the Kovlet MCP server to create a Data Space named "Family Budget" with an expenses table (vendor, amount, spentAt, category), then generate the connection with generate_app_connection. Use @kovlet/client and @kovlet/react. Do not ask me for an API key: connect through Kovlet's consent flow with kovlet.connect() from a button, and I'll approve the app.
```

### Cursor

```json title=".cursor/mcp.json"
{
  "mcpServers": {
    "kovlet": { "command": "npx", "args": ["-y", "@kovlet/mcp"] }
  }
}
```

```text title="Prompt for Cursor"
Build a receipt scanner web app that stores its data in Kovlet. Read https://kovlet.com/llms.txt first. Use the Kovlet MCP server to create a Data Space named "Family Budget" with an expenses table (vendor, amount, spentAt, category), then generate the connection with generate_app_connection. Use @kovlet/client and @kovlet/react. Do not ask me for an API key: connect through Kovlet's consent flow with kovlet.connect() from a button, and I'll approve the app.
```

### Lovable

```text title="Prompt for Lovable"
Build a receipt scanner app that stores its data in Kovlet. Read https://kovlet.com/llms.txt first. Add @kovlet/client and @kovlet/react. Declare an expenses table (vendor: string, amount: number, spentAt: datetime, category: optional string) in a Data Space slot named "budget". Connect with autoConnect: false and a "Connect to Kovlet" button that calls kovlet.connect(); on load, call kovlet.connect() once kovlet.ready resolves if kovlet.session is set, so a returning user resumes without a click. Do not use any API key.
```

### v0

```text title="Prompt for v0"
Build a receipt scanner app that stores its data in Kovlet. Read https://kovlet.com/llms.txt first. Add @kovlet/client and @kovlet/react. Declare an expenses table (vendor: string, amount: number, spentAt: datetime, category: optional string) in a Data Space slot named "budget". Connect with autoConnect: false and a "Connect to Kovlet" button that calls kovlet.connect(); on load, call kovlet.connect() once kovlet.ready resolves if kovlet.session is set, so a returning user resumes without a click. Do not use any API key.
```

### Bolt

```text title="Prompt for Bolt"
Build a receipt scanner app that stores its data in Kovlet. Read https://kovlet.com/llms.txt first. Add @kovlet/client and @kovlet/react. Declare an expenses table (vendor: string, amount: number, spentAt: datetime, category: optional string) in a Data Space slot named "budget". Connect with autoConnect: false and a "Connect to Kovlet" button that calls kovlet.connect(); on load, call kovlet.connect() once kovlet.ready resolves if kovlet.session is set, so a returning user resumes without a click. Do not use any API key.
```

<!-- /tabs -->

## 2. Connect the second app

Start a new project in any tool and paste the prompt for it. Replace `{space name}` with your Data Space's name.

> **Tip:** Signed in to the console, open the Data Space and click **Build another app**. It fills in the name, tables and columns for you.

<!-- tabs: AI tool -->

### Claude Code

```text title="Prompt for Claude Code"
Add the existing Kovlet Data Space {space name} to a new spending dashboard app. Read https://kovlet.com/llms.txt first. Use the Kovlet MCP server: call inspect_space_schema for {space name} and reuse its exact table and column names, then generate_app_connection. Do not create new tables unless I ask. Do not ask me for an API key.
```

### Cursor

```text title="Prompt for Cursor"
Add the existing Kovlet Data Space {space name} to a new spending dashboard app. Read https://kovlet.com/llms.txt first. Use the Kovlet MCP server: call inspect_space_schema for {space name} and reuse its exact table and column names, then generate_app_connection. Do not create new tables unless I ask. Do not ask me for an API key.
```

### Lovable

```text title="Prompt for Lovable"
Add the existing Kovlet Data Space {space name} to a new spending dashboard app. Read https://kovlet.com/llms.txt first. Add @kovlet/client and @kovlet/react and declare exactly these tables and columns: {tables and columns}. Connect with autoConnect: false and a "Connect to Kovlet" button; on load, call kovlet.connect() once kovlet.ready resolves if kovlet.session is set. Do not use any API key.
```

### v0

```text title="Prompt for v0"
Add the existing Kovlet Data Space {space name} to a new spending dashboard app. Read https://kovlet.com/llms.txt first. Add @kovlet/client and @kovlet/react and declare exactly these tables and columns: {tables and columns}. Connect with autoConnect: false and a "Connect to Kovlet" button; on load, call kovlet.connect() once kovlet.ready resolves if kovlet.session is set. Do not use any API key.
```

### Bolt

```text title="Prompt for Bolt"
Add the existing Kovlet Data Space {space name} to a new spending dashboard app. Read https://kovlet.com/llms.txt first. Add @kovlet/client and @kovlet/react and declare exactly these tables and columns: {tables and columns}. Connect with autoConnect: false and a "Connect to Kovlet" button; on load, call kovlet.connect() once kovlet.ready resolves if kovlet.session is set. Do not use any API key.
```

<!-- /tabs -->

## 3. Approve and watch it sync

When the new app first connects, it shows a short code. Approve it and pick the Data Space. Both apps are now live.

> **You should see**
>
> - In the console, the Data Space "Family Budget" with an `expenses` table, and both apps listed under **Access**.
> - An expense you add in the receipt scanner appears in the spending dashboard within a second, without a reload. It works the other way round too.

> **Note:** You approve each new app once, at kovlet.com/activate. A pending app can't read or write until you do.

## 4. Share files too (optional)

Files live in the same Data Space as the tables. To link a row to a file, store the file's id in a `t.fileRef()` column. Every app can then find the file, even after it moves.

```ts title="receipts.ts" hl="8,10,18-19"
import { createKovletClient, t } from "@kovlet/client";

const kovlet = createKovletClient({
  appName: "Receipt Scanner",
  spaces: {
    budget: {
      tables: {
        expenses: { vendor: t.string(), amount: t.number(), receipt: t.fileRef().optional() },
      },
      files: true,
    },
  },
});

const budget = kovlet.space("budget");

export async function saveReceipt(photo: Blob, vendor: string, amount: number) {
  const entry = await budget.files.upload(`receipts/${Date.now()}.jpg`, photo, { mimeType: "image/jpeg" });
  budget.table("expenses").insert({ vendor, amount, receipt: entry.id });
}

// In the other app: a short-lived URL for <img src>, by file id.
export const receiptUrl = (fileId: string) => budget.files.url(fileId);
```

- **Line 8:** `receipt` is a file column. It holds a file's id.
- **Line 10:** `files: true` lets the app use the Data Space's files.
- **Lines 18–19:** upload the photo, then store its id on the new row.

The other app shows the receipt with `budget.files.url(fileId)`. It returns a short-lived URL for `<img src>`. [Upload and sync files](/docs/files) covers the rest.

## Undo a bad edit from one app

Every change records which app made it. If one app writes bad data, an owner rolls back that app's changes in the console's [Safety view](/safety). The other apps' edits stay. See [Roll back an app's changes](/docs/rollback).

## Next

- [Roll back an app's changes](/docs/rollback): undo one app's edits and keep the others.
- [Connect a coding agent to Kovlet (MCP)](/docs/connect-coding-agent): every MCP client, by hand or over HTTP.
- [Access model: Users × Machines × Applications](/docs/access-model): why each app only gets the access you granted it.
