Your app's database
In shortEvery app MonstarX builds has its own private database, made for you on the first build. Open Backend → Database to see every table, its rows and its migrations, and to run read-only SQL. To add or change records, use the Admin tab or ask in the chat. The preview and your published app share the same data, and restoring a version never touches it.
A database is where your app keeps its information: the menu of a coffee shop, the orders people place, the recipes they post, the accounts they sign in with. Every app you make in MonstarX has its own private database, created on its first build. Nobody else’s app can read it.
You never have to design it. When you ask for a feature that needs to remember something, MonstarX adds the tables it needs and fills in the code that reads and writes them.
Where do I see my app’s data?
Section titled “Where do I see my app’s data?”-
Open your project and click Backend in the top bar.
-
Click Database. On the left you see Tables, each with its number of rows.
-
Click a table to see its rows. MonstarX shows the first 50.
The box at the top of the list says where the database lives and its name. Below the tables, Migrations lists every change that has shaped the database so far (more on those below). Click the refresh arrow beside Tables to count the rows again after your app has been used.
Which tables are already there?
Section titled “Which tables are already there?”Four tables exist in every app before you ask for anything: user, session, account and verification. They hold the people who sign up to your app and their sign-ins. See User accounts. Every other table is one MonstarX made for your app, like menu_items or recipes.
Can I run my own SQL?
Section titled “Can I run my own SQL?”Yes, to look things up. SQL is the language databases speak. Type a query in the box at the top and click Run. The answer appears as a table below.
For example:
SELECT title, country_code, tags FROM recipes ORDER BY created_at DESC LIMIT 5Good to know:
- The box is read-only. It runs one statement at a time, and only statements that read:
SELECT,WITH,PRAGMAandEXPLAIN. Anything that would change data —INSERT,UPDATE,DELETE,DROP— is refused, so you cannot break your app by accident. - A query shows up to 200 rows.
PRAGMA table_info(recipes)lists the columns of a table.- For an app whose data is in Supabase or Railway Postgres, the box takes
SELECT,WITH,TABLEandEXPLAIN.
How do I add, change or delete records?
Section titled “How do I add, change or delete records?”You have two easy ways, and neither needs SQL:
- The Admin tab. Every app has an admin panel beside Preview. It shows your tables as friendly forms, in business words, where you can add, edit and delete records — with Undo. A change is live in your app at once and costs no credits. See Your app’s admin panel.
- The chat. Say what you want, like “add a Flat White to the coffee menu for $4.50” or “delete the test orders”. In Chat mode MonstarX can also look at your data and answer questions about it without changing anything — see Build, Plan and Chat.
What does MonstarX do to the database when it builds?
Section titled “What does MonstarX do to the database when it builds?”When a feature needs somewhere to keep its information, MonstarX writes a migration: a numbered set of instructions that creates or changes tables, like 0001_create_menu_and_orders. It applies the migration to your database and saves it with your code, so the tables and the code always match. Some migrations add starting data, like a sample menu (0002_seed_recipes in the example above).
The Migrations list in the Backend shows every one that has run, in order. 0000_monstarx_auth is MonstarX’s own and creates the account tables.
Is my data kept when I change or restore my app?
Section titled “Is my data kept when I change or restore my app?”Yes. Your data lives apart from your code:
- New builds keep every row. When a build changes a table — adds a column, say — it does so with a migration that keeps what is already there.
- Restoring a version puts back an earlier copy of your code only. App data is unchanged. See Versions.
- The preview and the published app use the same database. An order you place while testing the preview is in the live app too, and the other way round. This is why a sample row you add while testing shows up for your customers.
Can I keep the data in my own database?
Section titled “Can I keep the data in my own database?”Yes. Under BackendCloud, Where this app keeps its data lets you choose:
- MonstarX Database — the default, nothing to set up.
- Supabase (Postgres) — your own Supabase project. Postgres is a popular database many teams already use. See Supabase.
- Railway (Postgres) — your own Railway database. See Railway.
- Firestore (your Firebase project) — your app’s records in Firebase. See Firebase.
MonstarX copies the tables, rows and accounts across and rewrites the app to use the new place. You can move back later with Move back. When the data lives in Firestore, Database shows your Firestore collections instead of tables (read-only; the app writes them).
Frequently asked questions
Section titled “Frequently asked questions”Can I edit a row straight from the Database section?
No, the Database section only reads. Edit records in the Admin tab, which works like a friendly spreadsheet with Undo, or ask MonstarX in the chat. See Your app's admin panel.
Why did my test order show up in my live app?
The preview and the published app share one database, so anything you add while testing is real data. Delete test rows in the Admin tab when you are done.
Does restoring an old version delete my data?
No. Restoring a version replaces the code only. Every row in your database stays as it is.
Can I download my data?
You can read any table with a SELECT query and copy the result, or move the data into your own Supabase or Railway Postgres database, where you have full access to it.
What kind of database is it?
A private SQL database for each app. SQL is the standard language for databases, so any developer can work with it. If you prefer Postgres, move the data to Supabase or Railway.
Why do I see a message that the app was imported?
MonstarX made no database for an imported app: its data lives wherever its own code keeps it. The keys it reads are under Secrets.