32dots HEIDELBERG AI
Session 2 medium

Add a real backend (Lovable Cloud)

LESSONLesson 2 · ~20 min

🎯Goal. Give your app a database so data persists — and learn the one ordering rule that prevents pain.

▶ Try this prompt

Add a database so tasks are saved permanently and reload when I come back. Store each task's title, due date, and status.

Connect the backend only after the frontend is stable — Lovable's docs warn that reverting a version after the DB is wired can break the schema.

  1. 1With your UI working, send the prompt above. Lovable adds a backend via Lovable Cloud (built-in, Supabase-based) — or connect your own Supabase project from the integrations panel.
  2. 2Let it create the tasks table; unlike v0, the wiring is largely automatic once connected.
  3. 3Reload the app and confirm your tasks survive a refresh — they're now stored in a real database.

You'll see. Tasks that persist across reloads, backed by a real Postgres database you didn't have to hand-wire.

💳Cost. Lovable Cloud is usage-based, and every workspace — including Free — currently gets a free $25 Cloud + $1 AI balance each month (Lovable flags this as a temporary offering); a Supabase free tier also works if you'd rather bring your own.

💡Takeaway. Lovable auto-wires the backend (the connection isn't the hard part here) — but connect it after the UI is stable, because reverts can break the DB.