The generators turn the site's own data into print: social cards, case-study covers, photos printed in the colourway's inks, posters and one-pagers as PDFs. Everything is built or committed ahead of time. makrlabs.dev runs no generator when a visitor asks for a page: cards are static files, covers are inline SVG in the HTML, plates and PDFs are files in the repo.
What each one makes#
| Generator | Makes | Runs | Page |
|---|---|---|---|
| Cards | Open Graph and social cards: 8 templates at 4 sizes | next build (opengraph-image.tsx) or overprint-gen cards | Cards |
| Case covers | A cover from project data, as a poster or a comic page | inline in the page, zero JS | Case covers |
| Printed photos | Halftone plates that print a photo in any colourway | overprint-gen photos, committed | Printed photos |
| Posters and one-pagers | A3 and Tabloid posters, A4 and Letter one-pagers, as tagged PDFs | overprint-gen pdf against next start | Posters and one-pagers |
| Client colourway | A client's brand colours as a safe Overprint colourway | in your browser | The helper |
Rules every generator keeps#
- Text sits on paper plates; art never sits under words (D-B1). Covers and cards record every text box, and the tests check each one lies on a plate.
- Copy limits are schema limits. Every input passes its zod schema first, and an error names the field.
- Nothing is truncated. A title that cannot fit at the smallest size fails the build and names the text, so the author shortens it.
- Proof screenshots stay untouched (D-I1). The photo pipeline refuses them with no override; covers frame them in a keyline instead.
- Deterministic output: the same input gives the same bytes. Seeds come from the slug, never from a random number or the clock.
- Never at request time and never in a Vercel build step that needs a GPU, Playwright or sharp's photo treatment: those run on a Mac and their outputs are committed.
Install#
pnpm add @maxgrits/overprint-generators
# optional peers, only for the Node tools that need them
pnpm add -D sharp playwright-core@1.64.1The pure subpaths (./cover, ./measure, ./photo-core, ./react) run on the server, at the edge and in the browser. The Node subpaths (./og, ./photo, ./pdf, ./raster, ./fonts, ./icons, ./stills) answer a browser import with a guard error.