Technical case study
Le Poulot Vert
Le Poulot Vert is a free Christmas experience that reveals a new fictional pullover each day. A script on my computer plans the design, calls Gemini for the artwork, prepares it for the web, and publishes it to Netlify. The script runs locally and Gemini renders the images through Google’s API.
Plan the design before calling Gemini
Windows Task Scheduler starts the Node.js script around midnight. The script builds a brief for the Zurich calendar date and uses a saved seed to choose details such as the palette, pattern layout, and knit texture. It compares those choices with the previous edition and can pass earlier images to Gemini as references for wool and lighting. The saved brief and seed let me recreate the design instructions.
Generate the pullover as a separate image
The script asks Gemini to render the pullover and its hanger against a flat magenta background. A second Gemini pass cleans up the source image before local processing. Keeping the garment separate lets the site reuse the illustrated boutique and change the pullover each day.
Prepare the artwork on the computer
The script uses Sharp to remove the magenta, leaving a transparent background, and export AVIF images at several widths. The browser can then choose a size for the screen and place the cutout over the shop scene. The script saves the Gemini responses locally so image processing can resume from files already received. If a request fails and may have been billed, another API call requires an explicit retry.
Publish the finished edition
The script adds the new image and its date to the catalogue, carries forward previous editions, and deploys the updated site to Netlify. Visitors browse files that are already published. The Gemini API key stays with the local publishing job, and opening the site never starts an image generation request.