Loading preview…
Loading preview…
Paste a website URL to extract brand signals with Firecrawl, generate a structured product photography brief, auto-create four Nano Banana placement images, and click any result into a local edit flow.
Loading preview…
Requirements, wiring steps, and what this pattern adds to your project.
Pick how you want to pull this pattern in — then wire env vars and routes the same way.
Install from the preview toolbar
Copy the install command above and run it in your project — Pro patterns include a short-lived token.
Add environment variables to .env.local
FIRECRAWL_API_KEY, AI_GATEWAY_API_KEY, UPSTASH_REDIS_REST_URL, UPSTASH_REDIS_REST_TOKEN
Point client fetches at your API routes
Replace preview `/view/.../api/...` paths with `/api/...` in the installed files.
Customize the agent and tool files
Adapt prompts, tools, and stop conditions for your product — Copy for AI in the toolbar helps seed that work.
Run your dev server and open the pattern route
Install dependencies if needed, then start the app and verify responses.
AI SDK APIs
generateTextOutput.objectgatewayProviders
External services
app/page.tsxapp/layout.tsxapp/api/brand-placement/route.tsapp/create-image-action.tsxapp/edit-image-action.tsxcomponents/gemini-flash-image.tsxcomponents/block-header.tsxcomponents/countdown.tsxlib/brand-context.tslib/brand-placement-schema.tslib/cached-brand-payloads.tslib/product-photo-prompts.tslib/rate-limit.tslib/image-utils.tshooks/use-image-version.tshooks/image-version-context.tsxREADME.mdnpm packages
8
Registry components
brand-placement/route.tsCore pipeline route: validates the URL, scrapes branding and markdown with Firecrawl, generates a schema-validated brief via generateText + Output.object, normalizes four supported template placements, and returns prompt-ready placement objects.
lib/brand-placement-schema.tsShared Zod contract for Firecrawl branding, prompt variables, placement concepts, and the BrandPlacementBrief schema. This keeps the route, UI, and prompt library aligned.
lib/product-photo-prompts.tsDeterministic local prompt library for product photography placements. The model chooses structured variables and template IDs, while final prompt composition stays in code via buildPrompt().
components/gemini-flash-image.tsxMain URL-first workbench UI. Handles extraction, structured brief hydration, parallel image generation for four cards, per-card loading/error states, and click-to-edit routing into the selected image panel.
hooks/use-image-version.tsReducer-based workflow and editor state for the block. Separates gallery placement generation from the selected image's local edit history and comparison logic.
app/edit-image-action.tsxSelected-image edit action using Gemini flash image preview. Converts the current image to a data URL, sends multimodal edit instructions, and returns a new image version for local comparison.
Early-bird pricing — limited time

Open on desktop for the interactive preview.
Paste a website URL to extract brand signals with Firecrawl, generate a structured product photography brief, auto-create four Nano Banana placement images, and click any result into a local edit flow.

All patterns include interactive previews and complete source files.
What you unlock: