Skip to content

About

Printify API demo: an embedded Polotno design editor that sends print files to Printify. Editor + Node backend, MIT (Polotno SDK needs an API key).

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

2 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Printify API demo with Polotno

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

How it works

  1. The server reads the tee's print area from Printify, so the dashed box on the shirt matches the real print file.
  2. The customer designs inside that box. Polotno exports one transparent PNG per side at Printify's pixel size.
  3. The server uploads each side, creates a draft product, reads its mockups and deletes the draft.
  4. Nothing is ordered. The response includes the request you would send to make it real.

Run it

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.mjs
cd web
cp .env.example .env   # add your Polotno key
pnpm install
pnpm dev

Open http://localhost:5173. The credentials stay on the server.

Where things are

  • web/src/scene.js: the shirt photo, the print-window overlay, and the export clipped to the print area
  • web/src/provider.js, web/src/provider-panel.jsx: the Printify step and the result dialog
  • server/server.mjs: the Printify API calls

More providers

The same pattern for other print APIs: polotno-project on GitHub (Printful, Printify, Teemill, Fourthwall, Spreadconnect, Scalable Press, Lulu, Peecho, Gelato, Prodigi).

License

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.

About

Printify API demo: an embedded Polotno design editor that sends print files to Printify. Editor + Node backend, MIT (Polotno SDK needs an API key).

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages