Apply Voight-Kampff design treatment to landing and dashboard #17

Open
romaine-life-app[bot] wants to merge 2 commits from voight-kampff-design into main
romaine-life-app[bot] commented 2026-05-15 21:41:57 -07:00 (Migrated from github.com)

Summary

Rebuilds src/server.ts rendering from the Claude Design handoff bundle's Voight-Kampff Auth.html prototype. Every Better Auth flow, session, and admin endpoint is preserved — only the rendered HTML/CSS/JS changes, plus one additive route to expose the already-configured Google provider.

The existing landing already had the Voight-Kampff identity; this PR brings the prototype's full design system in (tank-operator chrome + VK motifs, design tokens, all six dashboard sections, atmosphere details like the empathy prompt cycler and off-world ticker).

Visual / structural changes

  • Topbar: brand mark + "Tyrell · Authentication Division" lockup, live UTC clock, online/pending status dot
  • Anonymous landing: animated iris, rotating empathy prompt cycler (six original VK-style questions), MS + Google sign-in stack
  • Sign-in overlay (cosmetic): on form submit, JS shows an iris-scan + PKCE/state/JWT terminal log for ~1s before the form actually posts. Degrades gracefully without JS.
  • Authenticated dashboard:
    • NEXUS-7 designation row keyed off real user.id and createdAt
    • Role badge (Citizen / Blade Runner / Awaiting Review)
    • Provenance — linked accounts with provider glyphs
    • Prior Interrogations — recent sessions with this-session pill
    • Authorized Modules — grid of six *.romaine.life subdomains, granted/no-prefs state derived from the user's apps JSON blob, tile links to the actual subdomain
    • Subject Profile — decoded ↔ raw JWT tabs, copy-to-clipboard
  • Footer: /api/auth/* deep-links, source link, off-world emigration ticker. Fixed pyramid corner sigil.
  • The prototype's Tweaks panel is intentionally not shipped — it's design tooling, not a production affordance.

Functional additions

  • POST /sign-in/google and GET /sign-in/google?callbackURL=…, mirroring the Microsoft handler. Google is already configured as a Better Auth social provider in auth.ts; this exposes a route so the dashboard's Google button works (and so downstream apps can use Google for cross-app sign-in like they already do for Microsoft).
  • Microsoft + Google now share a single socialSignInRedirect helper.
  • Admin console (/admin) reuses the shared chrome — same iris-mini header, sections, and form styling as the dashboard.

What's preserved (no changes)

  • src/auth.ts, src/db/*, auth.api.signInSocial / signOut flow
  • Trusted-origin allowlist, CORS middleware, cookie scoping
  • /admin gating, validation, and update/enroll logic
  • Env-var contract, Dockerfile, Helm wiring, drizzle config
  • All routes mounted at /api/auth/*, /health, /ready

Test plan

  • npm run typecheck passes (verified locally — clean)
  • npm run build produces dist/server.js (verified locally — clean)
  • Anonymous load of / renders the landing (iris, empathy prompt cycler ticks every 9s, both sign-in buttons, off-world ticker animates, UTC clock updates each second)
  • Clicking Microsoft / Google sign-in triggers the iris-scan overlay, then redirects to the IdP — and the cookies still arrive (PKCE state-mismatch check)
  • Authenticated load of / shows the dashboard with all four sections populated; decoded↔raw tab toggles; copy button briefly shows "copied"
  • Authorized Modules tiles link out to the right subdomain; granted tiles glow when user.apps contains their key
  • /admin reachable as admin, returns 403 otherwise; user/role/apps edits still persist
  • prefers-reduced-motion: reduce kills animations
## Summary Rebuilds `src/server.ts` rendering from the [Claude Design handoff bundle](https://api.anthropic.com/v1/design/h/TEqgCL7Ere_j_jZ0b-KuwQ?open_file=Voight-Kampff+Auth.html)'s `Voight-Kampff Auth.html` prototype. Every Better Auth flow, session, and admin endpoint is preserved — only the rendered HTML/CSS/JS changes, plus one additive route to expose the already-configured Google provider. The existing landing already had the Voight-Kampff identity; this PR brings the prototype's full design system in (tank-operator chrome + VK motifs, design tokens, all six dashboard sections, atmosphere details like the empathy prompt cycler and off-world ticker). ## Visual / structural changes - **Topbar**: brand mark + "Tyrell · Authentication Division" lockup, live UTC clock, online/pending status dot - **Anonymous landing**: animated iris, rotating empathy prompt cycler (six original VK-style questions), MS + Google sign-in stack - **Sign-in overlay** (cosmetic): on form submit, JS shows an iris-scan + PKCE/state/JWT terminal log for ~1s before the form actually posts. Degrades gracefully without JS. - **Authenticated dashboard**: - NEXUS-7 designation row keyed off real `user.id` and `createdAt` - Role badge (Citizen / Blade Runner / Awaiting Review) - **Provenance** — linked accounts with provider glyphs - **Prior Interrogations** — recent sessions with this-session pill - **Authorized Modules** — grid of six `*.romaine.life` subdomains, granted/no-prefs state derived from the user's `apps` JSON blob, tile links to the actual subdomain - **Subject Profile** — decoded ↔ raw JWT tabs, copy-to-clipboard - **Footer**: `/api/auth/*` deep-links, source link, off-world emigration ticker. Fixed pyramid corner sigil. - The prototype's **Tweaks panel** is intentionally not shipped — it's design tooling, not a production affordance. ## Functional additions - `POST /sign-in/google` and `GET /sign-in/google?callbackURL=…`, mirroring the Microsoft handler. Google is already configured as a Better Auth social provider in `auth.ts`; this exposes a route so the dashboard's Google button works (and so downstream apps can use Google for cross-app sign-in like they already do for Microsoft). - Microsoft + Google now share a single `socialSignInRedirect` helper. - **Admin console** (`/admin`) reuses the shared chrome — same iris-mini header, sections, and form styling as the dashboard. ## What's preserved (no changes) - `src/auth.ts`, `src/db/*`, `auth.api.signInSocial` / `signOut` flow - Trusted-origin allowlist, CORS middleware, cookie scoping - `/admin` gating, validation, and update/enroll logic - Env-var contract, Dockerfile, Helm wiring, drizzle config - All routes mounted at `/api/auth/*`, `/health`, `/ready` ## Test plan - [ ] `npm run typecheck` passes (verified locally — clean) - [ ] `npm run build` produces `dist/server.js` (verified locally — clean) - [ ] Anonymous load of `/` renders the landing (iris, empathy prompt cycler ticks every 9s, both sign-in buttons, off-world ticker animates, UTC clock updates each second) - [ ] Clicking Microsoft / Google sign-in triggers the iris-scan overlay, then redirects to the IdP — and the cookies still arrive (PKCE state-mismatch check) - [ ] Authenticated load of `/` shows the dashboard with all four sections populated; decoded↔raw tab toggles; copy button briefly shows "copied" - [ ] Authorized Modules tiles link out to the right subdomain; granted tiles glow when `user.apps` contains their key - [ ] `/admin` reachable as admin, returns 403 otherwise; user/role/apps edits still persist - [ ] `prefers-reduced-motion: reduce` kills animations
This pull request has changes conflicting with the target branch.
  • src/server.ts
View command line instructions

Manual merge helper

Use this merge commit message when completing the merge manually.

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin 'voight-kampff-design:voight-kampff-design'
git switch 'voight-kampff-design'
Sign in to join this conversation.
No description provided.