data-ui="sorbet"), captured from a fictional fixture workspace on a local
stack and composed into frameless rounded cards on a transparent canvas. Nothing
is drawn by hand: every pixel inside a card is the running app.
Output lives in packages/roadmap-core/src/assets/previews/web/:
<feature>/<device>-<theme>-<locale>.avifand.webpmanifest.jsonwithscreen,app,device,theme,locale, pixel size, repo-relative paths and byte sizes for every file.
Features and devices
Devices:
mac 1512x982 @2x, ipad 1024x1366 @2x, ipad-landscape 1366x1024
@2x, iphone 393x852 @3x, duo-folded 466x678 @3x (outer display) and
duo-unfolded 951x669 @3x (inner display). Both themes (light, dark) come
from the app’s own theme setting. Locales are en and vi where the route
supports it. Meet scenes set locales: ['en'], because each capture joins a
live call and takes about two minutes.
Each preview is the “colour field” card: the raw screen inside a frameless white
rounded card on a transparent background, with no bezel, window chrome, headline
or wave (the page supplies its own wash). The corner radius is 5% of the card
width for iphone and duo-folded and 2.2% for mac, ipad, ipad-landscape
and duo-unfolded. The shadow is two layers scaled to the card width,
0 2% 4% rgb(38 33 43/.08), 0 6% 12% rgb(42 85 168/.22), and the canvas is
padded so it is never clipped. Light-theme cards carry a 1px #f0e1dd hairline
so they read on white, and duo-unfolded has a 1px centre crease at
rgba(38,33,43,.08). The card geometry lives in scripts/roadmap-previews/frames.mjs.
Exports cap the long edge at 1280 px for iphone and duo-folded and 1600 px
for everything else, and search for the highest quality that fits 100 KB (AVIF)
and 150 KB (WebP).
Fixture data
scripts/roadmap-previews/seed.mjs creates the “Sorbet Studio” team workspace
with fictional people (Linh Tran, Alex Kim, example.com addresses), a “Launch
plan” board with twelve tasks, labels, and a week of calendar events. It uses
the apps’ own APIs; only display names, workspace timezone, the ticket prefix
and calendar events are written with the local Supabase service key, because
the public profile API asks for an abuse challenge. Never capture real names,
emails, client workspaces or client content.
Local stack
Use the shared local stack (web:7803, Meet :7807, the Meet realtime Worker
:8786, Supabase :8001) and add the Tasks (:7809) and Calendar (:7806)
satellites with next dev against the same Supabase, with
WEB_APP_URL/INTERNAL_WEB_API_ORIGIN pointing at web, TASKS_APP_URL and
CALENDAR_APP_URL set to the local origins, and SUPABASE_SECRET_KEY equal to
the value web uses (the app-session token is signed with it). Satellites need
packages/internal-api built (dist/). Do not start a second Supabase.
Notes that cost time:
- Plain-localhost Supabase cookies are host-only.
satelliteStorageStatesigns in on web, captures the/verify-tokenredirect, clears thesb-*cookies and opens that URL on the satellite (seelocal-e2e.mdx). - Calendar is mounted under
/calendarand its client calls/api/*without the prefix; the capture rewrites those requests to/calendar/api/*. - Meet needs port
:7807(web only recognises registered satellite ports). A room ends when its last participant leaves, so each Meet capture inserts a freshworkspace_meetingsrow and has a second fixture participant join. - The captured clock is fixed to Monday 08:30 of the current week so seeded events read as upcoming.
- Dev-only chrome is hidden: the Next.js overlay, the Tailwind breakpoint badge
and toasts. The remote logo is served from
packages/roadmap-core.
Commands
seed and capture-web read PREVIEW_SB_URL and PREVIEW_SB_SECRET: export
the “API URL” and “service_role key” fields of supabase status for the local
stack. Every origin (PREVIEW_WEB_ORIGIN, PREVIEW_TASKS_ORIGIN,
PREVIEW_CALENDAR_ORIGIN, PREVIEW_MEET_ORIGIN) and PREVIEW_SB_URL must be
loopback: localhost, 127.0.0.1, ::1, or for the app origins also
*.localhost (PREVIEW_SB_URL takes only the exact hosts, because Node does
not pin *.localhost to loopback). lib.mjs throws on any other host before a
request is sent, so the service key never leaves the machine. Each Meet capture
inserts a fixture meeting and always deletes it afterwards, also when joining
fails; a failed cleanup is logged. capture-web
skips raw files that exist, so an interrupted run resumes. Raw PNGs are scratch
output and are not committed.
Known gaps
- The Meet call view keeps its microphone control in the pending state because the local stack has no media SFU, and Mira is captured at its landing view because a reply needs a model provider.
- The task detail panel crashes in
next dev(RichTextEditorreadseditor.commandsafter the editor is destroyed), so there is no task detail preview. - CMS and Upskii run as separate apps that are not part of the shared stack, and CMS needs fixture content, so neither has a preview yet.
- Not captured:
ipad-landscapeformira-chat,settings-profile,tasks-list,meet-callandmeet-assistant, and the Vietnameseipad-landscapeshots ofcalendar-weekandtasks-board. The Releases page falls back to another capture for a missing device or language. - The Calendar mini month highlights the real date while the week header and the now line use the fixed capture clock, and its week header stays in English in Vietnamese captures (a product translation gap, captured as it is).