Repository navigation
Description
Goal
dupezero.com gets a front door. People sign in with Google, and each of them is sent down the right path. Each first-timer is also offered an interactive tour for the situation they're actually in. All of it carries the cinematic look of the marketing site.
This reverses part of the 2026-11-26 board prune. That prune cut SSO (#559, #560) and the app UI to focus on the API. The owner reopened this area on 2026-11-28. #559 and #560 stay closed and are superseded by this epic.
Owner decisions (2026-11-28)
- Staff means super admin. A Google sign-in is staff only when Google's
hdclaim isdupezero.com, the email domain isdupezero.com, and the email is verified. The address alone is never enough. Only dupezero.com counts;[email protected]keeps its password login and its manual grant. - Self-serve signup. Someone who isn't staff and has no invite gets an instant self-serve workspace and becomes its admin on a free allowance. Signup is Google only, because production can't send verification mail (Prod SES + observability: envs/prod has neither — invites and password resets drop silently #939, Flip prod mail backend to SES in values-prod.yaml — gated on the production-access grant #943).
- Members are recognised two ways. A person joining an existing workspace is recognised by an invite link, or by their Google-verified email matching a pending invite. An admin can just add an email and say "sign in with Google".
- Two tours.
- Founder: "build it", on Meridian sample data, ending at an API key.
- Member: "find your way", on the workspace's real data, shaped by their role.
- Where the cinematic look goes. The marketing look (brand blue, the Meridian Supply story, scenes) extends to login,
/welcome,/joinand the tour intro card. Coachmarks inside the app stay grayscale.
The core distinction
| Member: first time in an existing workspace | Founder: first time, no workspace yet | |
|---|---|---|
| What's true | A workspace exists, and an admin invited this email with a role | No workspace, and no invite matches their verified email |
| Must NOT see | "Create a workspace", which would split their company into a duplicate tenant | A dead end, when signup is on |
| Flow | /join: "You're joining Acme as steward, invited by Dana" |
/welcome: name it, choose people or accounts, watch it provision |
| Role | The invite's role | Admin of the new workspace |
| Tour | Member tour (real data, role-aware, read-only for viewers) | Founder tour (sample data, the full loop, ending at the API) |
| "First time" is per | (user, workspace): a returning user who joins a second workspace is first-time there | user, at creation |
The first-sign-in router runs these checks in strict order and stops at the first match:
- Identity found: a returning user.
- Staff: super admin.
- Invite link:
/join. - A pending invite matching the email:
/join. - A password account with the same email: refuse, and point them to linking. Never auto-link.
- Otherwise:
/welcome, or "ask your admin" if signup is off.
Children
| # | Ticket | Est. (wk) |
|---|---|---|
| 1 | #1397 Google OAuth client, secrets and the public origin | 0.5 |
| 2 | #1398 Identity schema and password-less users | 0.5 |
| 3 | #1399 Sign in with Google: the core OIDC flow | 1.5 |
| 4 | #1400 First-sign-in router and joining an existing workspace | 1.0 |
| 5 | #1401 Staff rule: a dupezero.com Workspace account becomes super admin | 0.5 |
| 6 | #1402 Self-serve workspace provisioning (founder path) | 1.5 |
| 7 | #1403 Cinematic login, /welcome and /join |
1.5 |
| 8 | #1404 First-run state and the tour offer, per user per workspace | 0.5 |
| 9 | #1405 Tour engine: in-app coachmarks | 1.0 |
| 10 | #1406 Founder tour, "build it" | 1.0 |
| 11 | #1407 Member tour, "find your way" | 1.0 |
| 12 | #1408 Release: flags on in prod, four-path smoke test | 0.5 |
The total is about 11.5 engineer-weeks. Estimate the children only; the parent isn't summed.
Sequencing
- Start right away, in parallel:
- Google OAuth client, secrets and the prod public origin #1397, which has human lead time: Google branding review;
- Identity schema and password-less users (erweb.identities) #1398;
- Tour engine: in-app coachmarks that follow real actions #1405, the engine, which needs no auth.
- Then the sign-in chain: Sign in with Google: the core OIDC flow (start, callback, linking, mock IdP) #1399 → First-sign-in router: join an existing workspace vs found a new one #1400 → Staff rule: a dupezero.com Google Workspace account becomes super admin #1401 and Self-serve workspace provisioning for founders (backend) #1402.
- UI (Cinematic login, /welcome (founder) and /join (member) screens #1403) once First-sign-in router: join an existing workspace vs found a new one #1400 and Self-serve workspace provisioning for founders (backend) #1402 land. The login restyle can start after Sign in with Google: the core OIDC flow (start, callback, linking, mock IdP) #1399.
- The tours (Founder tour "build it": Meridian sample data through to a working API call #1406, Member tour "find your way": role-aware tour of a workspace's real data #1407) after First-run state and the tour offer, per user per workspace #1404 and Tour engine: in-app coachmarks that follow real actions #1405.
- Release: Google sign-in, signup and tours on in prod (four-path smoke test) #1408 last.
Rollout
Three flags, so each feature can be switched off without a deploy:
ERWEB_GOOGLE_SSO_ENABLEDERWEB_SELF_SERVE_SIGNUP_ENABLEDERWEB_TOURS_ENABLED
Turn them on in dev first, then in prod one at a time (#1408).
Risks to watch
- Duplicate tenants. A colleague who is never invited will found a second "Acme". Company-domain claim and request-to-join were deliberately left out; revisit if this shows up in the audit (
auth.first_signin path=founderfor a domain that already has a workspace). - Abuse of free workspaces. Mitigated by Google-only signup, one workspace per person, a daily cap and WAF rate rules (Self-serve workspace provisioning for founders (backend) #1402).
- Provisioning time drives the
/welcomescene. Measure it in Self-serve workspace provisioning for founders (backend) #1402 before tuning Cinematic login, /welcome (founder) and /join (member) screens #1403. ER_PROVISION_MODEin prod is unverified, and without it every signup returns 503 (Self-serve workspace provisioning for founders (backend) #1402, step 7).
Design references
.claude/skills/frontend-design-system/references/frontend-design.md§2.4, the 2026-10-02 SSO design. It is amended by decisions 2 and 3: auto-provisioning is now allowed for founders, and email matching now works on pending invites only, never on existing accounts..claude/skills/infra-platform/references/plan-to-aws.md, Track S.- Skills:
security(authn and session),frontend-bff,stageshow,landing-page,frontend-testing.
Activity
athvin commentedon Nov 29, 2026
Deferred follow-up: #1411 covers revisiting duplicate workspaces per company and the 12-hour staff session once this epic has shipped and there is usage data. It sits at the back of the backlog.