Back to blog

The Prompts I Use to Build a Membership Portal with Claude (Free Starter Included)

by Samantha 16 September 202625 min read


Every course platform charges you monthly for the privilege of holding your own content. Kajabi, Thinkific, Teachable - a hundred-odd pounds a month, forever, for a login page and a video player.

I stopped doing that for clients. Every portal I build now is theirs. Their code, their database, their domain. It costs them hosting each month to run, and here's how you build it.

I pulled the best bits out of builds I've done, stripped every trace of any confidential information, and turned what was left into a starter template that I can hand to anyone. I wrote that habit up here. This post is what came out of it.

The starter is free, and the download is in Step 1. These are the prompts I type into Claude at every step, in order, and the buttons Claude sends you to click in Supabase, Brevo and Stripe. You don't need to know how any of it works underneath. You type the prompt, Claude does the work, and when it needs you to do something, it tells you exactly what.

What you're building

By the end you'll have a members-only course portal on your own domain, with:

  • A landing page with a hero, what's inside, who it's for, how it works, pricing, an FAQ, and a join button that takes people to checkout.
  • Sign up and log in with email and password. Confirmation emails and password resets come from your own domain.
  • A member portal with a dashboard showing each course and how far through it they are, a course viewer with modules, lessons, video, written content and downloads, and a profile page.
  • An admin portal where you manage members, membership levels, emails, password resets, course content and payments.
  • Payments through Stripe. Someone pays on your landing page and gets access.

How this post is organised

Six parts, in this order:

  1. Set up the infrastructure. Get the code running, connect the database, the email tool and the payment tool, and make yourself the admin.
  2. Build the portal. The front end people see, the member portal they log into, and the admin portal you run it from.
  3. Test it. Sign up as three different people and check what each one gets.
  4. Add your content. Your courses and your membership levels.
  5. Lock it down. The security settings that stop someone getting into what they haven't paid for.
  6. Go live. Put it on your domain.

The infrastructure goes first because it's the part that never changes. Members and course content change all the time, so they go in last, once everything underneath them works.

What you need before you start

  • A domain, bought.
  • A Vercel account. Free. This is where the portal lives on the internet once it's built.
  • A Supabase account. Free. This is the database that holds your members, their logins, your courses and their progress.
  • A Brevo account. Free. This sends the confirmation and password reset emails from your own domain.
  • A Stripe account. Free to set up. This takes the payments.
  • Claude, on a paid plan. You'll use the Claude Code tab in the Claude desktop app.
  • A GitHub account. Free. It's where the code gets stored so Vercel can publish it.
  • Node.js. This is a small free programme the code needs to run. When you get to it, Claude will help you install it.
  • Your brand profile, if you have one. If you haven't, here's how to make one in twenty minutes.

You don't need your course content yet. That comes in Part 4.


Part 1 - Set up the infrastructure

Step 1 - Set up your build folder

Everything for this build lives in one folder, so Claude always knows where to look and where to put things.

  1. On your desktop, create a folder. Call it the client's name, or "Portal build".
  2. Download the Membership Portal Starter by Incuv8or. Double-click the zip to unzip it, and drag the membership-portal-starter folder that comes out into your build folder.
  3. Drag your brand profile PDF into the build folder too.
  4. Create a folder inside it called images, and put in your logo, a hero image, a photo of you, and anything else you want to appear on the site.

Inside membership-portal-starter there are three files worth knowing about. You don't need to open them.

  • README.md is the install guide.
  • CLAUDE.md is the instructions for Claude. It reads this first and it tells Claude how the portal is built.
  • PROMPT.md is every prompt in this post, in order, so you can copy them from there.

Step 2 - Open the folder in Claude Code

  1. Open the Claude desktop app.
  2. Click the Claude Code tab at the top.
  3. Start a new chat.
  4. Click the + at the bottom of the chat and choose your build folder from the desktop. Now Claude Code is working inside that folder.

Paste this as your first message:

I'm building a members-only course portal for [CLIENT / BRAND NAME] and I'm
not a developer. There's a starter template in the folder called
membership-portal-starter. Please read README.md and CLAUDE.md in there so
you understand how it's built.

We're going to do this together, one step at a time, and I'll tell you
when each step is done before you move on. Explain things in plain
English. If you need a decision from me, tell me what you'd recommend and
ask me a yes or no question.

Two rules for the whole build: never put a key or password in the code,
and never ask me to paste one into this chat. When you need one, open the
file it goes in and I'll paste it there myself.

Tell me when you've read both files and we'll start.

Claude reads the two files and says it's ready.

Step 3 - Get it running on your computer

Let's get the portal running on my computer so I can see it. Check that
everything it needs is installed and install anything that's missing. Then
start it and give me the link to open in my browser.

Claude checks whether Node.js is installed. If it isn't, it tells you where to download it and what to click. Then it sets the code up and starts the portal, and gives you a link that looks like http://localhost:3000.

Open that link in your browser. The landing page is there with placeholder words and colours. Click Log in and you'll see a notice saying setup is needed. That's expected, because there's no database yet.

That page is only on your computer. Nobody else can see it. You'll build everything here and put it on the internet in Part 5.

Step 4 - Connect Supabase

Supabase is the database.

Now I want to connect the portal to Supabase. Walk me through creating the
project and setting up the database, one step at a time. When it's time
for the keys, open the file they go in for me.

Claude tells you when to do each of these.

Create the project.

  1. Go to supabase.com and create an account.
  2. Click New project.
  3. Give it the client's name.
  4. Make up a database password and write it down somewhere safe. You can't see it again later.
  5. Pick the region closest to your members. For the UK, that's London.
  6. Click Create new project and wait a minute.

Set up the tables.

  1. Open the project. In the left-hand menu, click SQL Editor, then New query.
  2. In your build folder, open membership-portal-starter, then the folder called supabase, then the file called schema.sql. Select everything in it and copy it.
  3. Paste it into the query box in Supabase and click Run. That creates every table the portal needs and the rules about who can see what.
  4. Do the same with seed.sql. That adds a small demo course so you've got something to look at.

If you get stuck, drag schema.sql into the Claude chat and say: "I need to add this to my Supabase SQL editor. Talk me through it."

Give Claude the keys.

Supabase gives you three pieces of information that connect the code to the database. You'll copy them into a note, then into a file that Claude opens for you. Never into the chat.

  1. In Supabase, click Project Settings at the bottom of the left-hand menu, then API.
  2. Copy the Project URL into a note.
  3. Copy the key labelled anon or public into the note.
  4. Copy the key labelled service_role or secret into the note. Treat this one like a bank password.
I've got my three Supabase values in a note. Open the file they go in and
tell me which line each one goes on.

Claude opens the file. Paste each value after the = on its line and save.

Keys are in.

Turn off email confirmations for now.

While you're building, you don't want to check an inbox every time you sign up as a test user. Turn confirmations off now and back on in Step 5.

  1. In Supabase, click Authentication, then Providers, then Email.
  2. Turn Confirm email off and save.

Go back to localhost:3000 and click Log in. The login page works now.

Step 5 - Connect Brevo

Brevo sends the emails: the "confirm your address" one when someone signs up, the password reset one, and later the welcome one.

Now I want to connect Brevo so the portal's emails come from my own
domain. Tell me what to set up in Brevo and exactly what to put into
Supabase, one step at a time.

Claude sends you to do these.

Set up who the emails come from.

  1. Go to brevo.com and create an account on the free plan.
  2. In the left-hand menu, click Senders & IP, then Senders, then Add a sender.
  3. Put in the name people will see, like "Jane at The Studio", and the email address they'll come from, like hello@yourdomain.com. Brevo emails that address. Open the email and click the link to verify it.
  1. Click Domains, then Add a domain, and type your domain.
  2. Brevo shows you two or three lines called DNS records. Go to wherever you bought your domain, find the DNS settings, and add each record exactly as Brevo shows it. Come back to Brevo and click Verify. It can take a few minutes or a couple of hours to go green.

This is the step people skip, and it's the one that decides whether your emails land in the inbox or the junk folder.

Get the SMTP key.

  1. In Brevo, click your name in the top right, then SMTP & API.
  2. Click the SMTP tab, then Generate a new SMTP key. Name it after the portal. Copy the key into your note. It's only shown once.
  3. On that same page, note down the SMTP server, the port and the login.

Put it into Supabase.

  1. In Supabase, click Project Settings, then Authentication, then SMTP Settings.
  2. Turn on Enable Custom SMTP.
  3. Fill it in from your note: the sender email and name you verified, the server, the port, your Brevo login as the username, and the SMTP key as the password. Save.

Make the emails sound like you.

  1. In Supabase, click Authentication, then Email Templates.
  2. Change the subject lines and wording of Confirm signup and Reset password so they sound like your brand. Leave the part that says {{ .ConfirmationURL }} exactly as it is, because that's the link.

Turn confirmations back on.

  1. Authentication, then Providers, then Email. Turn Confirm email back on and save.
Brevo is connected and email confirmations are on. Send a test signup
email to my address so I can check it arrives from my domain.

The email should arrive within a minute, from your name and your domain. If it doesn't, check the sender was verified in step 3 and that the SMTP key went in without a space at the end.

Step 6 - Connect Stripe

Stripe takes the money.

Now I want to connect Stripe so people can pay on the landing page and get
access automatically. Tell me what to create in Stripe, then wire the
pricing section to it. When you need the keys, open the file they go in.

Claude sends you to do these.

  1. Go to stripe.com and create an account.
  2. In the left-hand menu, click Product catalogue, then Add product. Name it after the membership, set the price, and save.
  3. Click Payment Links, then New. Choose the product and create the link. Copy the link into your note.
  4. Click Developers in the bottom left, then API keys. Copy the Publishable key and the Secret key into your note. The secret one goes in the file and nowhere else.
I've got my Stripe payment link and both keys in a note. Open the file
they go in.

Paste them in, save, and tell Claude they're in. Claude then connects the join button to your payment link and sets up the webhook, which is what tells the portal someone has paid. Claude will ask you to create the webhook in Stripe and tell you what address to give it. Do that exactly as it says, copy the webhook signing secret into the file the same way, and tell Claude it's in.

Stripe starts in test mode. Leave it there until Part 5.

Step 7 - Make yourself the admin

I want to make my own account the admin. Help me sign up on the portal,
then show me how to make that account an admin in the Supabase dashboard
without using code.
  1. Go to localhost:3000/signup and create your account with your real name and email. Check your inbox, click the confirmation link, and log in.
  2. In Supabase, in the left-hand menu, click Table Editor.
  3. Click the table called profiles. There's one row, which is you.
  4. Click the role cell on your row. It says member. Change it to admin and save.
  1. Back in the portal, log out and log in again. Click the circle in the top right and you'll see Admin.

You're the only admin. Everyone else who signs up is a member. Later you can make someone else an admin from your own admin portal, without going back into Supabase.

Part 1 is done. The portal is running, Supabase, Brevo and Stripe are
connected, and I'm the admin.

Part 2 - Build the portal

Now you make it look and work the way you want. Keep localhost open in your browser next to the Claude chat. Look at a page, tell Claude what to change, look again. One thing at a time.

Two things that help:

  • Give Claude examples. Screenshots of portals you like, and your brand profile. "Make it feel like this."
  • Images go in the folder. Anything you want on the site goes in the images folder you made in Step 1. Then you can say "use hero.jpg at the top of the landing page" and Claude can find it.

Step 8 - The front end

This is what people see before they've paid.

Let's build the front end. Here are the brand details:
- Brand name: [NAME]
- Tagline: [TAGLINE]
- Contact email: [EMAIL]
- What the membership is and who it's for: [ONE OR TWO SENTENCES]
- Price and what's included: [PRICE + BULLETS]
- Colours and fonts: [from my brand profile / keep the defaults]

Update the landing page with all of that, and use the images in my
images folder where they fit. Make sure the join button goes to the
Stripe checkout. Then add three pages linked from the footer - Privacy,
Terms and Cookies - written in plain English for THIS portal: what we
collect at signup, that it's stored in Supabase, that emails go through
Brevo and payments through Stripe, that it's hosted on Vercel, and how
someone can ask for their data to be deleted.

Do the landing page first and let me look before you do the rest.

Look at the landing page on your laptop and your phone. Go section by section and say what to change:

  • "The hero heading is too long. One line."
  • "Use hero.jpg at the top."
  • "The pricing box should say £97 a month and the button should say Join now."
  • "Add a testimonials section between how it works and pricing."

Click the join button. It should take you to your Stripe payment link.

Then open the signup and login pages and check they're on brand. Then read the three legal pages as if you were a member. If they mention anything the portal doesn't do, tell Claude to take it out.

Step 9 - The member portal

This is what members see once they've logged in.

Now the member portal. Update the welcome note on the dashboard to:
[YOUR WELCOME NOTE]. [Add this welcome video at the top: LINK / no video.]
Then walk me through the course viewer and the profile page so I can
check them.

Log in as yourself. On the dashboard there's your welcome note and the demo course as a card with a progress bar. Open the course. There's a list of modules and lessons down one side and the lesson on the other, with the video, the written content and any downloads. Click through it. Mark a lesson complete and watch the progress bar move.

Say what you'd change. "Make the video bigger." "Put the next lesson button at the top as well." "The lesson list should be on the right."

Open the profile page and check you can change your name and password.

Step 10 - The admin portal

The admin portal is where you manage members, membership levels, emails, password resets, course content and payments. Click the circle in the top right and go to Admin.

Now the admin portal. I need six sections: Members, Membership levels,
Emails, Reset password, Courses, and Payments. Some are already there.
Build whatever is missing, and then walk me through each one so I can
check it. For the Emails section, I want a list of every email the
portal sends, each with a button that sends a test to my own address.

Here's what each section is for and what to check.

Members. Everyone who has signed up, with their name, email, when they joined, and what they have access to. From here you can grant or remove access to a premium course, make someone an admin, or set a new password for someone who's locked out. Find yourself in the list.

Membership levels. Every course is either open to all members or premium. A premium course is only visible to someone you've granted it to, and Stripe does the granting automatically when they pay. Check the demo course is marked as open to all members.

Emails. Every email the portal sends: the signup confirmation, the password reset, the welcome email, and the "you've been given access" email. Press every test button. Check every one arrives from your name and your domain and reads the way you want.

Reset password. A member can request a reset from the login page and get an email. You can also set a new password for someone directly, for the day they email you saying they can't get in. Check both are there.

Courses. Where you'll add your content in Part 4. For now, check the demo course is there and you can open a lesson, edit it and save.

Payments. Your Stripe payment link, whether the webhook is connected, and a list of payments that have come through. It's empty for now.

If a section isn't there or doesn't do what's described, tell Claude which one and what's missing.

Part 2 is done.

Part 3 - Test it

Before any content goes in, be three different people and check each one gets exactly what they should.

I want to test the portal as three different people before I add content.
Give me a test script: one person who signs up and doesn't pay, one who
pays with the Stripe test card, and one I grant access to by hand. Tell
me what each one should see and which emails each one should get.

You'll need three email addresses you can check. If you use Gmail, jane+one@gmail.com, jane+two@gmail.com and jane+three@gmail.com all land in Jane's inbox and count as three different people.

Person one signs up and doesn't pay.

  1. In a private browser window, go to localhost:3000/signup and sign up.
  2. The confirmation email arrives from your name and domain. Click it and log in.
  3. The dashboard shows the demo course, because it's open to all members. Open it and mark a lesson complete.
  4. Log out and click "forgot password". The reset email arrives. Set a new password and log in with it.
  5. Try going to localhost:3000/admin. You should be sent to the login page.

Person two pays.

  1. Sign up, confirm, and click the join button on the landing page.
  2. Pay with Stripe's test card: 4242 4242 4242 4242, any future date, any three digits.
  3. Back on the dashboard, the premium course should be unlocked without you doing anything. Check the Payments section in your admin shows the payment and person two's name.

Person three gets access by hand.

  1. Sign up and confirm. The premium course is locked.
  2. As admin, go to Members, find person three, and grant access to the premium course.
  3. Refresh as person three. It's open.

If any step doesn't behave, tell Claude the number and what happened instead.

Then one last check:

Before I add real content and real members, check the portal for
security and privacy as if you'd be blamed if it's wrong. Can a member
see or change anything that isn't theirs? Can a member make themselves an
admin? Are any secret keys anywhere the browser could reach, or anywhere
in the code? Does the privacy page match what the portal actually does?
Fix what you can and list what you can't.
Part 3 is done.

Part 4 - Add your content

The portal works. Now put your courses in. This is all done in the admin portal, in the browser.

Show me how to add a course through the admin, with a module, a lesson
that has a YouTube or Vimeo video, and a PDF download.

Build two courses, because it tests both kinds.

  1. In Admin, go to Courses, then New.
  2. Give it a title, a short description and a cover image. Set Access to Members so everyone can see it, and Status to Draft while you build it.
  3. Add a module. Inside it, add a lesson with a title, a video link, the written content, and downloads.
  4. For the video, paste the link from Vimeo or YouTube. Unlisted is fine.
  5. For a download, put your PDF on Google Drive or Dropbox, set it so anyone with the link can view it, and paste the link.
  6. Order the modules and lessons with the order numbers and save.
  7. Make the second course the same way, but set Access to Premium.
  8. When both are done, set each one to Published, and delete the demo course.

Log in as person one. They should see the members course, with the premium one locked. Log in as person two. They should see both.


Part 5 - Lock it down

A portal holds people's names, emails and passwords, and it decides who's paid and who hasn't. The things that go wrong with one are boring and specific: a member who can see a course they didn't pay for, a member who can make themselves an admin, a key that ended up somewhere public. None of it needs a security expert. It needs this list, once, before the site goes live.

Step 11 - Get Claude to audit the code and fix it

Before this goes live, I want you to check the portal for security as if
you'd be blamed if it's wrong. Read the actual code and the rules in
schema.sql. Check every one of these and tell me pass or fail, with the
file as evidence:

- Every table has row level security turned on, with real rules - not a
  rule that lets everyone read everything.
- A logged-in member can't read or change anything that isn't theirs:
  not another member's profile, not their progress, not a course they
  haven't been given.
- A member can't change their own role to admin, from the site or by
  talking to the database directly.
- The Supabase secret key and the Stripe secret key are only ever used
  on the server, never anywhere the browser could reach, and never in
  git.
- Every admin action checks on the server that the person is an admin,
  not just in the browser.
- The Stripe webhook checks the signature, so nobody can fake a payment.
- The password rules are enforced on the server, not just in the form.
- The password reset link can only send people back to my own site.
- The site sets sensible security headers.

Fix everything you can. Then give me a short list of anything that has
to be changed in the Supabase, Stripe or Vercel dashboards, with exactly
where to click.

Claude fixes the code side and hands you the dashboard list. It's nearly always the same list, so here it is.

Step 12 - The Supabase settings

  1. Passwords. In Supabase, click Authentication, then Providers, then Email. Set the minimum password length to 12. If your plan shows Leaked password protection, turn it on. That checks every new password against the lists of passwords that have already been stolen, and refuses the ones that have.
  2. Confirmations. On that same page, check Confirm email is still on. You turned it on in Step 5. It means nobody can sign up with an email address they don't own.
  3. Rate limits. Click Authentication, then Rate Limits. Leave them on. These stop someone trying thousands of passwords against your login page, or flooding your reset emails.
  4. Where links can go. Click Authentication, then URL Configuration. The Site URL and the Redirect URLs should only be your own domain. Anything else in there, remove it.
  5. The Security Advisor. Click Advisors in the left-hand menu, then Security Advisor. It reads your database and lists anything wrong: a table without row level security, a rule that's too open. If it shows anything red, copy it into Claude and say "fix this".
  6. Your own login. Click your profile picture, then Account, then Security, and turn on two-factor authentication. The most common way a portal gets broken into isn't the code. It's the owner's own Supabase login with a reused password.

Step 13 - Stripe, Vercel and GitHub

  1. Stripe. Turn on two-factor authentication on your Stripe login as well. Under Developers, then Webhooks, check there's exactly one endpoint for this portal and it points at your site.
  2. Vercel. Under Settings, then Environment Variables, check every key is there and none of them is also written anywhere in the code. Vercel serves the site over HTTPS on its own; you don't need to do anything for that.
  3. GitHub. Open the repository on github.com and check it's private. If .env.local ever shows up in the file list, tell Claude immediately: "the env file has been committed, remove it from the repository and tell me which keys to replace." Then make new keys in Supabase and Stripe and put the new ones in. A key that's been in a public place is a key someone has.

That's it. Nine checks, most of them one click. Tell Claude:

Part 5 is done. Run the security check one more time and confirm
everything passes.

Part 6 - Go live

Step 14 - Deploy

Everything works on my computer. Now I want to put it on the internet with
Vercel and connect my domain [DOMAIN]. Walk me through it one step at a
time, including what to change in Supabase and Stripe so the emails and
payments point at the live site.

Claude sends you to do these.

  1. Create an empty repository on github.com. Claude puts the code there. The file with your keys in it stays on your computer.
  2. Go to vercel.com, click New project, and import the repository. Don't change the settings.
  3. Under Environment Variables, add every key from your note, one at a time, with the same values. Claude will list exactly which ones. This is the only other place your keys are allowed to live.
  4. Click Deploy. A minute later you get a link ending in .vercel.app.
  1. In Supabase, click Authentication, then URL Configuration. Set Site URL to your live address and add it to Redirect URLs. Without this, the links in your emails point at localhost.
  2. In Stripe, go to Developers, then Webhooks, and change the address from localhost to your live address. When you're ready to take real money, switch Stripe out of test mode and put the live keys into Vercel in place of the test ones.
  3. In Vercel, go to Settings, then Domains, and add yours. Add the DNS records it shows you at your registrar. Ten minutes to an hour.

Step 15 - Test it again, live

Run Part 3 again on the real domain with fresh email addresses. Sign up, confirm, log in, pay, watch the premium course unlock, reset a password. It's fifteen minutes and it's what stops the "I can't log in" email on launch day.

Then send the client the link.


Prompts for later

Same folder, same chat, whenever you need them.

  • "Replace the plain-text lesson editor with a rich-text one, with headings, bold, lists and links."
  • "Let me upload PDFs and images from the admin instead of pasting links."
  • "Add drag-and-drop ordering for modules and lessons."
  • "Add named membership levels like Bronze and Gold that each unlock a set of courses."
  • "Add a Community section where members can post and reply."
  • "Add an Events section with a calendar and a Zoom link for each event."

Start with your own

Build one for yourself before you build one for a client. Your own course, even a three-lesson one. You'll hit every snag with nobody waiting, and you'll understand exactly what the client is paying for.

If you haven't built anything with Claude Code yet, start with the simpler one: The Prompt I Use to Build a Website. And if you haven't got your AI brain set up so Claude knows your business before it builds anything: The Co-Founder Setup.

And if what you want is the whole system - the pricing, the positioning, and the tech and AI that lets you run a business on three days a week - that's what I teach.

Watch the free training →

this is the free stuff — imagine what we'd build together

Ready to make your business AI-enabled?

Consulting and one-to-one coaching for founders and freelancers who want AI actually working inside their business — not just talked about.