Skip to main content

Database & Backend

About 5 min · Powered by Supabase

Database & Backend is your app's own server for data, files, sign-in and secret keys. It's powered by Supabase, and everything lives in your own Supabase project. TatbiQ sets it up for you.

Settings overlay with Database & Backend selected, four-step track on Connect, Give your app a memory heading, four benefit tiles and Connect Supabase button
Open Database & Backend, then select Connect Supabase to sign in on supabase.com and come back here.

What your app gets​

What it's for
Save informationProducts, orders, messages, bookings
Sign-up and log-inPeople create their own accounts
Store filesPhotos, documents and anything people upload
Private server code and keysPayments, AI and other integrations run here with their secret keys, out of visitors' sight

Services such as Ziina, UAE PASS, ChatGPT and Gemini keep their keys here, so the Hub asks for Database & Backend before them. See Your app needs a backend first.

Before you start​

  • A free Supabase account. You can create one while connecting.
  • A new, empty Supabase project for this app. TatbiQ doesn't create it for you: make one on supabase.com, it's free.
  • Your app deployed once. This usually happens by itself after your first chat message. If it hasn't, the page shows Deploy your app once first and Go to chat.

Open Database & Backend​

Open Settings, then Integration Hub, and select Database & Backend. You can also open Supabase in the Hub's catalog.

Set it up​

Connect Supabase

Select Connect Supabase. You sign in on supabase.com, then come back here.

Choose where your data lives

Select Choose a project, pick your new, empty project and select Use this project. If it isn't there, select + Make a new project on supabase.com, then come back and refresh.

Add it to your app

Select Add it to my app. TatbiQ updates your app so it saves information and has sign-up and log-in. It takes a few minutes, and you can select Stop.

Create your tables

Select Create tables. TatbiQ makes the places your app stores information, then redeploys your app. That takes about two minutes.

When it's done, the page shows Your database with the badge Working.

warning

Use a new, empty project for each app. If you pick one that already holds data, TatbiQ warns you and asks you to confirm with Use <project> anyway. A new, empty project is safer.

Automatic setup​

When you connect a service that needs a backend, Database & Backend opens with Setting up by itself. You only sign in to Supabase and pick the project. Everything after that runs by itself, and the window closes when your backend is ready. The service then carries on.

If a step needs you, setup stops and says so. Fix it on the page and it carries on.

Before real people use it​

The Overview tab has a short checklist. TatbiQ checks both items by itself.

ItemWhat it means
Tables createdStep 4 is done.
Sign-in emails link to your live addressLinks in sign-up and password emails should open your live app, not the preview. Select Fix it for me, or Change it in Supabase to do it yourself. See Supabase's redirect URLs.

Look inside your data​

Under Look inside, each link opens your project on supabase.com in a new tab.

LinkOpens
Your dataYour tables and rows
People who signed upYour app's users
FilesUploaded files
Server functionsThe private code your integrations run
Sign-in emailsThe email templates people receive

When chat adds features​

When chat adds a feature that needs new places to store information, the badge shows 1 change waiting or <n> changes waiting. Select Apply changes. Your app is redeployed afterwards, which takes about two minutes.

Switch to another project​

On the Settings tab, select Switch and pick the project. Your data does not move with you: everything saved before stays in the old project, and you create your tables again in the new one.

Remove the database​

On the Settings tab, select Remove. The dialog Remove the database from this app? lists what stops and what is kept. All your data stays in your Supabase project, your Supabase account stays for your other apps, and you can add it back any time.

If services keep their secret keys in this database, TatbiQ asks you to Remove these integrations first, because they would break without it.

To put your app's code back to how it was before the database, use Undo the database setup. You pick the version in History. See Checkpoints.

Troubleshooting​

You seeWhat to do
Paused on SupabaseFree Supabase projects pause after about a week without use. Select Resume on Supabase. TatbiQ checks every few seconds and finishes by itself. See Supabase's pricing.
Starting upYour project is waking up. Wait a minute; the page updates by itself.
Sign in againYour app and its data are fine. Select Sign in to Supabase again so TatbiQ can make changes.
Needs a fixSome changes could not be made. Select Fix it or Fix all. TatbiQ can usually fix this by itself in under a minute.
A blank screen, or log-in not workingUnder Something not working?, tell chat what you see. It can check your database and fix your app.

FAQ​

Does TatbiQ create the Supabase project for me?​

No. You make a new, empty project on supabase.com, then pick it in step 2. Everything after that is automatic.

Does it cost anything?​

Supabase has a free plan. Free projects pause after a week without use, and you can have two active at a time. See Supabase's pricing.

Where is my data?​

In your own Supabase project. Removing the database from your app, or switching projects, never deletes it.

Can two apps share one project?​

You can confirm it, but it isn't safe: the apps can overwrite each other's tables. Use one project per app.