|
| 1 | +# ssowhat.dev — Design System |
| 2 | + |
| 3 | +## Direction |
| 4 | + |
| 5 | +Protocol trace visualizer for engineers evaluating SSO integration patterns. The interface should feel like a well-annotated packet capture — dense with information but organized so you can follow the thread. Technical but not oppressive. Focused, not warm or cold. |
| 6 | + |
| 7 | +## Signature |
| 8 | + |
| 9 | +The dual-pane "what-you-see / what-really-happened" layout — each step shows a browser mockup alongside the HTTP-level dissection. This protocol-trace-as-narrative structure is unique to this product. |
| 10 | + |
| 11 | +## Identity |
| 12 | + |
| 13 | +Black substrate. White keyhole+skull SVG mark (Megadeth-meets-auth-glyph). Chromatic aberration glitch on the wordmark: `text-shadow: 2px 0 #ff0000, -2px 0 #00ff00`. The tagline is monospace, tracking-widest, uppercase — reads like a terminal banner. |
| 14 | + |
| 15 | +``` |
| 16 | +Title: font-black tracking-tighter uppercase italic |
| 17 | +Tagline: font-mono text-sm tracking-widest uppercase text-gray-400 |
| 18 | +Mark: white keyhole silhouette, black skull inset, 400x400 SVG |
| 19 | +``` |
| 20 | + |
| 21 | +## Token System (app.css) |
| 22 | + |
| 23 | +All colors flow through semantic tokens defined in `@theme`. Never use raw `gray-*` utilities in demo components — use the tokens below. |
| 24 | + |
| 25 | +### Surfaces (elevation scale) |
| 26 | + |
| 27 | +| Token | Value | Usage | |
| 28 | +|---|---|---| |
| 29 | +| `canvas` | `gray-950` | Page background, deepest layer | |
| 30 | +| `surface` | `gray-900` | Panels, cards, containers | |
| 31 | +| `surface-raised` | `gray-800` | Elevated elements: buttons, kbd, controls | |
| 32 | +| `code-surface` | `rgba(0,0,0,0.3)` | Code blocks, pre elements | |
| 33 | +| `code-surface-deep` | `rgba(0,0,0,0.4)` | Expanded payload code blocks | |
| 34 | + |
| 35 | +### Text hierarchy |
| 36 | + |
| 37 | +| Token | Value | Usage | |
| 38 | +|---|---|---| |
| 39 | +| `ink` | `gray-100` | Primary text, headings | |
| 40 | +| `ink-secondary` | `gray-300` | Secondary text, descriptions | |
| 41 | +| `ink-tertiary` | `gray-400` | Labels, metadata, section headers | |
| 42 | +| `ink-muted` | `gray-500` | Muted labels, separators, version strings | |
| 43 | + |
| 44 | +### Borders |
| 45 | + |
| 46 | +| Token | Value | Usage | |
| 47 | +|---|---|---| |
| 48 | +| `edge` | `rgba(255,255,255,0.08)` | Standard borders, dividers | |
| 49 | +| `edge-emphasis` | `rgba(255,255,255,0.14)` | Hover borders, dashed inactive borders | |
| 50 | + |
| 51 | +### Accent |
| 52 | + |
| 53 | +| Token | Value | Usage | |
| 54 | +|---|---|---| |
| 55 | +| `accent` | `blue-400` | Links, active indicators, interactive elements | |
| 56 | +| `accent-dim` | `rgba(96,165,250,0.15)` | Accent backgrounds | |
| 57 | + |
| 58 | +## Depth Strategy |
| 59 | + |
| 60 | +Borders-only. No drop shadows on containers. The `border-edge` token at 8% white opacity creates whisper-quiet separation. `shadow-*` is reserved for: |
| 61 | +- The browser mockup (`shadow-2xl`) |
| 62 | +- Active actor pills in the protocol stack (gradient backgrounds get `shadow-md`/`shadow-lg`) |
| 63 | +- The "Next" button (`shadow-md shadow-blue-500/20`) |
| 64 | +- The step badge (`shadow-lg shadow-blue-500/20`) |
| 65 | + |
| 66 | +## Spacing |
| 67 | + |
| 68 | +Base unit: 4px (Tailwind default). Consistent use of `gap-*`, `p-*`, `space-y-*` multiples. |
| 69 | + |
| 70 | +Primary spacers: 8px (`gap-2`, `p-2`), 12px (`gap-3`, `p-3`), 16px (`gap-4`, `p-4`), 24px (`gap-6`, `p-6`). |
| 71 | + |
| 72 | +## Typography |
| 73 | + |
| 74 | +System sans-serif (Inter) for UI. Monospace (`font-mono`) for: |
| 75 | +- URLs, HTTP methods, status codes |
| 76 | +- Headers, request/response bodies |
| 77 | +- Protocol labels, version strings |
| 78 | +- kbd elements, inline code |
| 79 | + |
| 80 | +### Heading scale |
| 81 | + |
| 82 | +``` |
| 83 | +h1: text-3xl font-semibold tracking-tight text-ink (page) |
| 84 | + text-3xl font-bold tracking-tight text-ink (demo shell) |
| 85 | +h2: text-lg font-semibold text-ink (cards, sections) |
| 86 | + text-xl font-bold text-ink (transcript steps) |
| 87 | +h3: text-xs font-semibold uppercase tracking-wider text-ink-muted (section labels) |
| 88 | +``` |
| 89 | + |
| 90 | +### Body text |
| 91 | + |
| 92 | +``` |
| 93 | +Body: text-sm leading-relaxed text-ink-secondary |
| 94 | +Caption: text-xs text-ink-muted |
| 95 | +Code: rounded bg-surface-raised px-1.5 py-0.5 font-mono text-xs |
| 96 | +``` |
| 97 | + |
| 98 | +## Semantic HTTP Colors (sso-demo-theme.css) |
| 99 | + |
| 100 | +These are domain-specific — not generic status colors: |
| 101 | + |
| 102 | +| Token | Value | Meaning | |
| 103 | +|---|---|---| |
| 104 | +| `http-request` | `blue-500` | Browser -> server requests | |
| 105 | +| `http-response` | `emerald-500` | Server -> browser responses | |
| 106 | +| `http-server` | `purple-500` | Server-to-server communication | |
| 107 | +| `http-internal` | `gray-500` | Internal processes | |
| 108 | + |
| 109 | +Each has a `-dim` variant (40% opacity via `color-mix`) for backgrounds. |
| 110 | + |
| 111 | +## Actor Colors (sso-demo-theme.css) |
| 112 | + |
| 113 | +Per-actor colors with `-600` and `-700` shades for gradients: |
| 114 | +- `actor-browser`: slate-600 |
| 115 | +- `actor-caddy`: lime-600 |
| 116 | +- `actor-logto`: purple-500 |
| 117 | +- `actor-entra`: cyan-500 |
| 118 | +- `actor-okta`: indigo-500 |
| 119 | +- `actor-google`: rose-500 |
| 120 | +- `actor-ots`: red-500 |
| 121 | + |
| 122 | +## Motion |
| 123 | + |
| 124 | +`transition-colors` is the dominant transition — used on buttons, links, containers. Physical motion is reserved: |
| 125 | +- `hover:scale-105` on actor pills only |
| 126 | +- `hover:translateY(-2px)` on identity/brand CTA only |
| 127 | +- `motion-reduce:transition-none` applied consistently on all interactive elements |
| 128 | + |
| 129 | +## Component Patterns |
| 130 | + |
| 131 | +### Buttons — Primary (CTA) |
| 132 | + |
| 133 | +``` |
| 134 | +bg-blue-600 px-5 py-2 text-sm font-semibold text-white |
| 135 | +shadow-md shadow-blue-500/20 |
| 136 | +hover:bg-blue-500 |
| 137 | +disabled:bg-surface-raised disabled:text-ink-muted disabled:shadow-none |
| 138 | +``` |
| 139 | + |
| 140 | +### Buttons — Secondary (ghost) |
| 141 | + |
| 142 | +``` |
| 143 | +border border-edge bg-transparent px-4 py-2 text-sm font-medium text-ink-secondary |
| 144 | +hover:border-edge-emphasis hover:bg-surface-raised hover:text-ink |
| 145 | +disabled:cursor-not-allowed disabled:border-edge disabled:text-ink-muted |
| 146 | +``` |
| 147 | + |
| 148 | +### Buttons — Tertiary (toggle, inactive) |
| 149 | + |
| 150 | +``` |
| 151 | +border border-edge bg-transparent px-3 py-2 text-xs font-medium text-ink-tertiary |
| 152 | +hover:border-edge-emphasis hover:text-ink-secondary |
| 153 | +``` |
| 154 | + |
| 155 | +### Buttons — Tertiary (toggle, active) |
| 156 | + |
| 157 | +Semantic color borders at reduced opacity: |
| 158 | + |
| 159 | +``` |
| 160 | +border-blue-500/50 bg-blue-900/30 text-blue-400 |
| 161 | +border-red-500/50 bg-red-900/30 text-red-400 (stop/danger) |
| 162 | +border-amber-500/50 bg-amber-900/30 text-amber-400 (mode toggle) |
| 163 | +``` |
| 164 | + |
| 165 | +### Containers |
| 166 | + |
| 167 | +``` |
| 168 | +rounded-lg border border-edge bg-surface p-4 |
| 169 | +``` |
| 170 | + |
| 171 | +### Section headers |
| 172 | + |
| 173 | +``` |
| 174 | +text-xs font-semibold uppercase tracking-wider text-ink-muted |
| 175 | +``` |
| 176 | + |
| 177 | +### Tags / badges |
| 178 | + |
| 179 | +``` |
| 180 | +rounded border border-edge bg-surface-raised px-2 py-0.5 font-mono text-xs text-ink-tertiary |
| 181 | +``` |
| 182 | + |
| 183 | +### Kbd (keyboard shortcuts) |
| 184 | + |
| 185 | +``` |
| 186 | +rounded bg-surface-raised px-1.5 py-0.5 font-mono |
| 187 | +``` |
| 188 | + |
| 189 | +### Actor pills |
| 190 | + |
| 191 | +``` |
| 192 | +rounded-full border-2 px-3 py-1 text-xs font-semibold |
| 193 | +Active: ${colorInfo.bgClass} ${colorInfo.borderClass} ${colorInfo.textClass} scale-105 shadow-lg |
| 194 | +``` |
| 195 | + |
| 196 | +### Step indicators |
| 197 | + |
| 198 | +``` |
| 199 | +Completed: h-5 w-5 bg-emerald-500 rounded-full (checkmark SVG) |
| 200 | +Current: h-5 w-6 bg-blue-500 ring-2 ring-blue-300 ring-offset-2 ring-offset-surface |
| 201 | +Pending: h-5 w-5 border-2 border-dashed border-edge-emphasis bg-surface-raised |
| 202 | +``` |
| 203 | + |
| 204 | +### Links |
| 205 | + |
| 206 | +``` |
| 207 | +Inline: text-accent hover:underline |
| 208 | +Nav: text-ink-tertiary hover:text-ink-secondary |
| 209 | +Back: text-ink-muted hover:text-ink-secondary (with left arrow) |
| 210 | +``` |
| 211 | + |
| 212 | +### Focus rings |
| 213 | + |
| 214 | +``` |
| 215 | +focus-visible:ring-2 focus-visible:ring-blue-400 focus-visible:ring-offset-2 focus-visible:ring-offset-canvas |
| 216 | +``` |
| 217 | + |
| 218 | +### Callouts |
| 219 | + |
| 220 | +``` |
| 221 | +Standard: rounded-lg border border-edge bg-surface px-4 py-3 text-sm text-ink-tertiary |
| 222 | +Warning: rounded-md border border-amber-500/30 bg-amber-900/20 p-4 |
| 223 | +``` |
| 224 | + |
| 225 | +## Exceptions (intentionally not tokenized) |
| 226 | + |
| 227 | +- **`print:` variants**: Literal grays for paper output (light backgrounds, dark text) |
| 228 | +- **BrowserMockup chrome**: `from-gray-300 to-gray-400` gradient simulates real macOS browser chrome |
| 229 | +- **ProtocolStack connector fallbacks**: `bg-gray-600` / `border-l-gray-600` / `border-r-gray-600` are dynamically constructed in JS and safelisted in theme CSS |
| 230 | +- **Protocol stack sublabels**: `text-gray-200/80` used against colored gradient backgrounds where semantic tokens don't apply |
| 231 | +- **Semantic protocol colors**: `text-emerald-400`, `text-blue-300`, `text-yellow-400` etc. in HTTP entries are domain-specific syntax highlighting, not generic text |
0 commit comments