Files
Lucas RayanandClaude Sonnet 5.5 1e06491019 docs: a README with a face, in English and Portuguese; decode every HTML entity in previews
The README opens like a product page: the mark, a line on what it is, the
links, the language switch and a picture of the real interface running on an
invented mailbox, in dark and light and in both languages. scripts/screenshots
holds that invented mailbox and the script that photographs it, so the pictures
can be redone. Previews now decode any HTML entity through the browser rather
than a short list, so a Portuguese or marketing preview no longer prints
ç or ·.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-23 07:55:12 -03:00

1.1 KiB

Photographing the interface

stub-server.mjs stands in for the auth and protocols services and serves a small mailbox that is entirely invented (names, addresses on reserved example domains, messages). It exists so the webmail can be run, worked on and photographed without a mail server or anyone's real mail.

node scripts/screenshots/stub-server.mjs      # listens on :4001
cd services/webmail
AUTH_SERVICE_URL=http://127.0.0.1:4001 \
PROTOCOLS_SERVICE_URL=http://127.0.0.1:4001 npx next dev -p 3100

Open http://localhost:3100/user/mail/inbox with a cookie named lm_user_session holding any token with the claims the middleware reads (the capture script builds one).

capture.mjs writes the pictures the README uses into docs/img/, in English and Portuguese, dark and light:

cd scripts/screenshots && npm install --no-save puppeteer-core
CHROME_PATH=/path/to/chrome node capture.mjs

It needs a Chrome, and the webmail running as above. The stub keeps its state in memory (opening a message marks it read); the script resets it before every picture through /__reset, so each one starts from the same mailbox.