Case study · 2025 · AI · E-commerce

One product photo in. Commercial-grade visuals out in sixty seconds.

Imagika is an AI image generation platform we ship at Synara. A category-aware prompt-engineering layer, four style variations per category, a brand-photoshoot wizard, a browser extension, and an append-only credit ledger that handles billing without lying about money — all on a single Hono API mounted inside Next.js.

  • ClientSynara product
  • CategoryAI image generation · E-commerce · Multi-surface
  • Year2025
  • EngagementBuilt and operated by Synara · live with paid plans
Imagika AI image generation platform — single product photo input, commercial-grade visual output in 30-60 seconds.
01 — At a glance
30–60s
Reference → resultFrom upload to commercial-grade output per generation.
7
Auto-detected categoriesFashion, beauty, food, tech, jewelry, home, general.
4
Style variations per categoryDistinct, on-brand looks generated per upload.
Summary

E-commerce teams spend disproportionate amounts of money on product photography — flat lays, lifestyle shots, hero images, brand-consistent backgrounds. The cost is mostly fixed: studios, photographers, lighting, post-production. Imagika collapses that into a single AI flow. Upload one reference photo. Imagika auto-detects the product category, applies a category-specific realism layer, generates four style variations, and returns commercial-grade imagery in thirty to sixty seconds. The product is live at imagika.in with paid plans, runs on a credit ledger that's immutable from day one, and ships across four surfaces — web app, design canvas, brand-photoshoot wizard, and browser extension — from a single backend.

The problem

Procurement was held together with Excel and goodwill.

Generic AI image models — Midjourney, DALL·E, the default Gemini call — produce beautiful images and unusable product photography. The reason is structural. A general-purpose model has no idea that a fashion garment must be lit differently from a piece of jewelry, that food photography has its own conventions for plating and depth of field, that a tech product wants a clean industrial backdrop and a beauty product wants a warmer one. The model produces images. It does not produce *commercial* images.

Most e-commerce teams that try to use generative AI for product photography land in the same workflow. They prompt the model. They get an output. They notice the lighting is wrong. They re-prompt. They get a slightly better output. They notice the product looks subtly off. They re-prompt. After forty minutes, they have one usable image, and they've spent more time on the prompt than they would have on a real photoshoot.

The moat isn't the model. The model is a commodity. The moat is the prompt-engineering layer between the user and the model.

The opportunity wasn't building a better model. The opportunity was the *prompt-engineering layer* sitting between the user and the model — a layer that knows the product category, knows what "commercial" means for that category, knows the failure modes of the underlying model and how to write the negative prompts that suppress them.

We also wanted the platform to be surface-flexible. Some users want a guided wizard ("pick a category, pick a style, generate"). Some want a design canvas where they can drag, drop, and refine. Some want a Chrome extension so they can produce product imagery wherever they're working. Same backend, different front doors.

Imagika upload flow — a single reference photo dragged onto the surface, the platform showing 'detected: jewelry' with four style variation previews appearing below.

One upload. The platform detects the category, picks the realism layer, surfaces four style options.

02 — Why us

Why Synara owns this

Imagika is a Synara product. We built it because we kept watching e-commerce teams produce unusable AI-generated product imagery and we believed the structural rebuild — category-aware prompt engineering, multi-surface delivery, immutable billing — was worth a product, not a blog post.

We also wanted a flagship product that exercised the architectural decisions we'd otherwise recommend to clients in the AI-product space — Hono inside Next.js, Drizzle on Neon Postgres, Supabase for auth, an append-only credit ledger, webhook-driven billing via a Deno Edge Function with signature verification. Imagika is a working reference implementation of every primitive in that recommendation.

03 — What we built

A three-portal procurement platform — buyer, supplier, admin.

Imagika rendered on a MacBook on a warm clay surface — a product photo on the left, four generated style variations on the right, brand-photoshoot wizard panel docked.
01

Category-aware prompt engineering

Auto-detects product category (fashion, beauty, food, tech, jewelry, home, general) from the uploaded reference. Applies category-specific realism instructions, lighting heuristics, and a curated set of negative prompts to suppress the model's known failure modes for that category.

02

Four style variations per category

Each category ships with four distinct, on-brand style variations — clean studio, lifestyle context, dramatic editorial, brand-photoshoot. The user picks the look; Imagika handles the prompt-shape underneath.

03

Brand-photoshoot wizard

Three-step flow — category → customize → generate — for e-commerce teams who don't want to write prompts at all. The wizard collects brand color, mood, and target context, then assembles the underlying prompt automatically.

04

Drag-and-drop design canvas

A canvas surface with a floating toolbar. Drop a product photo, drag in mockup props, refine a single image with iterative prompts. Built for power users who want fine-grained control without leaving the platform.

05

Browser extension companion

A Chrome extension that lets users generate product imagery directly from any product page they're editing — Shopify, WooCommerce, an internal CMS. Same backend, the extension just changes the entry surface.

06

Credit-based billing with an immutable ledger

Users buy credit packs through Dodo Payments. Every credit event — purchase, spend, refund — is an append-only ledger entry. The user's current balance is a derived cache. Refunds, races, and audits all become simple queries instead of recovery rituals.

Imagika billing surface — credit balance shown prominently, a transaction history table below showing purchases, spends, and a refund all as separate immutable entries.

The ledger is the source of truth. The balance is a derived cache. Refunds and audits become queries.

04 — Architecture

In plain English, why each choice.

Frontend
Next.js 15 + React 19 with the App Router. Tailwind v4 for the styling layer. Server components where data lives server-side; client islands for the canvas, the upload flow, and the wizard. Shared component library across the web app, the wizard, and the extension build.
API: Hono inside Next.js
All API endpoints are served by a single Hono application mounted at `app/api/[...route]/route.ts`. Routes organized by domain — auth, payments, credits, users, products, images, style-prompts. CORS, per-route rate limiting (100 req/min/IP), secure headers, and a unified error middleware live in one place. One deploy artifact, one runtime to operate.
Data layer
Postgres on Neon with Drizzle ORM. The `credit_ledger` table is immutable — entries are appended, never updated. The user's `current_credits` is a derived cache. Style prompts, product categories, generation history, and image metadata all live in typed Drizzle schemas with Zod validation at the API boundary.
Auth + identity
Supabase Auth handles GitHub and Google OAuth. We use three client variants — client-side, server-side (with cookies), and admin — split into separate modules so the wrong client never ends up in the wrong place. JWTs verified server-side on every protected endpoint.
AI pipeline
Google Gemini 2.5 Flash Image as the generation model. The prompt-engineering layer runs server-side: category detection, style application, negative-prompt assembly. Generated images are streamed back to the client and persisted in Cloudinary with WebP auto-optimization for delivery.
Webhooks + billing
Dodo Payments handles credit purchases. The webhook handler is a Deno Edge Function in Supabase that verifies signatures using `standardwebhooks`, then upserts to the `payments` table and inserts a credit-purchase entry into the ledger. Idempotency comes for free from the unique constraint on the external-reference column.
05 — Outcomes

What changed after launch.

Live
Production statusimagika.in with paid plans.
Single artifact
Deploy shapeHono inside Next.js — one runtime, one CI/CD.
Immutable
Billing primitiveAppend-only credit ledger; no mutable balances.
4 surfaces
Front doorsWeb app, canvas, wizard, browser extension — one backend.

MethodologyArchitectural outcomes are properties of the deployed codebase and shipped product. Production status is verifiable at imagika.in. Generation latency benchmarks reported as p95 on the production environment over a rolling 30-day window.

We stopped trying to make Midjourney behave for products. Imagika just knows what category we are uploading and what the result should look like.

E-commerce operatorEarly Imagika customer
06 — What’s next

Brand-consistency mode that locks a generated image to a brand's existing visual identity (color, lighting, mood). A video-product mode that produces short looping clips for hero sections and ads. And a deeper enterprise tier — team workspaces, brand asset libraries, programmatic API access for bulk catalog generation.

Stack
  • Next.js 15
  • React 19
  • Tailwind v4
  • Hono
  • Drizzle ORM
  • Postgres (Neon)
  • Supabase Auth
  • Google Gemini
  • Cloudinary
  • Dodo Payments
  • Supabase Edge Functions
  • Bun
  • Vercel

Building an AI image product for a category that needs more than a model?

Generic generative models produce images. Categorical products need a prompt-engineering layer, multi-surface delivery, and billing that doesn't fall apart on the first refund. We can scope an Imagika-shaped product for fashion, beauty, food, jewelry, real estate, or any vertical where 'commercial' has a specific meaning.

Start a conversation