Session Three

Custom Domains & Lead Magnets

By the end of this session, you will have a custom domain pointing to your site, a live lead capture page, a real database storing your subscribers, and an automated email delivering your resource the moment someone signs up.

Duration~90 minutesDifficultyBeginner
Table of Contents
  1. 1Part A — Custom Domain Setup ↗
  2. 2Part B — Build Your Lead Magnet Page
  3. 3Part C — Set Up Supabase
  4. 4Part D — Wire It All Together
  5. 5Bonus — Send Emails from Your Own Domain

Workshop Recording

Follow along with the live session. Hit play and the video will stick to the top as you scroll.

Part A

Custom Domain Setup

Buy a domain, connect it to Vercel, and configure DNS so your site lives at your own address. Covers all major registrars with exact DNS values included.

Open Custom Domain guide
Part B

Build Your Lead Magnet Page

A lead magnet is a free resource you give people in exchange for their email. We will build a page where someone enters their name and email and automatically receives your resource. All of this happens without you doing anything.

1

Open your terminal and start Claude Code

First, open your terminal:

Mac

  • Shortcut: Press Cmd + Space, type Terminal, press Enter
  • Through Finder: Applications → Utilities → Terminal

Windows

  • Shortcut: Press the Windows key, type Command Prompt, press Enter
  • Through Start: Start → All Apps → Windows Tools → Command Prompt

Navigate to your project folder, then run:

Terminal
claude --dangerously-skip-permissions

Heads Up

The first time you open Claude Code in a new folder, it will ask if you want to Trust this folder. Click Yes or press Enter. Without this, Claude cannot run commands.

Pro Tip

The --dangerously-skip-permissions flag lets Claude run commands without asking for approval each time. Much faster for workshops. Only use it in your own project folder.
2

Tell Claude to build your lead magnet page

Edit the prompt below directly — replace the text in brackets with your own details. When you are done, hit Copy and paste it into Claude Code.

Pro Tip

Click anywhere in the box below to edit it. Replace every line in brackets before copying.
Claude Code prompt
Edit before copying
Part C

Set Up Supabase

Supabase is a free tool that stores your subscriber data. When someone fills out your form, their name and email get saved here automatically. You can log in any time and see your whole list.

3

Create your Supabase project

  1. Go to supabase.com/dashboard and click New Project
  2. Give it a name like your business name or “my-leads”
  3. Set a password and save it somewhere
  4. Pick the region closest to you
  5. Click “Create new project” and wait about one minute
4

Get your Supabase Personal Access Token

When Claude sets up your database tables and security rules, it often uses the Supabase CLI behind the scenes to run SQL. The CLI needs a Personal Access Token — a separate account-level key that lets Claude authenticate and execute commands against your project.

  1. Go to supabase.com/dashboard/account/tokens (or click your avatar at the top right → Account → Access Tokens)
  2. Click Generate new token
  3. Name it something like “claude-workshop”
  4. Copy the token immediately — you cannot view it again after closing the modal
  5. Go to Claude Code and paste this:
Claude Code prompt
Edit before copying

Heads Up

Your PAT gives Claude access to all your Supabase projects. Never paste it into a code file or share it publicly — treat it like a password.
5

Create your API keys and give them to Claude

  1. In your Supabase project, click the gear icon and go to Settings > API Keys
  2. Click Create new API Keys
  3. Copy your Project URL (looks like https://abcdef.supabase.co)
  4. Copy the Publishable key (starts with sb_publishable_)
  5. Copy the Secret key (labeled Service Role or Secret — you will need this in the next step)
  6. Go to Claude Code in your terminal and paste this with your values filled in:
Claude Code prompt
Edit before copying

Heads Up

The publishable key is safe for the browser. The service role key bypasses all security rules and must never go in client-side code — Claude will keep it server-side only.

Note

Claude may give you a heads-up about pasting API keys directly into the chat. This is very low risk for a workshop setting — later sessions cover more advanced ways to manage secrets safely. If Claude asks, just agree and continue.
6

Lock down your subscriber table with Row Level Security

By default, anyone who finds your Supabase URL can read or delete your entire subscriber list. Row Level Security fixes that — the website can only add new subscribers, and nothing else is exposed. Your server needs one extra key to keep duplicate checking working.

Claude Code prompt
Enable Row Level Security on my Supabase subscribers table.

Allow anyone to submit a new row through the form, but block all reading, editing, and deleting from the public. Use my service role key server-side so duplicate checking still works. Add the service role key to my .env.local and to my Vercel environment variables.

Show me confirmation that RLS is on and the policy is active.

Heads Up

The service role key bypasses all security rules. It belongs only in .env.local and your Vercel environment variables — never in any code that runs in the browser.
7

Get your Resend key and give it to Claude

  1. Go to resend.com and sign in (create a free account if you have not yet)
  2. Click API Keys in the left sidebar
  3. Click Create API Key, give it a name like “lead-magnet”, and click Create
  4. Copy the key immediately, then go back to Claude Code and paste this:
Claude Code prompt
Edit before copying

Heads Up

Copy the key before closing the modal. If you lose it, delete it and create a new one.
8

Tell Claude to set up the form backend and subscriber database

Now that Claude has your Supabase credentials, tell it to set up everything your lead magnet form needs to work on the server side:

Claude Code prompt
Set up the backend for my lead magnet form using my Supabase credentials.

1. Create a database table to store my email subscribers. It should save their first name, email, which lead magnet they signed up for, and the date.
2. The same person should be able to sign up for different lead magnets and get each email.
3. The same person should not be able to sign up for the same lead magnet twice.
4. Make sure my website is allowed to save data to the table.
5. Set up the server side so that when someone submits their name and email through the lead magnet form, it saves them to the database.
6. Make sure both fields are filled in before saving anything.
7. Return a success message when it works and an error message when it does not.

Note

The “different lead magnets” setup means if someone signs up for your free checklist today and your video training next week, they will get both emails. No duplicates, no missed deliveries.
Part D

Wire It All Together

Claude has all your credentials. Now give it one command to connect everything, then two more to push it live.

9

Tell Claude to set up the full integration

Claude Code prompt
Edit before copying
10

Tell Claude to add your keys to Vercel

Claude can add your environment variables to Vercel directly:

Claude Code prompt
Add my Supabase and Resend environment variables to my Vercel project.
11

Tell Claude to deploy

Claude Code prompt
Deploy my website to production.
  1. Once deployed, visit your live site on your custom domain
  2. Submit the form with a real email address
  3. Confirm: a new row appears in the Supabase Table Editor and an email lands in your inbox

You just built something real.

You have a custom domain, a live lead capture page, a real database, and automated email delivery. This is the foundation of every serious online business.

Support Each Other

Post in the Masterminds group

Share your lead magnet link in the group and ask people to sign up and open your email. Every open counts toward your open rate, and a healthy open rate makes your list more valuable to every platform you ever send from.

1

Join each other's email lists

Find every lead magnet link posted in the group and sign up for all of them. Your subscriber count goes up, theirs does too.

2

Reply to the welcome emails you receive

Even a short reply like “got it, looks great!” tells email providers this is a real conversation. It boosts the sender's deliverability for everyone they email from now on.

Important: Resend Free Tier

Your lead magnet works, with two limits

Until you verify your own domain in Resend, two things apply:

1.

Emails send from a default address (onboarding@resend.dev), not from your own domain. They may land in spam.

2.

You can only send to your own email address (the one you signed up with). Other recipients will not receive the email until you verify a domain.

This is fine for today. You can test the full flow by submitting your own email. To unlock sending to anyone, complete the optional homework below.

Optional Homework: Verify Your Domain in Resend

Challenge

Customize your welcome email with your own branding and tone, then get at least 5 signups from real people before the next session.

Bonus

Send Emails from
Your Own Domain

Free on all Resend plans, including the free tier. No extra cost.

Right now your emails come from onboarding@resend.dev. With a few extra DNS records you can send from your own address like hello@yourdomain.com. This looks far more professional and improves your deliverability. About 10 minutes and completely free.

Step 1 — Add your domain to Resend

Go to Resend > Domains and click Add Domain. Enter your domain name and click Add.

Step 2 — Add the DNS records Resend gives you

Resend will show you 3 to 4 DNS records (similar to what you did for Vercel). Go back to your registrar and add each one. These prove to email providers you own the domain.

Step 3 — Tell Claude to update your from address

Once Resend shows a green Verified badge, go to Claude Code and paste this:

Claude Code prompt
Edit before copying

Step 4 — Tell Claude Code to deploy

Once Claude has updated the code, tell it:

Claude Code prompt
Deploy my website to production.

Using Codex instead of Claude Code? Codex version of this page