---
title: "Add a Supabase Database"
description: "Hook up a Supabase database to the contact form so customer messages get stored. Learn how v0 walks you through integration installs and what happens when you skip optional steps."
canonical_url: "https://vercel.com/academy/v0-foundations/integrate-supabase-database"
md_url: "https://vercel.com/academy/v0-foundations/integrate-supabase-database.md"
docset_id: "vercel-academy"
doc_version: "1.0"
last_updated: "2026-05-13T05:26:22.672Z"
content_type: "lesson"
course: "v0-foundations"
course_title: "v0 Foundations"
prerequisites:  []
---

<agent-instructions>
Vercel Academy — structured learning, not reference docs.
Lessons are sequenced.
Adapt commands to the human's actual environment (OS, package manager, shell, editor) — detect from project context or ask, don't assume.
The lesson shows one path; if the human's project diverges, adapt concepts to their setup.
Preserve the learning goal over literal steps.
Quizzes are pedagogical — engage, don't spoil.
Quiz answers are included for your reference.
</agent-instructions>

# Add a Supabase Database

# Add a Supabase Database

Our site looks great. It also has a contact form that does absolutely nothing. Click the button, fill in your email, hit send. Straight into the void.

If we're going to pretend to run a plant shop, the form needs to remember things. That's where a database comes in.

## Spot the dead buttons

Before adding new stuff, scrub the page for buttons that don't work. In the video, the **View All Plants** button was clickable but went nowhere. We told v0:

```
remove view all plants dead button
```

Gone. You can also ask v0 to make the button work, but only if you actually want it to do something. Decide first.

## Ask v0 how to make the form work

This is the prompt that drove the lesson:

```
how can we make the send us a message section work?
I want to receive these messages somewhere.
```

v0 walks you through options. Two main ones:

- **Supabase**: store messages in a database (a spreadsheet in the cloud, basically)
- **Resend**: forward messages to your email inbox

Both are good. We're starting with Supabase, because a permanent record of everyone who's ever filled out the form is hard to beat.

## Install the Supabase integration

When v0 offers to install Supabase, click **Install**. v0 handles the connection between the database and your contact form.

Along the way, v0 will ask if you want to add a Resend API key for email. **Skip it for now.** We'll come back to email in the next lesson. v0 is smart enough to make the email step optional and ship the database part on its own.

\*\*Note: Watching v0 work\*\*

You can either follow each step v0 takes (helpful when you're learning) or just let it run. Both are fine. The "Show steps" link expands the work-in-progress so you can see what's happening.

## Test the form, then check the database

Once v0 says the form is functional, **publish your changes** and head to your live site. Fill out the form like a customer would.

Back in v0, click the **database icon** in the sidebar. Pick the **contact\_messages** table. Your test submission should be sitting there, waiting.

That's the whole loop: form on the site, message in the database. Repeatable, persistent, real.

## Recap

- **Ask v0** how to make a feature work instead of guessing the implementation.
- **Supabase** stores form submissions in a queryable table.
- **Skip the Resend step** in this lesson. We'll handle email next.
- **Publish after every meaningful change** so your live site stays in sync.


---

[Full course index](/academy/llms.txt) · [Sitemap](/academy/sitemap.md)
