# Versions & undo

You can change your app freely because you can always go back. There are two safety nets: **saved
versions** (an undo button) and **drafts** (a sandbox).

## Saved versions — your undo button

A **version** is a snapshot of your whole app — its code and its data — at a moment in time. You
ask your AI to save one before a big change:

> *"Save a version called 'before redesign', then change the layout to two columns."*

If you don't like the result, roll back:

> *"Go back to the 'before redesign' version."*

Your app returns to exactly how it was. You can list your saved versions any time:

> *"What versions have I saved for this app?"*

**A good habit:** ask for a version before anything you'd hate to lose — a redesign, a big
feature, a data cleanup.

## Drafts — a safe place to experiment

When your app already has **real visitors or real data**, you don't want to experiment on the
live thing. A **draft** is a private copy with its own link, so you can try ideas without anyone
seeing them and without touching the real app:

> *"Make a draft of my app so I can try a new homepage without affecting the live one."*

You iterate on the draft's link until you're happy, then publish it:

> *"This looks great — apply the draft to my live app."*

When you publish a draft, your live app gets the new design and features, **but the real data and
your visitors' uploads are kept**. A restore point is saved automatically first, so you can still
roll back if needed. If you'd rather throw the draft away, just say *"discard the draft."*

## Versions vs drafts — which one?

| Situation | Use |
|---|---|
| About to make a risky change | save a **version** first |
| Don't like the change you just made | **roll back** to a version |
| Want to experiment without affecting the live app | work in a **draft** |
| App has real users/data and you're redesigning | **draft**, then apply |

## Good to know

- Saved versions don't count against your project limit.
- Rolling back restores both the app and its data to the snapshot — recent changes since that
  snapshot are undone, so save a fresh version first if you're unsure.
