Module 10 · Hands-on lab
Ship an open-house sign-in page
Use a coding agent to build a sign-in page for a fictional open house, store entries in Supabase or Neon, deploy it on Vercel and document every secret.
About 120 min
What you'll build
A mobile-friendly sign-in page for a fictional open house at 123 Example Street, Toronto, hosted by the fictional Maple & Main Realty, Brokerage. Visitors enter their name and contact details and choose whether to tick an unticked consent box. Each entry is saved to a Postgres table in Supabase or Neon, through server code that holds the only key.
A coding agent writes the code; you put it on GitHub, deploy it on Vercel, store the keys as environment variables, ship one change through a preview and write an inventory of every secret.
Before you start
You need about 90 to 120 minutes and these accounts. All have free plans as of October 2026.
| What | Free option | Notes |
|---|---|---|
| GitHub | Free plan | Private repositories are included. Use your personal account for this lab. |
| Vercel | Hobby plan | Fine for a learning project with fictional data. Hobby is non-commercial, so a real brokerage version belongs on Pro (lesson 2). |
| Database | Supabase Free (pick the Canada (Central) region) or Neon Free | Neon has no Canadian region; that's acceptable here because every record is fictional. |
| Coding agent | v0's free plan, GitHub Copilot Free's agent mode in VS Code, or Claude Code, Codex or Cursor if you already use one from Module 3 | Free plans have daily or monthly message limits. Claude Code needs a paid Claude plan. |
| Password manager | Any, including the one built into your browser | You'll store one database password. |
Download the template for this module, Launch checklist and secrets inventory, before you begin.
Use only this fictional data. Never type real visitors' details into a lab app.
| Full name | Phone | Consent box | Working with an agent? | |
|---|---|---|---|---|
| Jordan Testcase | [email protected] | 416-555-0101 | Ticked | Leave blank |
| Priya Sample | (leave blank) | 647-555-0102 | Not ticked | Leave blank |
| Marc-André Exemple | [email protected] | (leave blank) | Ticked | Leave blank |
| Wei Fictional | [email protected] | 905-555-0104 | Not ticked | Yes (used in step 15) |
Steps
Part 1: Create the table
- Go to supabase.com, click Start your project and sign in with GitHub.
- Click New project. Name it
open-house-lab. Click Generate a password, copy it and save it in your password manager as "open-house-lab database password". Set Region to Canada (Central). Click Create new project and wait a minute or two. - In the left sidebar, open SQL Editor, click New query, paste the SQL below and click Run. You should see a success message.
create table public.open_house_signins (
id bigint generated always as identity primary key,
created_at timestamptz not null default now(),
listing_address text not null,
full_name text not null,
email text,
phone text,
working_with_agent text,
consent_to_contact boolean not null default false,
consent_text text not null
);
alter table public.open_house_signins enable row level security;
grant select, insert on public.open_house_signins to service_role;
The first block creates the table with the columns from lesson 4. The second line turns on row-level security with no rules, so the public (publishable) key can neither read nor add rows. The last line lets the server-side role, which the secret key uses, add and read rows. New Supabase projects no longer open tables to the web API until you grant access, so this line is required.
- Open Table Editor and confirm
open_house_signinsappears with RLS shown as enabled. - Click Connect at the top of the project and copy the Project URL. Then open Project Settings → API Keys and find the secret key (create one if none is listed). Leave this tab open. Do not paste either value into your coding agent or any chat.
Using Neon instead: sign up at neon.com, create a project called open-house-lab in the region closest to you, open the SQL Editor and run only the create table block. Then open Connect (or Connection details) and keep the tab with the connection string open. That string contains the password, so treat it as a secret.
Part 2: Build the page with your coding agent
- On github.com, click + (top right), then New repository. Owner: your personal account. Name:
open-house-signin. Choose Private, tick Add a README file and click Create repository. If your agent creates repositories itself (v0 does this through its GitHub connection), let it createopen-house-signinas a private repository in your personal account instead. - Open your coding agent on that repository and paste this prompt. Using Neon? Replace the "Data" paragraph with the one after it.
Build a one-page Next.js app (App Router, TypeScript) in this repository: an open-house sign-in sheet for a fictional brokerage, Maple & Main Realty, Brokerage. The open house is at 123 Example Street, Toronto, Saturday 2 to 4 p.m.
Form fields:
- Full name (required)
- Email and phone (each optional, but at least one is required)
- A consent checkbox, unticked by default, labelled exactly: "Yes, Maple & Main Realty, Brokerage may contact me by email or text about this property and similar listings. I can unsubscribe at any time."
- Under the form, this privacy note: "We collect your name and contact details to keep a record of visitors for the seller's security and, only if you tick the box, to follow up with you. Questions: [email protected]"
Data: when the form is submitted, a server action inserts one row into the Supabase table public.open_house_signins (columns: listing_address, full_name, email, phone, working_with_agent, consent_to_contact, consent_text) using @supabase/supabase-js. Read SUPABASE_URL and SUPABASE_SECRET_KEY from environment variables inside the server action at request time. Never use a NEXT_PUBLIC_ name for them and never call the database from browser code. Save the exact consent label in consent_text.
Rules: do not ask me for any key or password. Do not create any .env file with real values, and make sure .gitignore excludes .env files. Log only the new row's id, never visitor details. Show a thank-you message on success and a friendly error if saving fails or the environment variables are missing. Add a hidden "website" field and silently ignore submissions that fill it. Mobile-first, large tap targets, plain design. When done, list every environment variable the app reads, then commit and push to main.
Data (Neon version): when the form is submitted, a server action inserts one row into the table open_house_signins (same columns) using @neondatabase/serverless. Read DATABASE_URL from an environment variable inside the server action at request time. Never use a NEXT_PUBLIC_ name and never connect from browser code. Save the exact consent label in consent_text.
- Check the agent's summary lists only the environment variables you expect. On GitHub, confirm the repository has no file whose name starts with
.env.
Part 3: Deploy on Vercel
- Go to vercel.com, click Sign Up, choose Hobby and continue with GitHub. Already have an account? Log in.
- Click Add New…, then Project. Find
open-house-signinunder Import Git Repository and click Import. If it isn't listed, use the link to adjust the GitHub app's permissions so Vercel can see it. - Leave the settings as detected (the framework should show Next.js) and click Deploy. The page will build, but the form can't save yet because the keys aren't set.
- In the project, open Settings → Environment Variables. Add
SUPABASE_URLwith type Config and your Project URL. AddSUPABASE_SECRET_KEYwith type Secret and your secret key. (Neon: add onlyDATABASE_URL, type Secret.) Select Production and Preview for each, then Save. - Open Deployments, click the three dots on the latest deployment and choose Redeploy, because variables only apply to new deployments.
Part 4: Test with fictional entries
- Open your
.vercel.appaddress on your phone. Submit the first three people from the sample data, exactly as listed. In Supabase's Table Editor (or Neon's Tables), refresh and confirm three rows, withconsent_to_contacttrue for Jordan and Marc-André and false for Priya. - Ship a change through a preview. Ask your agent: "On a new branch called
agent-question, add an optional Yes/No question 'Are you working with a real estate agent?' saved to working_with_agent, then open a pull request." On GitHub, open the pull request and wait for Vercel's comment with a preview link. Open it, submit Wei Fictional with Yes, and confirm the row. Then click Merge pull request and check the live page once the production deployment finishes. - Run three leak checks. On a computer, open the live page, view the page source and search for eight characters from the middle of your secret key (after the shared
sb_secret_start) or Neon password: nothing should match. Search your GitHub repository for the same characters: nothing should match. Scroll your agent chat: no key should appear.
Part 5: Write the inventory
- Open the template. Tick the launch-checklist items that apply to this lab, and fill in the secrets inventory: every key, password and account, where it is stored, who can see it, and how you would rotate it.
If you're comfortable with code
Clone the repository, run vercel link, and create .env.local with the two values copied from Supabase (Vercel never downloads Secret values). Run the app locally and confirm .env.local is ignored by Git. Then ask your agent for a test that submits the form with a filled "website" field and checks that no row is saved.
What to submit
- Your live Vercel URL. If you can't make it public, a screenshot of the working page and of your table with the fictional rows.
- Your GitHub repository link (private is fine; add a screenshot of the file list).
- A short note listing each secret (database password, secret key or connection string, plus any others) and exactly where each one lives.
Check your work
- The form saves all four fictional entries, and the consent value matches what was ticked.
- The consent box starts unticked and the exact consent wording is stored with each row.
- No key appears in the repository, the page source or your chat history.
- Secrets are Secret-type environment variables in Vercel, and the database password is only in your password manager.
- One change went through a branch, a pull request and a preview before reaching production.
If you get stuck
- Vercel can't find the repository. On the Hobby plan, Vercel can't deploy private repositories owned by a GitHub organization (Vercel Git docs). Create the repository under your personal account.
- The build fails. Copy the first red lines of the build log (no keys) and ask your agent to explain and fix them.
- "permission denied" (code 42501) when saving. The
grantline in step 3 didn't run. Run it again in the SQL Editor. - The form says it can't save. Check variable names match exactly, then redeploy. Open the deployment's Logs right after a test submit; Hobby keeps runtime logs for one hour.
- The Supabase project is paused. Free projects pause after a week without activity. Open the project and click restore.
Template · Markdown
Launch checklist and secrets inventory
A pre-launch checklist for any small brokerage app, plus an inventory of every key, password and account so the brokerage always knows who owns what.
Submit your lab
Loading your lab status…