Next

Prompt an agent for a 3-step signup form

Vibe codingEasy12 min

Your task

Your app is React with TypeScript, and you need a signup form in 3 steps: email, then password, then a display name. The last time someone asked an agent for "a signup form", it wrote its own validation code, ignored your component library and could not be used with a screen reader.

Write the prompt you would give the agent.

What you know:

  • the repo uses react-hook-form with Zod, and the Field and Button components from src/ui
  • src/features/profile/EditProfileForm.tsx is a form the team likes
  • passwords need at least 12 characters, with at least 1 letter and 1 digit
  • display names are 2 to 30 characters
  • the API is POST /api/signup with { email, password, displayName }, and it returns 409 if the email is taken