Skip to content
Site volume
Colourway

Generators

Generators

Cards, covers, printed photos, posters and one-pagers made from data at build time, plus the client colourway helper.

  • Experimental
Import from@maxgrits/overprint-generators
On this page

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#

GeneratorMakesRunsPage
CardsOpen Graph and social cards: 8 templates at 4 sizesnext build (opengraph-image.tsx) or overprint-gen cardsCards
Case coversA cover from project data, as a poster or a comic pageinline in the page, zero JSCase covers
Printed photosHalftone plates that print a photo in any colourwayoverprint-gen photos, committedPrinted photos
Posters and one-pagersA3 and Tabloid posters, A4 and Letter one-pagers, as tagged PDFsoverprint-gen pdf against next startPosters and one-pagers
Client colourwayA client's brand colours as a safe Overprint colourwayin your browserThe 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.1

The 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.