A t-shirt customizer built with Polotno SDK that sends the design to the Printify API and shows the mockups Printify renders.
You need a Polotno API key to run this. The code in this repo is MIT, but it runs on Polotno SDK, which is commercial. Get a trial key in your Polotno dashboard to try it (trial keys show a "Powered by Polotno" credit); shipping it in a product needs a paid Polotno license.
Try it live: polotno.com/sdk/product/integrations/printify
- The server reads the tee's print area from Printify, so the dashed box on the shirt matches the real print file.
- The customer designs inside that box. Polotno exports one transparent PNG per side at Printify's pixel size.
- The server uploads each side, creates a draft product, reads its mockups and deletes the draft.
- Nothing is ordered. The response includes the request you would send to make it real.
You need Node 20+, pnpm, a Polotno API key (a trial key from polotno.com/login works for trying it) and Printify API credentials.
cd server
cp .env.example .env # add your Printify credentials
node --env-file=.env server.mjscd web
cp .env.example .env # add your Polotno key
pnpm install
pnpm devOpen http://localhost:5173. The credentials stay on the server.
web/src/scene.js: the shirt photo, the print-window overlay, and the export clipped to the print areaweb/src/provider.js,web/src/provider-panel.jsx: the Printify step and the result dialogserver/server.mjs: the Printify API calls
The same pattern for other print APIs: polotno-project on GitHub (Printful, Printify, Teemill, Fourthwall, Spreadconnect, Scalable Press, Lulu, Peecho, Gelato, Prodigi).
The code in this repository is MIT. Polotno SDK itself is not: it needs a Polotno API key, and production use needs a paid license.