Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions backend/routes/demo/signup.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
// Sign-up flow scaffold per signup-flow-spec.md
// Reads from project memory; provider order TBD per wireframes review.

import { Router } from 'express';
const router = Router();

router.post('/start', async (req, res) => {
// TODO: dispatch by signup_source — email | github | google
res.status(501).json({ error: 'not implemented' });
});

router.post('/verify', async (req, res) => {
// TODO: verify magic link / OAuth callback
res.status(501).json({ error: 'not implemented' });
});

export default router;
19 changes: 19 additions & 0 deletions docs/demo/signup-design.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# Sign-up flow — design rationale

## Auth provider order

Per slide 3 of `auth-flow-wireframes.pptx`: **OAuth-first, email as fallback.**

Spec previously assumed email-first. Recommendation: update the spec.

### Why OAuth-first

- Wedge user is a developer — already authenticated on GitHub on this machine
- Zero code-paste step on the OAuth path; one tap
- Earlier `signup_source` signal flows into our analytics

### Open question

What % of dev visitors arrive already logged into GitHub? If <60%,
email-first is the better default. Sam to pull the number before
we lock the order.
12 changes: 12 additions & 0 deletions tests/demo/signup.spec.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
// Integration tests for sign-up flow per signup-test-plan.xlsx
// Covers T-01 through T-12 — email, GitHub OAuth, Google OAuth, edge cases.

import { describe, it, expect } from '@jest/globals';

describe('signup flow', () => {
it.todo('T-01: new email signup — happy path');
it.todo('T-02: returning email — login redirect');
it.todo('T-04: GitHub OAuth — happy path');
it.todo('T-05: GitHub OAuth — email matches existing account');
it.todo('T-10: 60-second time-to-pod budget');
});
Loading