When to use a draft
Use a draft to test a change before your users see it, to try several ideas side by side, or to work without changing the version everyone else is working on. For example:- Test a change to your app’s data. Add a dietary-needs field to a booking form, make test bookings against example data, and accept the draft when the form works.
- Check who can see what. Build a members-only page or an admin view, then sign in as test accounts with different roles in the draft to check what each one sees.
- Test a redesign. Try new colors, fonts, or a different layout in a draft, and compare it with your current design before you commit to it.
- Find the words that work. Write different headlines, product descriptions, or calls to action in separate drafts, and keep the version that reads best.
- Prepare changes for later. Build a sale banner or a seasonal page in a draft today, and accept it when you’re ready to publish it.
- Hand changes to someone else. Let a teammate or client work in a draft, then review the changes and accept them when they’re ready.
Create and test a draft
If your change needs setup that only the main version can make, such as enabling the built-in backend, setting up payments, or setting up email, make it there before you create a draft. See Changes you make in the main version. Follow these steps to create a draft, check which backend it uses, build your change, decide whether to keep it, and publish it.Open the draft switcher

Create a draft
Check which backend the draft uses
- A banner above the preview says you’re viewing example data. The draft has its own backend, and data you change stays in the draft.
- No banner appears. The draft shares your live backend, and anything you add, change, or delete changes your live app too.

Build and compare

Accept the draft, or delete it
Publish the updated pages and screens
Which backend a draft uses
- Structure: the tables, their columns, and the rules about who can read or change data. A reviews table, for example, has columns for the rating, the comment, and the product being reviewed.
- Data: the records stored in those tables, such as each review.
When a draft shares your live backend
A draft shares your live backend when:- Your project uses your own Supabase project instead of the built-in backend.
- Lovable can’t set up the draft’s backend. This happens when your database already uses an extension outside the supported list, when the database is paused or unavailable, or when Lovable can’t copy the database’s structure. Some older extensions outside that list still work in drafts, such as
citext,plpgsql_check, andsupabase_vault, if your database already uses them.
Test in a draft that has its own backend
A draft that has its own backend is the place to build a change that stores new information. You ask for the change, test it with example data, and your live database changes only when you accept. For example, to add a dietary-needs field to a booking form:-
Ask for the change in the draft’s chat. For example:
- Lovable changes the draft’s database and builds the form. Your live database stays unchanged.
- Make a few test bookings in the draft’s preview. Check that each one saves the dietary needs.
- Accept the draft when the form works. Lovable adds the same column to your live database, and the test bookings are deleted with the draft’s data. See Accept a draft.
- Publish your project when you want visitors to see the new form. See Publish your project.
Test with example data or your own data
Every new draft that has its own backend starts with example data, so its preview looks like a working app instead of an empty one. Unless your project has an example data file, Lovable writes a few example rows for each table when it creates the draft. To start every draft with the same data instead, such as the customers and bookings you always test with, ask Lovable in a draft’s chat to create an example data file. For example:db/seed.sql, a file in your project’s code. After you accept the draft that created or changed the file, every new draft starts with the rows in the file instead of rows Lovable writes.
To keep the example rows Lovable wrote in a draft, ask Lovable to save them to the example data file. If your app has user accounts, those rows include the two demo accounts Lovable creates for signing in, so the file then also holds their password. Lovable asks you before it saves the file. See Sign in to your app in a draft.
When an update rebuilds a draft’s database, the rebuilt database gets back only the rows in the example data file. Rows you added while testing are removed, and so are example rows you didn’t save to the file. To keep test data through a rebuild, add it to the file. See Update a draft for when an update rebuilds the database.
To test with your live app’s real records instead, ask Lovable in the draft’s chat to copy them in, and say which tables to include. Lovable adds a copy of those rows to the example data file, so every new draft starts with them after you accept the draft. Lovable asks you before it copies people’s names, email addresses, or other personal details, and it doesn’t copy your app’s user accounts.
The copied rows aren’t kept in sync with your live app, and anything you change in the draft stays in the draft.
Sign in to your app in a draft
A draft that has its own backend has separate user accounts, so the accounts from your live app don’t exist there. If your app has user accounts and your project has no example data file, a new draft starts with two demo accounts that Lovable creates with the example data: Demo User, with the addressdemo@example.com, and a second example account. They’re made up and belong to nobody. Lovable sets them up with the profile and role details your app expects, which can include an admin role.
When the preview opens, Lovable signs you in as Demo User, so you see your app as a signed-in user immediately. Lovable doesn’t share the demo accounts’ password. To see which accounts the draft has, ask Lovable in the draft’s chat.
To test as several users, ask Lovable to add test accounts to the example data file. For example:
View draft data
While you’re in a draft that has its own backend, Database, Users, and Storage are disabled in the More menu, because they show your live app’s data. If you open one of them from a direct link, a notice shows that you’re viewing live app data. To see the draft’s tables, accounts, or files, ask Lovable in the draft’s chat. For example:When draft data is deleted or reset
Lovable deletes or resets a draft’s data when:- You accept the draft. Changes to the database’s structure reach your live database, and the draft’s rows, accounts, and files are deleted.
- You delete the draft.
- An update rebuilds the draft’s database. The draft’s rows and accounts are reset, and its files stay. See Update a draft.
- Lovable can’t restore the draft’s database and has to rebuild it. The update dialog shows a message when this happens.
Work in a draft that shares your live backend
A draft that shares your live backend uses your project’s live database, files, and settings, the same as the main version. When Lovable changes the backend from this draft, the change happens in your live app. When an action is harder to undo, Lovable explains it in the draft’s chat first and asks you to confirm. A few changes would reach your live app as soon as Lovable makes them, so you can make them only in the main version of your project:- Deploying backend functions. You can edit a backend function’s code in a draft, and Lovable deploys it when you accept the draft.
- Changing sign-in methods, including social login providers such as Google and Apple.
- Changing file storage settings, such as whether a storage bucket is public.
Add database tables and columns
You can ask for new tables and columns in a draft that shares your live backend. That draft uses the same database as your project, so Lovable prepares the change in the draft and adds it to your database when you accept the draft:-
You ask for it in the draft’s chat. For example:
- Lovable prepares the change and builds the pages that use it. The table doesn’t exist yet, so any page that reads or saves reviews shows an error in the draft’s preview. That error is expected, and it disappears when you accept the draft.
- You accept the draft. Lovable adds the table to your live database and describes what it added in your project’s chat. See Accept a draft.
Changes you make in the main version
You can make some changes to your app only in the main version of your project, not in a draft. If the change you want to test needs one of them, make it in the main version first, then create the draft:- Enable AI features for your app. See AI features for your app.
- Set up payments, including enabling payments and creating products and prices, whether you use the built-in payments or your own Stripe account. See Add payments to your app.
- Set up email, including your email domain. See Send branded emails from your own domain.
- Enable the built-in backend, if your project doesn’t have it yet. See Built-in backend.
- Change or delete secrets, the values your app uses to reach other services. You can still add a new secret from a draft after you confirm it. See Secrets.
Update a draft
A draft starts as a copy of your project. Changes you or a teammate make to the project afterwards don’t appear in the draft until you update it. When newer changes are available, the draft’s row in the switcher shows a hollow gray ring labeled Updates available, and the draft’s chat shows a reminder with an Update draft button.
- If only your project changed the structure, Lovable makes the same changes in the draft’s database. The draft keeps its own rows and accounts, and none of your live app’s data is copied in.
- If the draft changed the structure too, Lovable rebuilds the draft’s database from your project’s structure and example data file, then applies the draft’s own changes again. The draft keeps its code and chat, but its data and accounts are reset. See Test with example data or your own data.
Accept a draft
Accepting adds a draft’s changes to the main version of your project. If the draft includes backend changes, they can take effect in your live app immediately, so review the draft’s changes before you accept. When a draft changes your database’s structure, ask Lovable in the draft’s chat to explain what will change, especially anything it renames or removes. You can accept a draft in several ways while you’re in it:- Select Accept in the top right of the editor, where Publish usually is.
- Select Accept in the draft’s ⋮ menu.
- Ask Lovable to accept it in the draft’s chat.
Work with drafts as a team
Everyone with edit access to the project sees the same drafts. Each draft’s row shows the avatar of the person who created it. Hover over the avatar to see their name and the draft’s status. When other people are working in a draft, their avatars appear at the end of its row. When someone else is working with Lovable in the main version, Lovable may suggest creating your own draft so you can work separately. When someone else has created a draft in the project, Show mine appears next to the switcher’s Drafts heading. Select Show mine to narrow the list to the drafts you created, and Show all to see every draft again. The switcher shows every draft each time you open it. Show mine also appears in the drafts list on your phone, and it doesn’t appear when you’re the only person who has created a draft. Anyone with edit access can accept any draft in the project, and accepting doesn’t require anyone’s approval. To review a teammate’s or client’s work before it reaches your project, agree on who accepts drafts. When someone accepts a draft, its changes are added to the main version for everyone. Other open drafts don’t include those changes until they’re updated, and each one shows Updates available in the switcher. If several drafts are accepted around the same time, Lovable puts them in a queue and accepts them one at a time. A project’s queue has room for 10 drafts, including the one Lovable is accepting. While a draft is in the queue, a card above the project chat shows its progress. When the queue has more than one draft, the Accepting drafts card shows their order. From there you can remove a draft from the queue or drag drafts to change the order.Manage drafts
Manage your drafts from the draft switcher, or ask Lovable in the project chat or Chats. An AI client connected to the Lovable MCP server can also create, rename, accept, and delete drafts, and build in them.
Check the status of your drafts
The draft switcher shows the status of each draft as an indicator on the corner of its creator’s avatar. Hover over the avatar to see the indicator’s label:Rename a draft
To rename a draft, hover over it in the switcher, open its ⋮ menu, and select Rename. A name can be up to 80 characters.Change the order of your drafts
The switcher lists your drafts with the most recent activity first. Drafts waiting to be accepted stay at the top, in the order Lovable accepts them, and you can’t drag them. To set your own order for the other drafts, press and hold a draft for a moment, then drag it where you want it. Lovable remembers that order for the project in the browser you’re using. You can’t reorder drafts while the switcher shows only your drafts, because the list is missing the project’s other drafts. Select Show all first.Delete a draft
To delete a draft, open its ⋮ menu, select Delete, and confirm. Deleting removes the draft and all of its changes, and the deleted draft can’t be restored. If the draft has its own backend, deleting also removes that backend and all of its data. Deleting a draft never deletes your live backend, and it doesn’t undo changes that already reached your live app:- Data you changed in a draft that shares your live backend.
- Changes in your project’s Files tab.
- Requests your app already sent to connected services.
Ask Lovable to manage drafts
You can ask Lovable to work with drafts from the project chat or from Chats:- Create a draft from the main version’s project chat or from Chats.
- Update or accept a draft from that draft’s chat, the main version’s project chat, or Chats. Outside the draft’s chat, say which draft you mean.
- Delete a draft from Chats only. In the project chat, delete a draft from its ⋮ menu in the switcher instead.
Work with drafts on your phone
You can create, switch between, and manage drafts from your phone. To open the drafts list, tap your project’s name at the top of the screen and select Drafts. The list works like the switcher on a computer:- Tap a draft to switch to it.
- Tap New draft to create one.
- Open a draft’s ⋮ menu to rename, accept, update, or delete it. When an action isn’t available, the menu shows the reason next to it.
Limitations
These limits apply while you work in a draft.- Drafts can’t use separate test values for secrets or connected services. They use your live values. See Which backend a draft uses.
- A checkout you test in a draft never completes there, because the payment provider sends its confirmation to your live app. With your own Stripe account and a live key, the payment is real. See Which backend a draft uses.
- Emails your app sends through Lovable’s built-in email sending aren’t sent from a draft, except sign-in emails. See My app’s emails don’t arrive when I test in a draft.
- Single sign-on through SAML doesn’t work in a draft. See Sign in to your app in a draft.
- Database, Users, and Storage in the More menu don’t show a draft’s data. See View draft data.
- Some backend work has to happen in the main version of your project, including payments, email setup, and enabling AI features for your app. See Changes you make in the main version.
- Files in your project’s Files tab are shared with the main version and every draft. Changes there save immediately, and deleting the draft doesn’t undo them.
- A draft doesn’t appear as a branch in a repository connected through Git sync. Its code reaches the repository only after you accept the draft.
Troubleshooting
If drafts aren’t working as expected, these are the most common causes.Accept or Update is grayed out
Accept or Update is grayed out
- The draft has no edits yet.
- The draft is already waiting to be accepted.
- The draft is being created or deleted.
- An update is running.
- The draft’s last update failed. Update the draft, then accept.
- The draft is already up to date with your project.
- An update is already running.
- Lovable is working in the draft.
- The draft is being accepted or deleted.
Can't create more than 500 open drafts in a project. Accept or delete a draft first.
Can't create more than 500 open drafts in a project. Accept or delete a draft first.
Couldn't set up this draft
Couldn't set up this draft
Your preview isn't ready yet
Your preview isn't ready yet
Update failed
Update failed
Can't update this draft while your project's database is paused. Resume the database from the main version, then update again.
Can't update this draft while your project's database is paused. Resume the database from the main version, then update again.
Couldn't rebuild this draft's database because your project no longer uses Lovable Cloud. Create a new draft and make your changes there again.
Couldn't rebuild this draft's database because your project no longer uses Lovable Cloud. Create a new draft and make your changes there again.
Couldn't restore this draft's database. Update the draft to rebuild it from your example data, keeping its code and chat.
Couldn't restore this draft's database. Update the draft to rebuild it from your example data, keeping its code and chat.
Couldn't accept this draft because Lovable was still working in it. Accept the draft again when Lovable finishes.
Couldn't accept this draft because Lovable was still working in it. Accept the draft again when Lovable finishes.
Couldn't accept this draft because it took too long. Accept the draft again.
Couldn't accept this draft because it took too long. Accept the draft again.
Couldn't update this draft before accepting it. Update the draft, then accept it again.
Couldn't update this draft before accepting it. Update the draft, then accept it again.
Draft accepted, but setup didn't finish
Draft accepted, but setup didn't finish
Lovable is finishing accepting a draft…
Lovable is finishing accepting a draft…
Couldn't finish accepting a draft
Couldn't finish accepting a draft
Some changes made while this draft was being accepted weren't included. Make them again in a new draft.
Some changes made while this draft was being accepted weren't included. Make them again in a new draft.
Couldn't accept this draft because your project's database structure changed first. Ask Lovable in this draft to redo its database structure changes, then accept again.
Couldn't accept this draft because your project's database structure changed first. Ask Lovable in this draft to redo its database structure changes, then accept again.
Can't accept this draft while 10 other drafts are being accepted or waiting to be accepted. Try again when one of them finishes.
Can't accept this draft while 10 other drafts are being accepted or waiting to be accepted. Try again when one of them finishes.
This draft was already accepted, so you can't make more changes here.
This draft was already accepted, so you can't make more changes here.
This draft was accepted or deleted
This draft was accepted or deleted
I can't sign in to my app in a draft's preview
I can't sign in to my app in a draft's preview
You're signed out of your app in a draft's preview
You're signed out of your app in a draft's preview
My app's emails don't arrive when I test in a draft
My app's emails don't arrive when I test in a draft
My draft has no example data
My draft has no example data
- Your project’s example data file has an error or is larger than 2 MB, so Lovable couldn’t apply it. Ask Lovable in the draft’s chat to fix or shorten the example data file.
- Your app’s database structure is too large for Lovable to write example rows for every table. Ask Lovable to add the rows you need to the example data file.
- An update rebuilt the draft’s database. Lovable restores the rows from your example data file, but not the example rows it wrote when it created the draft.
You’re viewing live app data, not draft data
You’re viewing live app data, not draft data
FAQ
Common questions about working with drafts.Can I test changes on a separate copy of my app before my users see them?
Can I test changes on a separate copy of my app before my users see them?
Can I use drafts in a project with a database?
Can I use drafts in a project with a database?
Does building in a draft affect my published app?
Does building in a draft affect my published app?
- Data you add, change, or delete in a draft that shares your live backend.
- Requests your app sends through a connected service, from any draft.
Is a draft the same as a branch?
Is a draft the same as a branch?
- A draft is a branch with its own project chat. When a draft has its own backend, it also has its own database, copied from your project’s structure and filled with example rows.
- Update rebases the draft onto the latest version of your project. If changes overlap, Lovable resolves the conflicts by reworking the draft’s edits.
- Accept fast-forwards your project’s history and applies the draft’s database migrations to your live database. The draft’s edits are added as a named group.
- Delete discards the branch and its own database, if it has one. A shared live database stays in place.
Can I use drafts with a connected Git repository?
Can I use drafts with a connected Git repository?
Do drafts use extra credits?
Do drafts use extra credits?
Is there a limit on the number of drafts?
Is there a limit on the number of drafts?
Who can work with drafts?
Who can work with drafts?
Will accepting my draft remove my teammate's work in the main version?
Will accepting my draft remove my teammate's work in the main version?
Can I reopen a draft after accepting it?
Can I reopen a draft after accepting it?
Why did my draft disappear?
Why did my draft disappear?