The problem
Print Factory is a print shop in Cosenza, in southern Italy, that prints garments for walk-in clients, online customers and partner stores. Orders arrived from many directions, and the shop, the production floor and the partners all needed to work from the same data.
What I built
I built a custom PHP platform: public site, online shop, management panel and an API for partners.
- Partner order API — external shops, the first being InCattedra, send orders with their own key. Each partner has a sandbox, a request limit and an IP allowlist, and sees only its own orders; an order sent twice is not duplicated.
- Signed status webhooks — every change of status goes back to the partner, signed with HMAC-SHA256, and is retried after 1 s, 5 s, 30 s, 5 min and 30 min if delivery fails.
- Online customiser — customers choose garment, colour and size, upload a design or reopen a saved project from their personal graphics area.
- AI image studio — tools to create and edit images with OpenAI and Replicate models, kept private to the customer’s account.
- Production floor screen — a tablet view that lists every step each machine has to do, marked by department, urgency and person, so staff can see what to do next.
- Job orders and checkout — jobs with a timeline and PDF sheets, and checkout with PayPal, bank transfer or cash on delivery.
- Royalty reports — partners whose designs Print Factory sells get a private link with their sales and royalties, without any customer data.
Built with
PHP 8.3 written from scratch on Apache, a cron-driven queue for partner orders and emails, and the OpenAI, Anthropic and Replicate APIs.
Why it was done this way
DTF printing needs a real transparent background. A PNG that only looks cut out, but was flattened on white, prints as a pale rectangle on a dark shirt. So the platform checks each file, cleans the light halo around the edges and previews the design on the real garment colour before it goes to print.


