Cloudflare deployment
Build and deploy PhotoTo3D with OpenNext on Cloudflare Workers.
Build the worker
The repository uses OpenNext for the same deployment shape as inplain. Static assets are emitted to the ASSETS binding and the Next server runs in the Worker.
Production uses the Cloudflare AI binding and SCULPT_API_STYLE=workers-ai. The reconstruction endpoint sends a resized reference to a vision-capable model and requests a strict SculptSpec v2 JSON component tree.
pnpm install
pnpm wrangler secret put SCULPT_API_STYLE
pnpm cf:build
pnpm cf:preview
Configure the production URL
Set NEXT_PUBLIC_SITE_URL in wrangler.jsonc before deploying. The value is used for canonical metadata and social previews.
pnpm cf:deploy
Runtime boundaries
Image sampling and the starter factory run in the browser. No Python process or native binary is required by the Worker. Persisted builds and team workspaces can be added with D1 and R2 bindings without changing the page architecture.