PicThing local dev topology

What pnpm dev starts, where each service runs, and how its environment arrives.

Short answer

Clerk uses its hosted development instance. The SvelteKit app runs in Vite with Cloudflare’s platform proxy—not directly in wrangler dev. Convex runs locally. The image optimizer is the process that runs in wrangler dev.

Startup chain

pnpm dev
└─ infisical run --env=dev --path=/
   └─ pnpm run dev:local
      ├─ Vite / SvelteKit                 localhost:5173
      ├─ Wrangler image worker            localhost:8787
      ├─ Local anonymous Convex backend    127.0.0.1:3210
      └─ Raycast develop                  → localhost:5173

Infisical injects 12 shared development variables into the parent process. Every child inherits them. The root script then overrides PUBLIC_CONVEX_URL to http://127.0.0.1:3210, forcing the web app and Raycast-facing API onto local Convex.

Service matrix

Runtime and credential source for pnpm dev
ServiceWhere it runsEnvironment
SvelteKit webLocal Vite server, port 5173Infisical dev values exposed through SvelteKit env modules
Cloudflare compatibilityadapter-cloudflare platform proxy inside ViteBindings modeled from apps/web/wrangler.jsonc
Image optimizerLocal Workerd via wrangler dev, port 8787Infisical process env; ignored local env files remain fallback only
ConvexLocal anonymous backend, port 3210Generated local Convex state plus two runtime vars pushed by the setup script
ClerkHosted Clerk development instanceConfirmed pk_test_/sk_test_ credentials
AutumnHosted development APIConfirmed development/test secret key
UploadThingHosted APIToken supplied through backend AppConfig
PhotoRoomHosted API, only when background removal runsKey inherited by the local image worker
RaycastLocal ray developDefaults its API URL to the local web server

Environment flow

Infisical dev project (/)
  ↓ inject into process
Vite + Wrangler + Convex + Raycast child processes
  ↓ SvelteKit adapter
$env/dynamic/private + $env/dynamic/public
  ↓ runtime.ts
explicit Effect ConfigProvider
  ↓ validate once
AppConfig service
  ↓
Clerk · Convex · Autumn · UploadThing · signing · webhooks
  • SvelteKit remains the source adapter. Backend application code does not read process.env directly.
  • Effect validates once. AppConfig parses required values and keeps secrets redacted until an SDK or crypto boundary.
  • Public values stay public. Clerk’s publishable key and the Convex URL can reach browser code; private keys cannot.
  • Local files are fallback only. .env.local files are ignored and optional; the stack was verified without them.

Local vs hosted boundaries

Local
Vite web server, Cloudflare platform proxy, image Workerd, KV/R2/Images emulation, Convex backend, Raycast extension.
Hosted
Clerk development, Autumn development, UploadThing, and PhotoRoom.
Not used by pnpm dev
The configured cloud Convex deployment. The local runner removes cloud deployment variables and substitutes port 3210.
Hosted Convex option
pnpm dev:hosted skips the local Convex process and points the app at the hosted development deployment.
External side effects are still real

Local development uses development credentials, but calls to Clerk, Autumn, UploadThing, and PhotoRoom leave the machine. Background removal can invoke PhotoRoom even though its cache and bucket bindings are local.

One wording correction: the web app is not itself running under wrangler dev during pnpm dev. Its package script is vite dev. Use the web package’s preview flow to build and run the complete web Worker through Wrangler.