
StatusLive
The project
A custom pet-portrait storefront connecting photo uploads and AI artwork generation with product mockups, customer approval, and print fulfillment. Customers choose a style, review proofs, and approve production. The Next.js storefront offers passkey sign-in, while separate Express services handle public requests and queued artwork jobs on Cloud Run.
How it works
Choose a portrait
The customer picks a product and artwork style, uploads a pet photo, and checks out.
Generate the artwork
A queued worker prepares the portrait and product mockup while the storefront remains available.
Review the proof
The customer reviews the mockup and can request a revision before approving it.
Release production
Approval releases the print order to fulfillment, with the production artwork kept separate from the preview.
Engineering decisions
Image processing in the background
The challenge
Generating artwork takes longer than a normal web request and can leave customers waiting.
The approach
Cloud Tasks dispatches authenticated jobs to a private worker. Per-item leases and fencing tokens prevent an older artwork job from overwriting a newer revision.
Customer approval before printing
The challenge
Payment, artwork revisions, and manufacturing need to stay aligned for each order.
The approach
Held Printify orders provide product mockups for review. Customer approval then releases production, with separate preview and high-resolution artwork files.
Safe retries at checkout
The challenge
Payment webhooks can be delivered more than once, risking duplicate orders or fulfillment work.
The approach
Firestore transactions record webhook events and claim each payment. Order creation and claim completion commit together so retries can recognize work already performed.
Architecture
From a customer photo to a finished product
Fast customer requests and slower artwork production run independently, connected by a durable job queue.
The storefront stays responsive
Customer requests → public API
Upload & checkout
Choose a product, upload a photo and pay.
Next.js
Order orchestration
Validates uploads, handles checkout and queues work.
Express
Payment confirmed
Payment events establish the paid order.
Stripe
A separate path for production
Authenticated jobs → artwork → approval
Durable task queue
Dispatches authenticated jobs for background processing.
Cloud Tasks
Render the artwork
An Express worker runs image pipelines to create proofs and print files.
Python
OpenAI
Release production
Held Printify orders supply mockups. Customer approval releases the order to production.
API and worker use Firestore for progress and Cloud Storage for uploads, proofs and production files. The storefront reads progress through the API.
Three services: Next.js storefront, public Express API and private Express worker.
Outcome
One photo-to-print workflow supports five product types: posters, puzzles, pillows, tote bags, and mugs. Artwork is generated outside storefront requests, and customers approve a proof before production. Payment claims recognize webhook retries, while job ownership checks stop an older artwork task from overwriting a newer revision.