Skip to main content
Every Mocha app ships with a database. Databases are used to store data for your app. Think of it as a spreadsheet for your app.
Use the Data tab to view tables, inspect rows, and make quick edits.
Viewing your database tables and rows

Overview of the Data tab

There are two databases per app: a Dev database for the in‑Mocha preview, and a Prod database for your deployed site. They do not share data.

Dev vs Prod

  • Dev: Used while building and testing in the preview. Safe to experiment.
  • Prod: Used by your deployed site. Data here is what real users see.
When you click publish, Mocha runs any migrations that have been defined since the last deployment. This is how Mocha creates new tables. So for example if you introduce a new concept in your app (like “todos”), Mocha will create a new table for it. You’ll see it in the Data tab immediately for Development, and after you deploy, it will be in the Production tab as well.
If you add data in Dev, you won’t see it in Prod after deploying. If you want to add data to your production database, explicitely ask Mocha to do so, or create an upload mechanism and then upload the data through the published site.

Quick start

1

View your tables

Open the Database tab to see your tables and recent rows.
2

Add or edit rows

Use the built‑in form UI to insert or edit rows. Great for testing quickly.

What you can ask the AI to do

If you want to add data to your production database, explicitely ask Mocha to do so, or create an upload mechanism and then upload the data through the published site.
If you want to edit data in your production database, explicitely ask Mocha to do so, or create an edit mechanism and then edit the data through the published site.
I