Reference guide

How it is built

The parts of the codebase, what runs where, and the rules that keep rendering correct.

Stack

An Electron desktop app with a Vite, React and three.js editor. Product views are path traced on WebGPU with three-gpu-pathtracer. State is kept with zustand. The local API is plain Node.

Two processes

PartWhereWhat it does
Editorsrc/Everything on screen: the ad set, layers, inspector, chat, 3D views
Local APIdesktop/server.cjsReads the product and packaging libraries, calls outside services, writes exports

The same local API serves the Vite dev server and the Electron app. The packaged app uses a bundled copy built with npm run build:server into dist-desktop/.

Inside the editor

Folder or fileContents
src/components/TopBar, LeftPanel (Layers, Products, Packaging), the ad set stage, Toolbar, Inspector, Chat, Settings, ArtworkDialog
src/layers/The layout document: text, shape, vector, image and group layers with a frame per size. Undoable store, text layout, SVG and Canvas rendering, alignment and snapping, shortcuts
src/ai/The Claude agent loop, system prompt, and the tools that edit the ad
src/scene/three.js product views, camera poses, synced crops, thumbnails, packaging materials
src/store.tsCamera, product and background state, persisted
src/actions.tsPhotoroom backgrounds, Arrow 2 vectors, product placement, compositing, export

What the local API serves

RoutePurpose
Product libraryReads /Volumes/MAKER_DEVELOPMENT/LIBRARY. Override with AD_SHOTS_LIBRARY
/api/packagingLists the packaging models. Override the folder with AD_SHOTS_PACKAGING
/api/ai/messagesClaude, through the Anthropic SDK
/api/vector/generate, /api/vector/vectorizeQuiverAI Arrow 2
/api/photoroom/backgroundPhotoroom background around the product
Reference imagesOpenAI or Google, chosen in Settings
ExportWrites to ~/Downloads/Ad Shots Exports

Where data lives today

Everything is on the user's computer.

DataLocation
ProductsA folder on disk
Packaging modelspackaging/out, built GLB files
Artwork placed on modelsThe app's local database (IndexedDB ad-shots-artwork)
API keysOperating system secure storage
ExportsDownloads

The launch plan moves ads and products into an account. See Accounts and library.

Rendering rules worth knowing

The original Product Booth

The first app lives at /Volumes/MAKER_DEVELOPMENT/DEV/Apps/Product Booth. It is a native macOS app with Blender running headless as the render engine. Treat it as reference only: read it for ideas, do not edit, build or import from it.

Updated 2026-11-14. Built 2026-11-15.