# Sample data and states (https://www.dessn.com/docs/your-code/sample-data)

The sample data your pages run on, how to change it, and how to show a page in another state or as another user.

Dessn runs your app without your backend. During setup it gives your app sample data that fits your code: the API's
answers, a signed-in user, feature flags and storage. That's why every page opens with something on it, and why what you
do on a file doesn't touch your own backend's data.

When you press [Play](https://www.dessn.com/docs/working-in-dessn/play) and send a form, add a row or delete one, the change happens in the
sample data, so the next page shows it, as it would in your app.

Sample data lives in Dessn. It's never added to your repository.

## Change the data or the state
Ask for it in words, on the frame you want:

- "Show this table with 200 rows and a long customer name."
- "Make the empty state of Projects."
- "Show checkout when the card is declined."
- "Show Settings as a viewer, not an admin."

Select the frame and ask [Petal or the design agent](https://www.dessn.com/docs/working-in-dessn/design-agent), or ask your
[coding agent](https://www.dessn.com/docs/mcp). Each new state goes on its own frame, so the original stays as it was.

## Save the state you're in
Click through a frame in Play until it shows what you want, then use the frame bar under it:

- **Extract current state** adds a frame of that moment beside the original.
- **Record flow** adds a frame for each step you take, until you press **Stop**.

In full screen, the arrows at the bottom step through a frame's saved states.

## Different users
If your code shows different things to different kinds of user (an admin and a member, signed in and signed out, Free
and paid), setup makes a frame for each, and a chip in the frame's header names the user it shows.

<Accordions>
<Accordion title="Does Dessn ever use my real data?">
No: Dessn fills your app's calls with sample data and never asks for access to your backend. One exception: if your
code calls a third-party service straight from the browser and there's no sample data for it, that call goes out from
the viewer's browser as it would in your app. See [Security](https://www.dessn.com/docs/security#how-your-app-runs).
</Accordion>
<Accordion title="A page shows the wrong data, or none">
Select the frame and tell the design agent what it should show ("Orders should list a few past orders"). It changes the
sample data for that frame. If a page in your Library is wrong, tell Petal there: **This page looks out of date**.
</Accordion>
<Accordion title="What happens to sample data when I sync new code?">
It's kept, and adapted to your new code where it needs to be.
</Accordion>
</Accordions>
