> ## Documentation Index
> Fetch the complete documentation index at: https://docs.tuturuuu.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Roadmap Web Previews

> How the Sorbet web previews on the public roadmap are captured from a local fixture workspace and exported as framed AVIF and WebP images.

The roadmap feature previews are screenshots of the real Sorbet web UI
(`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>.avif` and `.webp`
* `manifest.json` with `screen`, `app`, `device`, `theme`, `locale`, pixel size,
  repo-relative paths and byte sizes for every file.

## Features and devices

| Feature | App | Route |
| - | - | - |
| `tasks-board`, `tasks-list` | Tasks | board (Kanban, List view) |
| `calendar-week` | Calendar | week view |
| `settings-profile` | Web | settings dialog, Profile tab |
| `mira-chat` | Web | Mira landing view (wider devices only: phone widths open the navigation sheet over it) |
| `meet-call`, `meet-assistant` | Meet | two-person call, Private Assistant tab |

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. `satelliteStorageState` signs
  in on web, captures the `/verify-token` redirect, clears the `sb-*` cookies and
  opens that URL on the satellite (see `local-e2e.mdx`).
* Calendar is mounted under `/calendar` and 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
  fresh `workspace_meetings` row 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

```bash theme={null}
node scripts/roadmap-previews/seed.mjs --state <seed.json>
node scripts/roadmap-previews/capture-web.mjs --raw <raw dir> --state <seed.json> \
  [--features a,b] [--devices mac,iphone] [--themes light,dark] [--locales en,vi]
node scripts/roadmap-previews/compose.mjs --raw <raw dir>
```

`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` (`RichTextEditor` reads
  `editor.commands` after 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-landscape` for `mira-chat`, `settings-profile`,
  `tasks-list`, `meet-call` and `meet-assistant`, and the Vietnamese
  `ipad-landscape` shots of `calendar-week` and `tasks-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).


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.