Add public profile pages: Free AI Prompt | SheCodes

Free AI prompt · The Code Book

Add public profile pages

A ready-to-use prompt from the chapter User Profiles. Paste it into Claude, ChatGPT, Lovable, Bolt or any AI coding tool.

The prompt

“Add a public profile page at /profile/[username]. When someone visits /profile/maya, show that user's photo, display name, bio, and website link. Below that, show a list of all the posts they've shared. Make sure private info like their email is never visible. If the username doesn't exist, show a friendly "User not found" page.”

How to use it

  1. Fill in the blanks with your own details, so the AI builds your project, not a generic one.
  2. Copy the prompt and paste it into your AI coding tool.
  3. Check the result in the preview, then ask for changes one at a time: "make the buttons bigger", "use my brand colours".
  4. Read the chapter to understand why it works and what to do next.

More prompts like this

All prompts

Build the settings page

“Add a /settings page where the logged-in user can edit their profile. Let them change their display name, write a short bio (with a 200 character limit), and add a website link. Pre-fill the form with whatever they already saved. When they hit Save, show a green "Saved!" message. If they're not logged in, send them to the login page.”

Add avatar upload

“On the settings page, let users upload a profile photo. Show their current photo (or a default circle with their initials if they don't have one). When they pick a new photo, only allow image files under 2MB, show a preview right away, and save it so it shows up everywhere their name appears in the app.”

Add a preferences section

“On my settings page, add a Preferences section with three toggles: dark mode, email notifications, and marketing emails. Save changes instantly when the user flips a toggle (no Save button needed). Show a small checkmark next to the toggle for 2 seconds so they know it saved.”

Username availability check

“On the username field in my signup form, check if the username is already taken as the user types. If it's taken, show a red "already taken" message. If it's available, show a green checkmark. Wait until they pause typing for half a second before checking, so it doesn't check every keystroke.”

Add a follow button

“On the public profile page, add a Follow button. When a logged-in user clicks it, they start following that person. The button changes to "Following" and clicking again unfollows. Show the follower count and following count on each profile.”

Account deletion

“In settings, add a "Delete my account" button at the very bottom. When clicked, show a confirmation dialog asking the user to type their username to confirm. On confirm, delete their account and all their data, sign them out, and send them to the homepage with a goodbye message.”