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.
The reconstruction endpoint requires an OPENAI_API_KEY secret. It sends a resized reference to a vision-capable model and requests a strict SculptSpec v2 JSON component tree.
pnpm install
pnpm wrangler secret put OPENAI_API_KEY
pnpm cf:build
pnpm cf:previewConfigure 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:deployRuntime 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.