Setup
Before you open a PR
.scratch/e2e-data, never your real data. Stop npm run dev first (one Next server per folder).
Where things live
Adding a platform or a tile type
- Platform: add it to
PLATFORMSwith its icon, hosts and URL pattern, then add a case totests/unit/detect.test.ts. - Tile type: add a schema entry, a view in
tiles.tsx, fields inTileControls.tsx, then runnpm run schema.
Adding a look
A look (thestyle of a page) is a set of components that draw the same tiles their own way. Offer six at most; minimal stays only as the hidden fallback. Touch these files, in this order:
src/lib/schema.ts: add the id toSTYLES(and toBASE_FONTSif it has its own font pair).src/lib/styles.ts: add it toSTYLE_INFO(label, one-line note, default preset, font and layout), toSTYLE_IDS(the order people see) and toSTYLE_PALETTES(four palettes, the first is the default).src/lib/style.ts: add its font pair toFONT_PAIRS.src/lib/themes.ts: add the palettes. Every theme defines every token.src/lib/fonts.ts: declare the fonts the pair uses (next/fontneeds literal options).src/lib/templates.ts: write the starter page and add it toSTYLE_STARTERS.src/components/page/styles/<id>.tsxand<id>.css:Header,TileandRow. A scene (moving background) goes in<id>-scene.tsxand.css. Register all of it instyles/index.tsx.src/lib/og/index.tsx: say which share-image style it uses.public/looks/<id>/: the art and the placeholder pictures for the starter page. Add every file topublic/looks/CREDITS.mdwith its source and licence. Only public domain, CC0 or art you made.src/app/lab/: a component lab for the look, linked fromsrc/app/lab/page.tsx(seesrc/app/lab/night/page.tsx).- Tests: a case for the starter in
tests/unit/templates.test.ts, and any new schema behaviour intests/unit/schema.test.ts. Runnpm run schemaafterwards.
npm run dev and open:
/laband the look’s component lab (/lab/<id>), in every state./lab/page/<id>?set=rich|sparse|photos|starter, optionally with&preset=<palette>and&layout=bento|list|canvas. Check every palette, on desktop and on a phone.node scripts/page-shot.mjs <id> <set> [width] [preset]for a full-page screenshot in.scratch/shots/(it needs the dev server running on port 3200:npx next dev -p 3200).
Design guidelines
- Pastel and calm. No hard borders, no loud gradients, no badges or pills.
- Motion is soft and fast; everything respects
prefers-reduced-motion. - Check every change in a light and a dark theme, on desktop and on a phone.
Pull requests and releases
- Keep pull requests small. Fill in the template, and add a screenshot for anything visual.
- Add a line to
CHANGELOG.mdunder “Unreleased” for user-facing changes. - CI runs typecheck, unit tests, build, end-to-end tests and CodeQL. All must pass.
- Releases use one version number:
package.json,server.json,plugin/**/plugin.jsonand.claude-plugin/marketplace.jsonchange together, andCHANGELOG.mdgets a dated heading. - Questions and ideas: GitHub Discussions. Docs: docs.posy.page.