@milesroxas/design-hub 0.13.0 → 0.14.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (67) hide show
  1. package/README.md +1 -1
  2. package/core/prototype.test.ts +12 -1
  3. package/core/prototype.ts +21 -2
  4. package/core/review/model.ts +71 -6
  5. package/core/review/service.test.ts +536 -1
  6. package/core/review/service.ts +452 -25
  7. package/core/review/store.ts +45 -4
  8. package/dist/core/prototype.d.ts +20 -2
  9. package/dist/core/prototype.js +17 -2
  10. package/dist/core/review/model.d.ts +42 -3
  11. package/dist/core/review/model.js +52 -3
  12. package/dist/core/review/service.d.ts +81 -7
  13. package/dist/core/review/service.js +407 -23
  14. package/dist/core/review/store.d.ts +29 -2
  15. package/dist/core/review/store.js +4 -0
  16. package/dist/scripts/client.d.ts +1 -1
  17. package/dist/scripts/client.js +1 -1
  18. package/dist/scripts/lib/dns.d.ts +16 -2
  19. package/dist/scripts/lib/dns.js +66 -3
  20. package/dist/scripts/lib/fake-host.d.ts +16 -1
  21. package/dist/scripts/lib/fake-host.js +36 -1
  22. package/dist/scripts/lib/host.d.ts +2 -0
  23. package/dist/scripts/lib/resend.d.ts +36 -0
  24. package/dist/scripts/lib/resend.js +66 -0
  25. package/dist/scripts/lib/studio-deps.d.ts +7 -0
  26. package/dist/scripts/lib/studio-deps.js +6 -1
  27. package/dist/scripts/lib/studios.d.ts +2 -2
  28. package/dist/scripts/lib/studios.js +5 -5
  29. package/dist/scripts/lib/vercel-host.js +6 -0
  30. package/dist/scripts/people.d.ts +16 -4
  31. package/dist/scripts/people.js +67 -17
  32. package/dist/scripts/studio.d.ts +19 -3
  33. package/dist/scripts/studio.js +327 -6
  34. package/dist/server/api.d.ts +14 -2
  35. package/dist/server/api.js +71 -17
  36. package/dist/server/dev.js +21 -1
  37. package/dist/server/gate.d.ts +26 -3
  38. package/dist/server/gate.js +323 -52
  39. package/dist/server/mailer.d.ts +60 -0
  40. package/dist/server/mailer.js +104 -0
  41. package/dist/server/mailers/fake.d.ts +8 -0
  42. package/dist/server/mailers/fake.js +16 -0
  43. package/dist/server/mailers/resend.d.ts +21 -0
  44. package/dist/server/mailers/resend.js +49 -0
  45. package/dist/server/session.js +4 -1
  46. package/dist/vercel/proxy.js +10 -3
  47. package/dist/vite/plugin.js +3 -1
  48. package/kit/ui/Menu.tsx +29 -18
  49. package/kit/ui/layer.ts +41 -0
  50. package/package.json +1 -1
  51. package/shell/review/Bar.tsx +1 -0
  52. package/shell/review/Card.tsx +17 -7
  53. package/shell/review/People.tsx +908 -134
  54. package/shell/review/Review.tsx +2 -2
  55. package/shell/review/anchor.ts +6 -1
  56. package/shell/review/client.ts +41 -7
  57. package/shell/review/menu-place.test.ts +41 -0
  58. package/shell/review/place.test.ts +26 -1
  59. package/shell/review/place.ts +17 -0
  60. package/shell/review/review.css +97 -11
  61. package/shell/review/view.test.ts +115 -1
  62. package/shell/review/view.ts +92 -2
  63. package/shell/studio/StudioHub.tsx +1 -0
  64. package/shell/studio/hub.css +99 -13
  65. package/skills/miles-deploy/SKILL.md +24 -3
  66. package/templates/studio/.env.example +6 -0
  67. package/templates/studio/package.json +1 -1
@@ -90,27 +90,113 @@ body { background: var(--bg-primary); }
90
90
  .studio-people .field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
91
91
  .studio-people .field-label { font-size: 13px; line-height: 18px; font-weight: 500; color: var(--text-secondary); }
92
92
  .studio-people .btn { position: relative; height: 40px; padding: 0 14px; }
93
- /* Name, access and the button on one line, wide enough; stacked on a phone. */
94
- .studio-people .rv-invite { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 200px) auto; align-items: end; gap: 12px; padding-bottom: 16px; border-bottom: 1px solid var(--border-secondary); }
95
- @media (max-width: 600px) { .studio-people .rv-invite { grid-template-columns: minmax(0, 1fr); } }
93
+ /* Add person, a quiet row at the end of the list. Its fill runs the row's width and 10px past the text on both
94
+ sides, so the icon stays on the names' left edge. */
95
+ .studio-people .btn.rv-add-person { justify-content: flex-start; width: calc(100% + 20px); margin-inline: -10px; }
96
+ /* The open form: name and address side by side when wide, stacked on a phone; each field is its label, its input
97
+ and what goes under it, so the cells align at the top and a refusal sits under its own field. */
98
+ .studio-people .rv-invite { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; gap: 12px 16px; max-width: 720px; }
99
+ .studio-people .rv-invite > :not(.field) { grid-column: 1 / -1; }
100
+ /* Open, the form keeps its distance from the list it adds to. */
101
+ .studio-people .rv-body > .rv-invite, .studio-people .rv-body > .rv-share { margin-top: 8px; }
102
+ .studio-people .rv-options { display: flex; flex-direction: column; gap: 8px; }
103
+ .studio-people .rv-options > .rv-disclose { align-self: flex-start; margin-inline-start: -11px; gap: 2px; padding-inline-end: 6px; }
104
+ .studio-people .btn.rv-disclose .btn-chevron { width: 16px; height: 16px; }
105
+ /* Open is said by the chevron alone: no resting fill, the fill only under the pointer and on press. */
106
+ .studio-people .btn.rv-disclose[aria-expanded="true"]:not(:active) { background: transparent; }
107
+ @media (hover: hover) and (pointer: fine) { .studio-people .btn.rv-disclose[aria-expanded="true"]:hover:not(:active) { background: var(--button-tertiary-bg_hover); } }
108
+ :root[data-motion="reduce"] .studio-people .btn.rv-disclose .btn-chevron { transition: none; }
109
+ .studio-people .rv-options-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 16px; }
110
+ .studio-people .rv-form-actions { gap: 8px; }
111
+ .studio-people .rv-invite .field { scroll-margin-block: 16px; }
112
+ /* Email them the link: the box, its words and the gap between are one hit area, 44px tall on touch. */
113
+ .studio-people .rv-check-row { grid-column: 1 / -1; display: flex; align-self: flex-start; justify-self: start; align-items: center; gap: 8px; min-height: 36px; cursor: pointer; color: var(--text-secondary); }
114
+ @media (pointer: coarse) { .studio-people .rv-check-row { min-height: 44px; } }
115
+ /* The ticked box wears the primary button's pair, so its mark shows in both themes. */
116
+ .studio-people .rv-check-row .checkbox:checked { background: var(--button-primary-bg); border-color: var(--button-primary-bg); color: var(--button-primary-fg); }
117
+ /* Before an invite goes: the question and the address as one group, then the answer. */
118
+ .studio-people .rv-check { min-width: 0; margin: 0; padding: 0; border: 0; }
119
+ .studio-people .rv-check:focus-visible { outline: none; box-shadow: none; }
120
+ .studio-people .rv-check-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
121
+ .studio-people .rv-check-question { color: var(--text-secondary); }
122
+ .studio-people .rv-check-address { color: var(--text-primary); font-weight: 600; overflow-wrap: anywhere; }
123
+ /* How people sign in, over the list: one line, and while email is off the quiet action that copies the prompt,
124
+ its text on the line's left edge. While the last sign-in email failed, a second line in the tone that asks for attention. */
125
+ .studio-people .rv-mail { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; }
126
+ .studio-people .rv-mail > .rv-mail-copy { margin-inline-start: -11px; }
127
+ .studio-people .rv-mail > .rv-mail-prompt { align-self: stretch; max-width: 560px; }
128
+ .studio-people .rv-mail-failing { color: var(--utility-warning-700); }
129
+ @media (max-width: 600px) {
130
+ .studio-people .rv-invite, .studio-people .rv-options-fields { grid-template-columns: minmax(0, 1fr); }
131
+ }
132
+ .studio-people .rv-optional { color: var(--text-tertiary); font-weight: 400; }
96
133
  /* A new link, as the review panel shows one: what it does, the link to copy, and Copy. */
97
- .studio-people .rv-share { display: flex; flex-direction: column; gap: 8px; padding: 12px; border-radius: var(--radius-md); background: var(--bg-secondary); }
134
+ .studio-people .rv-share { display: flex; flex-direction: column; gap: 8px; max-width: 560px; padding: 12px; border-radius: var(--radius-md); background: var(--bg-secondary); }
98
135
  .studio-people .rv-share-row { display: flex; gap: 8px; }
99
136
  .studio-people .rv-share-row .input { flex: 1; min-width: 0; font-family: var(--sys-font-mono); font-size: 13px; }
100
137
  /* 16px on a touch screen or a phone, as kit/base.css sets every input, so iOS does not zoom into the link. */
101
138
  @media (pointer: coarse), (max-width: 767px) { .studio-people .rv-share-row .input { font-size: 16px; } }
102
139
  .studio-people .btn.rv-copy { flex: none; width: 80px; padding: 0; }
140
+ /* The list: a row is a person, parted from the next by one hairline. Wide, one line: the name over its address
141
+ on the left, the badges and the one menu on the right edge, the address cut to one line (its full text is
142
+ its title and the editor's). The menu's column is kept on a revoked row too, so every badge ends on one edge.
143
+ On a phone the badges go under the address, which wraps. */
103
144
  .studio-people .rv-people { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; }
104
- .studio-people .rv-people li { display: flex; flex-direction: column; gap: 4px; padding: 12px 0; border-bottom: 1px solid var(--border-secondary); }
105
- .studio-people .rv-people li:last-child { border-bottom: 0; padding-bottom: 0; }
106
- .studio-people .rv-person { display: flex; flex-wrap: wrap; gap: 4px 8px; align-items: baseline; }
107
- .studio-people .rv-person strong { font-weight: 600; color: var(--text-primary); }
108
- .studio-people .rv-people [data-revoked] { opacity: 0.55; }
109
- /* A row's text actions: 36px, the fill only under the pointer, each reaching 44px to the touch; wrapped lines keep 8px apart. */
145
+ /* A section holds one kind, so its group has no heading; Show more sits under the rows, its text on the names' edge. */
146
+ .studio-people .rv-group { display: flex; flex-direction: column; }
147
+ .studio-people .rv-group > .rv-more { align-self: flex-start; margin-inline-start: -11px; gap: 2px; padding-inline-end: 6px; }
148
+ @media (pointer: coarse) { .studio-people .btn.rv-more { position: relative; } .studio-people .btn.rv-more::before { content: ''; position: absolute; inset: -4px 0; } }
149
+ .studio-people .rv-people li { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(26px, auto); gap: 6px 12px; align-items: start; padding: 12px 0; }
150
+ .studio-people .rv-people li + li { border-top: 1px solid var(--border-secondary); }
151
+ .studio-people .rv-who { grid-column: 1; grid-row: 1; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
152
+ .studio-people .rv-name { font-weight: 600; color: var(--text-primary); overflow-wrap: anywhere; }
153
+ .studio-people .rv-email { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
154
+ .studio-people .rv-people [data-revoked] .rv-who { opacity: 0.55; }
155
+ /* A revoked row has no menu: its name cuts before the badge, never wrapping under it (on a phone too, below). */
156
+ .studio-people .rv-people [data-revoked] .rv-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
157
+ .studio-people .rv-tags { grid-column: 2; grid-row: 1; display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 6px; margin-top: -2px; }
158
+ .studio-people .badge { font-variant-numeric: tabular-nums; }
159
+ /* A running end date is words, not a chip: the badge's line, so it sits where one would, in the quiet tone. */
160
+ .studio-people .rv-until { font-size: 12px; line-height: 24px; color: var(--text-tertiary); font-variant-numeric: tabular-nums; white-space: nowrap; }
161
+ .studio-people .rv-tags .badge + .rv-until { margin-inline-start: 2px; }
162
+ /* The menu's 32px button centres on the name's 20px line, its glyph on the row's right edge; a finger gets 44px. */
163
+ .studio-people .btn.rv-row-menu { grid-column: 3; grid-row: 1; width: 32px; height: 32px; margin: -6px -6px -6px 0; padding: 0; color: var(--text-tertiary); }
164
+ .studio-people .rv-people .btn.rv-row-menu::before { inset: -6px; }
165
+ /* A row with one action shows it by name, its text ending on the edge the menus end on. */
166
+ .studio-people .btn.rv-row-act { grid-column: 3; grid-row: 1; margin: -8px -10px -8px 0; }
167
+ @media (max-width: 600px) {
168
+ .studio-people .rv-people li { grid-template-columns: minmax(0, 1fr) auto; }
169
+ .studio-people .rv-email { white-space: normal; overflow-wrap: anywhere; }
170
+ .studio-people .rv-tags { grid-column: 1; grid-row: 2; justify-content: flex-start; margin-top: -4px; }
171
+ .studio-people .rv-until { line-height: 18px; }
172
+ /* A revoked row keeps its badge on the name's line, in the menu's slot, ending on the menus' edge. */
173
+ .studio-people .rv-people [data-revoked] .rv-tags { grid-column: 2; grid-row: 1; margin: -2px 0; }
174
+ .studio-people .btn.rv-row-menu, .studio-people .btn.rv-row-act { grid-column: 2; }
175
+ }
110
176
  .studio-people .rv-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 4px; }
111
- .studio-people .rv-acts { margin-inline: -10px; }
112
- .studio-people .rv-acts .rv-confirm { flex: 1 1 100%; padding: 0 10px; color: var(--text-secondary); }
113
- .studio-people .rv-acts .select { width: auto; min-width: 160px; }
177
+ /* A line that starts with a ghost button steps back by its padding and border (10px + 1px), so its text lines up. */
178
+ .studio-people .rv-inline .rv-row:has(> .rv-act:first-child), .studio-people .rv-form-actions:has(> .rv-act:first-child) { margin-inline-start: -11px; }
179
+ /* What a row opens (an editor, a question, a new link) spans the row, under the name. */
180
+ .studio-people .rv-inline { grid-column: 1 / -1; display: flex; flex-direction: column; gap: 8px; min-width: 0; max-width: 440px; margin: 0; padding: 0; border: 0; }
181
+ .studio-people .rv-inline .rv-confirm { margin: 0; color: var(--text-secondary); }
182
+ .studio-people .rv-inline .select { width: auto; min-width: 160px; }
183
+ .studio-people .rv-email-edit { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
184
+ .studio-people .rv-email-edit .rv-row { gap: 8px; }
185
+ /* A refusal, under the field it names, at the hint's size. */
186
+ .studio-people .rv-form-error { font-size: 13px; line-height: 18px; color: var(--text-error-primary); }
187
+ .studio-people .input[aria-invalid="true"] { border-color: var(--border-error); }
188
+ /* A focused field says so with its edge alone: the border steps up to the ring's own grey (light 3.2:1 against the
189
+ resting border and 4.7:1 against the field; dark 4.9:1 and 7.6:1), no ring. kit/ui draws the ring on every
190
+ focused field, for prototypes too, so it is quieted here for the hub's fields only. Buttons and menu items keep
191
+ the ring. Asked for more contrast, fields get it back; in forced colours the kit's transparent outline is drawn
192
+ in the system colour. */
193
+ .studio-people .input:focus-visible { box-shadow: var(--shadow-xs); border-color: var(--border-brand); }
194
+ .studio-people .input[aria-invalid="true"]:focus-visible { border-color: var(--border-error); }
195
+ @media (prefers-contrast: more) { .studio-people .input:focus-visible { box-shadow: var(--focus-ring), var(--shadow-xs); } }
196
+ /* Every button shows the ring to the keyboard, the primary too, whose own shadow would otherwise win. */
197
+ .studio-people .btn:focus-visible { box-shadow: var(--focus-ring), var(--shadow-xs); }
198
+ /* 16px on a touch screen or a phone, as kit/base.css sets every input, so iOS does not zoom into a field. */
199
+ @media (pointer: coarse), (max-width: 767px) { .studio-people .input { font-size: 16px; } }
114
200
  .studio-people .btn.rv-act { height: 36px; padding: 0 10px; color: var(--text-tertiary); font-weight: 500; }
115
201
  .studio-people .btn.rv-act-danger { color: var(--text-error-primary); }
116
202
  @media (hover: hover) and (pointer: fine) {
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: miles-deploy
3
- description: "Share the prototypes through a studio and hand out sign-in links: the studio (one site for every client), its clients, linking a project to a client, the pre-flight (pnpm preflight), pnpm share, the handover message, adding people, a second device, signing someone out, how long access lasts, and what needs the studio owner's word first. Load when the user asks to deploy, share, send a link, set up a studio, add a client, add or remove someone, give someone access on another device, change how long access lasts, or check the work before any of those. Triggers on: deploy, share, share link, send to the client, send it to the team, put it online, publish, go live, update the link, push the latest, studio, studio site, new client, add a client, archive a client, client host, subdomain, domain, DNS, project link, Vercel, sign in to Vercel, vercel login, gate, sign-in link, one-time link, new link, another device, link stopped working, sign out everywhere, access length, 3 months, 6 months, open-ended, pre-flight, preflight, ready to send, add someone, invite someone, remove someone."
3
+ description: "Share the prototypes through a studio and hand out sign-in links: the studio (one site for every client), its clients, linking a project to a client, the pre-flight (pnpm preflight), pnpm share, the handover message, adding people, a second device, signing someone out, how long access lasts, email sign-in (turning it on or off), and what needs the studio owner's word first. Load when the user asks to deploy, share, send a link, set up a studio, add a client, add or remove someone, give someone access on another device, change how long access lasts, turn email sign-in on or off, or check the work before any of those. Triggers on: deploy, share, share link, send to the client, send it to the team, put it online, publish, go live, update the link, push the latest, studio, studio site, new client, add a client, archive a client, client host, subdomain, domain, DNS, project link, Vercel, sign in to Vercel, vercel login, gate, sign-in link, one-time link, new link, another device, link stopped working, sign out everywhere, access length, 3 months, 6 months, open-ended, pre-flight, preflight, ready to send, add someone, invite someone, remove someone, email sign-in, sign in by email, sign-in code, Resend, sender address, sign-in emails are failing."
4
4
  ---
5
5
 
6
6
  # Share
@@ -15,7 +15,8 @@ A studio runs on its owner's hosting account. Ask the owner, in one plain questi
15
15
 
16
16
  - **Spending money.** Nothing here should cost anything. If a command stops on a plan, a payment or a limit, stop and tell the owner what it said.
17
17
  - **Creating or deleting anything on the account:** `studio create`, `studio deploy` (it replaces the site and deletes every older deployment), `client add` (it puts a new address on the site), `client archive` (it deletes the client's people, projects, comments and files for good).
18
- - **DNS:** a record `client add` adds or prints, or one `client archive` removes.
18
+ - **DNS:** a record `client add` adds or prints, or one `client archive` removes, and the mail domain's records `studio email` adds or prints.
19
+ - **Turning email sign-in on or off** (`studio email`): it sets or removes two secrets on the site and deploys it.
19
20
  - **Skipping a pre-flight step** with `--skip`.
20
21
 
21
22
  `project link`, `share`, `people` and `comments` act only inside the studio's own store, for the linked project and its client, and `people --studio` for the studio's own people. Run them when the user asks.
@@ -151,6 +152,26 @@ A signed-in device stays signed in until the person's access ends: 3 months, 6 m
151
152
  - One person: `pnpm people access <id> --access 3m|6m|open`, counted from today, or `--access` on `pnpm people add`.
152
153
  - When someone's access ends, their links stop working at once and every device signs out within five minutes. A changed length reaches their signed-in devices within five minutes too. Change their access to let them back in, then send a new link.
153
154
 
155
+ ## Email sign-in
156
+
157
+ Off until the owner turns it on; links work either way. With it on, a person with an email (`pnpm people add --email`, or `pnpm people email <id> --email <address>`) signs in alone with a code mailed to them, and `people add` mails a new person their link. The People tab's prompt to copy sends the owner here.
158
+
159
+ First, the studio folder must be on 0.14.0 or newer: `studio email` refuses an older one and changes nothing. Move it up as in New studio (`pnpm add @milesroxas/design-hub@<version>` in the folder, or `pnpm studio deploy --studio <studio> --package <tgz>`), with the owner's word, then turn email on.
160
+
161
+ Ask the owner for: who mail is from, a name and an address at the apex or below it (default `signin@mail.<apex>`); a file holding a full-access API key of their Resend account (the free plan is enough; it may be one another of their sites sends from); and an address for the test mail. The key comes from resend.com, **API Keys**, **Create API key**, **Full access**, pasted into a plain text file. Never take the key itself in chat. The first run copies it into the folder's `.env` as `RESEND_FULL_KEY`, so the owner may delete the file after it. Then, with their word, in the studio folder or with `--studio`:
162
+
163
+ ```bash
164
+ pnpm studio email --studio <studio> --from "<Name> <signin@mail.<apex>>" \
165
+ --resend-key-file <file> --test <address>
166
+ ```
167
+
168
+ In order, each step safe to run again: the full key into the folder's `.env` (`RESEND_FULL_KEY`; later runs may drop `--resend-key-file`); the sender's domain at Resend, used as it is when it or a parent is verified, with no DNS change; else the domain made, its records added (Cloudflare) or printed (`records`: Vercel DNS and manual, for the owner to add), and verified; a new send-only key; a test mail; and only then `RESEND_API_KEY` and `MAIL_FROM` on the site and in the folder's `.env`, a deploy, and the earlier send-only key removed. `ok: false` says what to do: add the records it lists, or wait for Resend to verify, then run it again. On Vercel DNS and manual, the first run lists the records and stops at once; the run after they are added waits for Resend, up to two minutes. Nothing is on the site until the test mail is sent. The sender's domain is never a host the studio serves.
169
+
170
+ - **Off:** with the owner's word, `pnpm studio email --studio <studio> --off`. It takes the two secrets off and deploys; the full key stays in `.env`, so turning it on again needs only `--from` and `--test`.
171
+ - **"Sign-in emails are failing"** on the People tab: the last mail was refused, often the Resend free plan's 100 a day or 3,000 a month, shared by the whole account. Links still work; send them meanwhile. It clears on the next mail sent.
172
+ - A code form needs Safari 14 or newer. The gate pages run no script, so a press shows no busy state.
173
+ - An optional Vercel Firewall rate-limit rule on `/_gate/` paths stops a flood before the store spends a write on it. The gate's own cap works on every plan; the rule is free on Hobby and billed by usage on Pro, so add it only when the owner asks.
174
+
154
175
  ## Internal and client-facing
155
176
 
156
177
  Every prototype is **Internal** until a Studio person marks it **Client-facing** with the switch beside it on the project's **Prototypes** page. Only then can a Client open it or see it listed. To check, open the project signed in as Studio and turn on **Client view**. A switch flipped under `pnpm dev` changes the dev store only; the studio has its own.
@@ -185,4 +206,4 @@ Only for a project made before studios. It has `proxy.ts`, `api/review.ts` and `
185
206
  - The studio site sends `noindex`, `X-Frame-Options: DENY`, `nosniff`, HSTS and a same-origin referrer on every path. The gate pages add a hash CSP, run no script and send no referrer.
186
207
  - A link is 32 random bytes, and the store keeps only its hash. Of two requests with the same link, only one signs in.
187
208
  - The session cookie carries when the store last said yes. After five minutes the gate asks the store again on the next request, so a revoke, a sign out everywhere or a changed access length reaches every device within five minutes. A store that does not answer gives 503 and signs nobody out.
188
- - The studio folder's `.env` holds the studio's secrets: the gate's signing secret, the database and the file store. Never send it, never commit it, never copy it into a project.
209
+ - The studio folder's `.env` holds the studio's secrets: the gate's signing secret, the database, the file store and, with email on, the Resend keys. The site holds only a key that can send, from the sender's domain. Never send it, never commit it, never copy it into a project.
@@ -10,3 +10,9 @@ POSTGRES_URL=
10
10
  BLOB_READ_WRITE_TOKEN=
11
11
  # Only with Cloudflare DNS: a token with DNS edit on the apex's zone.
12
12
  CLOUDFLARE_API_TOKEN=
13
+ # Only with email sign-in (`design-hub studio email`). The full-access Resend key, kept here for later runs; never on the site.
14
+ RESEND_FULL_KEY=
15
+ # The send-only key the site holds, limited to the sender's domain, made by `studio email`.
16
+ RESEND_API_KEY=
17
+ # Who sign-in mail is from, "<Name> <address>", the same as on the site.
18
+ MAIL_FROM=
@@ -9,7 +9,7 @@
9
9
  "build": "node build.mjs"
10
10
  },
11
11
  "dependencies": {
12
- "@milesroxas/design-hub": "0.13.0",
12
+ "@milesroxas/design-hub": "0.14.0",
13
13
  "react": "^19.3.1",
14
14
  "react-dom": "^19.3.1"
15
15
  }