1.4 KiB
1.4 KiB
0014 Registration step 5 on the session, with a server draft
Status: Proposed · Area: architecture · Date: 2026-10-05 · Decided by: agent
Context
Step 5 (profile completion) runs after the account exists, so it can't sit behind GuestGuard like the other (auth) steps (0013). The design autosaves a creator's profile and lets them resume after a login, but the API had no draft: any save completed the profile. The user chose to fix the back end first.
Decision
- Serve step 5 at
/onboarding/creator-profileand/onboarding/investor-profileunder(onboarding), rendered only in the browser behindAuthGuardwith the role, behind a same-size skeleton, withnoindex. - A creator's step 5 autosaves through
PATCH /traders/me/profile(a draft, markets may be empty) and ends only withPOST /traders/me/profile/complete;profileCompleteneeds that call. - An investor's step 5 saves nothing until «ذخیره و ورود» (
PUT /users/profile/avatar, thenPATCH /users/profilewithinterests).
Alternatives
- Autosave with
PUT: rejected; it completes the profile at the first market, so resume after login breaks. - Keep the draft in local storage: rejected; it would hold profile data in the browser and not follow the creator to another device.
Consequences
- Login lands an unfinished creator on step 5 until they complete it (
profileCompleteis false). - Posting and tiers stay locked by the back end until completion.