Skip to content

E31 — Google sign-in, self-serve workspaces and first-run tours #1396

Backlog
0 of 12 issues completed
Backlog

Description

@athvin

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)

  1. Staff means super admin. A Google sign-in is staff only when Google's hd claim is dupezero.com, the email domain is dupezero.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.
  2. 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).
  3. 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".
  4. 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.
  5. Where the cinematic look goes. The marketing look (brand blue, the Meridian Supply story, scenes) extends to login, /welcome, /join and 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:

  1. Identity found: a returning user.
  2. Staff: super admin.
  3. Invite link: /join.
  4. A pending invite matching the email: /join.
  5. A password account with the same email: refuse, and point them to linking. Never auto-link.
  6. 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

Rollout

Three flags, so each feature can be switched off without a deploy:

  • ERWEB_GOOGLE_SSO_ENABLED
  • ERWEB_SELF_SERVE_SIGNUP_ENABLED
  • ERWEB_TOURS_ENABLED

Turn them on in dev first, then in prod one at a time (#1408).

Risks to watch

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.

Sub-issues

Sub-issues

0 of 12 Issues completed
Loading 12 sub-issues

Metadata

Metadata

Assignees

No one assigned

    Labels

    epicpost-mvp

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions