Registration page in the generated frontend
- Dominant language
- Go
- Stars
- 0
- Forks
- 0
- Avg merge
- 3h 18m
- Merged PRs (30d)
- 26
Description
#11/#17 shipped `/login`, logout and `GET /users/me` through the typed client, and deliberately left registration, e-mail confirmation and password reset out (spec *Scope*). Today the only way to get an account in a fresh project is `curl localhost:8080/users/register` — there is no page for it.
**Scope**
- `app/register/page.tsx` + form (Mantine, `useActionState`, same shape as `app/login/login-form.tsx`) posting to a server action that calls `api.users.registerUser({ body: { email, password } })`.
- Handle the documented outcomes: 202 → a "check your e-mail" state; 409 (`ErrEmailTaken`) and 400 (`ErrPasswordTooShort`, `ErrEmailRequired`) surfaced as the form error, like login does with `error.detail`.
- Link from `/login` ("Create an account") and back.
- In a relaxed env (`ENV=dev`/`test`) the backend returns the confirmation token in the response; decide whether the page shows a "confirm now" shortcut using it or just tells the user to confirm — either way, an unconfirmed account can already log in locally, so the happy path works without a mailer.
- Tests mirroring `app/actions.test.ts` / `app/page.test.tsx`: success state, 409 and 400 errors, link presence.
**Out of scope here:** e-mail confirmation and password-reset pages (`confirm-user-email`, `request-password-reset`, `confirm-password-reset` exist in the client and deserve their own issue), and any seeded test user.
Related: #11, #17.
Contributor guide
No contributing guide indexed for this repository
Research direction
Start with app/login/login-form.tsx and the existing patterns in app/actions.test.ts and app/page.test.tsx, then add the registration page at app/register/page.tsx using the typed client call described in the issue. Done means the login page links to registration and back, success shows the documented confirmation state, 409 and 400 responses surface as form errors, and the listed tests cover these outcomes.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- next.js, react, typescript
- Domain
- authentication, frontend
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 76/100