Create the schema
Build the minimum lead, recommendation, ownership, status, and timestamp fields.
Zero to MVP AI Bootcamp
Give the product durable memory, business login, and access rules that keep every account private.
Today you ship
A database-backed lead dashboard with authentication and a passed two-account privacy test.
Scroll to move through the presentation.
Build, test, checkpoint, and ship.
A database gives the product memory after a page refresh or new session. We store only the information needed to review a lead and its recommendation.
One lead record stores the business owner, answers, recommendation, status, and creation time. It does not need a separate field for every visual detail.
Apply the concept
Use this prompt
Design the minimum Supabase data model for this lead assistant. Store owner, lead answers, validated recommendation, status, and timestamps. Explain each table and relationship in beginner-friendly language before providing SQL.
Success looks like
You can draw the data model on one page and explain why every stored field is necessary.
Watch for
Authentication proves who is using the product. Authorization decides which data that person may access. A session lets the product remember the signed-in user between pages.
A clinic owner signs in and sees the clinic's leads. Signing in does not grant access to another clinic's records.
Apply the concept
Use this prompt
Add Supabase authentication to the existing app using its current patterns. Include sign-up, sign-in, sign-out, clear errors, and a protected dashboard redirect. Do not add authorization rules yet.
Success looks like
A user can enter, leave, and return to the private area while signed-out visitors are redirected safely.
Watch for
Hiding another user's data in the interface is not enough. Privacy rules must live in the database so unauthorized requests are rejected even if someone bypasses the page.
Every lead stores its business owner ID. A database rule allows reading or changing that row only when the signed-in user's ID matches.
Apply the concept
Use this prompt
Write Supabase Row Level Security policies for owner-only lead records. Explain each policy in plain English first, use the authenticated user ID, and deny access by default.
Success looks like
The signed-in owner can manage their leads, and the same request fails when made by another account.
Watch for
A privacy claim is not evidence. The two-account test proves that separate users cannot read, change, or delete each other's records.
Account A creates a red lead and Account B creates a blue lead. Each account should see only its own color in list and detail views.
Apply the concept
Use this prompt
Create a two-account privacy test checklist for lead records. Include list, direct detail URL, update, delete, and newly created record behavior. Mark any cross-account access as a launch blocker.
Success looks like
All unauthorized actions return no private data and make no changes, while owner actions continue to work.
Watch for
Build brief
Connect the shared product to Supabase and add a private dashboard for each business account.
User story
As a business owner, I can return to my leads and recommendations while every other account remains private.
Build the minimum lead, recommendation, ownership, status, and timestamp fields.
Turn on Row Level Security and add policies for authenticated owners.
Add sign-up, sign-in, sign-out, validation, and useful errors.
Store the submitted answers and validated AI recommendation.
List, inspect, update, and archive the signed-in owner's leads.
Create distinct records with Accounts A and B, then attempt cross-account access.