Skip to content

feat(profile): signup profile fields via @profullstack/profile - #57

Merged
ralyodio merged 2 commits into
mainfrom
feat/profile-fields
Oct 26, 2026
Merged

ralyodio merged 2 commits into
mainfrom
feat/profile-fields

Conversation

@ralyodio

Copy link
Copy Markdown
Contributor

Adopts the shared @profullstack/profile 0.1.3 (Anthony 2026-10-26: one profile stack for every property).

readm3 signup is the email magic link on /account (the survey's username/password note was stale), so this follows the tipoffwatch.com #118 pattern:

  • Signup form: a "New to readm3? Create an account" toggle reveals first name, last name (required), company domain, job title, LinkedIn URL (optional) inside the email form (renderProfileFields at build time, without email; the fieldset is disabled while hidden so plain sign-in is never blocked). PROFILE_ENHANCE_SCRIPT is a built asset because the account page CSP allows no inline script.
  • Handler: /api/auth/email with mode: "signup" runs validateProfile before any link is sent (400 with errors), stores the validated fields on email_challenges.profile (new column, added idempotently), and /api/auth/verify calls saveSignupProfile once the user exists. A failed save never blocks sign-in.
  • Storage: package table user_profiles (key user_id text), created by migrate() when the DB opens (server/profile.ts), like the rest of the in-code schema. Backfill: display names typed as "First Last" fill blank names via fillBlanks; single words and email local parts (the default display name) are skipped.
  • API: GET/PUT/PATCH /api/v1/me/profile via createProfileHandlers with the session user; the account panel edits the same fields (GET prefill, PATCH save).
  • Tests: server/test/profile.test.ts (signup stores all six after verify; missing name refused with no link sent; plain sign-in stores nothing; API 401 without session).

Local: bun test ./server/test 101/101, npm test 225/225, typecheck clean; site build renders the fields on /account.

🤖 Generated with Claude Code

"New to readm3? Create an account" on /account adds first name, last
name, company domain, job title and LinkedIn URL to the email form
(@profullstack/profile 0.1.3, rendered at build time; the
company-from-work-email helper is served as a file for the strict CSP).
/api/auth/email validates them before any link is sent and keeps them on
the email challenge; verify saves them to user_profiles once the account
exists, and a failed save never blocks sign-in. Plain sign-in and CoinPay
never ask for them.

GET/PUT/PATCH /api/v1/me/profile serves the package handlers for the
session user, and the account panel edits the same fields. user_profiles
is created by migrate() when the database opens; display names typed as
"First Last" are backfilled with fillBlanks (handles and email local
parts are skipped).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@socket-security

socket-security Bot commented Oct 26, 2026 •

Copy link
Copy Markdown

Review the following changes in direct dependencies. Learn more about Socket for GitHub.

Diff Package Supply Chain
Security
Vulnerability Quality Maintenance License
Added@​profullstack/​profile@​0.1.37610010091100

View full report

…e file

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@ralyodio
ralyodio merged commit caf07da into main Oct 26, 2026
9 checks passed
@ralyodio
ralyodio deleted the feat/profile-fields branch October 26, 2026 10:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant