mirror of
https://github.com/profullstack/logicsrc.git
synced 2026-12-01 17:24:48 +00:00
feat(pwa): signup profile fields via @profullstack/profile (#256)
The create-account form (/?mode=up) asks for first/last name (required) and company domain, job title, LinkedIn (optional) beside the email box, rendered by renderProfileFields. /auth/register validates them with validateProfile before the user exists and stores them with saveSignupProfile in a new user_profiles table keyed by users.id. GET/PUT/PATCH /api/v1/me/profile (session cookie) and a "Your details" card on /settings. Sign-in, passkey and CoinPay are unchanged. Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
ff0c903c6d
commit
50eb8ac30d
10 changed files with 230 additions and 6 deletions
17
apps/pwa/src/migrations/006_user_profiles.sql
Normal file
17
apps/pwa/src/migrations/006_user_profiles.sql
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
-- The signup profile (@profullstack/profile): email, first/last name, company
|
||||
-- domain, job title, LinkedIn URL, keyed by users.id. Its own table so the
|
||||
-- display_name teammates see stays as it is. No backfill: display_name holds
|
||||
-- an email local-part or "logicsrc user", not a person's name.
|
||||
create table if not exists "user_profiles" (
|
||||
"user_id" text primary key,
|
||||
"email" text,
|
||||
"first_name" text,
|
||||
"last_name" text,
|
||||
"company_domain" text,
|
||||
"job_title" text,
|
||||
"linkedin_url" text,
|
||||
"created_at" text not null default (strftime('%Y-%m-%dT%H:%M:%fZ','now')),
|
||||
"updated_at" text not null default (strftime('%Y-%m-%dT%H:%M:%fZ','now'))
|
||||
);
|
||||
create index if not exists "user_profiles_email" on "user_profiles" (lower("email"));
|
||||
create index if not exists "user_profiles_company_domain" on "user_profiles" ("company_domain");
|
||||
Loading…
Add table
Add a link
Reference in a new issue