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

# Data

> Use Rey's built-in database to store and manage structured app data in tables — no external service, setup, or backend code required.

Every Rey project includes a built-in database that lets you store, organize, and retrieve structured data directly inside your app. Think of it as a lightweight spreadsheet that lives alongside your UI — you can read from it, write to it, and display its contents on the canvas without ever leaving Rey or connecting to an outside service.

## Open the Data panel

Click the **database icon** in the top toolbar to open the **Data** panel. From here you can see every table in your app, add new ones, and edit entries.

![Data panel showing sample tables](https://mintcdn.com/rey-62fd4809/CynDnVly-UPIE_RC/images/data/panel.png?fit=max\&auto=format\&n=CynDnVly-UPIE_RC\&q=85\&s=703676b237e779ca8f06619bf3367069)

New projects come with two sample tables — **Actors (Sample)** and **Movies (Sample)** — that you can inspect, edit, or delete.

## Edit mode vs. live app

You work with data inside **edit mode**, which is sandboxed from your published app:

* Table setup (new tables, fields, permissions) is **promoted** to the live app the next time you publish.
* Entries and changes you make in edit mode are sandboxed — they do **not** affect the data in your live app.

See [Edit mode & Live mode](https://docs.reyapp.io/publishing/edit-and-live-mode.md) for the full breakdown.

## Tables, entries, and fields

Data in Rey is organized into **tables**. Each table has:

* **Entries** — individual records (rows).
* **Fields** — the typed columns that describe each entry.
* **Permissions** — who can read and write entries at runtime.

To create your first table, see [Tables](https://docs.reyapp.io/data/tables.md).

## Add entries manually

You can populate your table directly in the Data panel without writing any code.

**1. Select your table**

In the Data panel, click the table you want to edit. The table grid opens on the right.

**2. Add an entry**

Click **+ New entry**. A new empty row appears.

**3. Fill in field values**

Click any cell and type a value. Press **Tab** to move to the next field, or **Enter** to move down to the next entry.

**4. Save your changes**

Rey saves entries automatically as you type.

> [!TIP]
>
> Add a handful of realistic sample entries before building your UI. Seeing real content in your list components makes it much easier to design and test layouts.

## Bind a table to a List component

Once your table has data, you can display its entries on the canvas by binding the table to a **List** component.

**1. Add a List component**

Click the **+ button** in the bottom-right of the canvas, open the **Layout** category, and choose **List**.

**2. Connect the List to a data table**

Click the List to select it, open the property toolbar above it, and choose **Data**. Select your table — Rey immediately populates the list with one item per entry.

**3. Select an element inside the List**

Tap any element inside the List — for example, a Text label in the item template — and open its property toolbar.

**4. Pick the data field**

Choose **Data field** in the property toolbar, then pick the field to display (e.g., `Users > display_name`). The element now renders real data from that field and updates automatically when entries change.

## Read and write data with actions

Use database **actions** in your app's logic to interact with the database at runtime.

> [card] Create entry
>
> Creates a new entry in a table. Map form inputs or variables to each field you want to populate.

> [card] Update entry
>
> Edits an existing entry. Specify the entry and provide the new field values.

> [card] Delete entry
>
> Removes an entry permanently — typically passed from the item the user tapped.

To add a database action, select a component, open the **Logic** tab in the property toolbar, click **+ Add action**, and choose the database action you need. See [Logic](https://docs.reyapp.io/building/interactions.md) for the full flow.

## Filter and sort a List

You can narrow and reorder the entries displayed in a List component without writing any queries. Select the List, choose **Data** in the property toolbar, and use **+ Add filter** and **+ Add sort** to configure them. Rey applies filters and sorts live on the canvas.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.