๐ฆ Amazon Product Studio
June 29, 2026 ยท View on GitHub
Generate studio-quality product photos and ad creatives from reference images in seconds. A production-ready, self-hostable Next.js SaaS boilerplate with multi-image upload (up to 14 references), preset templates, aspect ratio control, webhook-backed async delivery, and built-in Stripe billing. A free open-source alternative to Flair AI, Booth AI, Photoroom, and Pebblely โ powered by the MuAPI AI engine.
Tech stack: Next.js 14 (App Router) ยท Prisma ยท PostgreSQL ยท NextAuth (Google OAuth) ยท Stripe ยท Tailwind CSS ยท MuAPI ยท Webhook-backed async delivery Use cases: Amazon sellers ยท E-commerce product photography ยท DTC brand marketing ยท Shopify store owners ยท Ad creative teams ยท Product listing optimization ยท Dropshippers ยท Social media product ads
https://github.com/user-attachments/assets/45866dbe-d5e5-4e94-8f76-386b5aab2f22
๐ Project Details
GitHub Repository: github.com/SamurAIGPT/amazon-product-studio
Live Demo Preview: amazon-product-studio.vercel.app
Amazon Product Studio is a production-ready, highly-optimized AI web application. Out of the box, it seamlessly manages User Authentication, Credits & Billing, Image Persistence, and asynchronous AI scene rendering using a sleek Next.js (App Router) architecture. It empowers e-commerce store owners, marketing designers, and brand managers to create stunning studio-quality product photos in seconds โ all without expensive photoshoots.
Why use Amazon Product Studio?
- Production-Ready SaaS โ Complete with Google OAuth and Stripe Checkout workflows built-in.
- AI Scene Studio โ Upload up to 14 product reference photos, select aspect ratios, choose presets or enter custom prompts, and see results instantly.
- Webhook-Backed AI Delivery โ MuAPI async webhook delivers results directly into the database (
/api/webhooks/ai), keeping API routes non-blocking and preventing request timeouts. - Creations History Gallery โ All generated ad scenes are saved to PostgreSQL. Users can review, compare, download, and track their designs on the main workspace page.
- Responsive Screen-Fitting โ Designed with a fluid layout that fits perfectly on all screens (mobile, tablet, desktop) using stacked adaptive grids on mobile and viewport-locked scrolling on desktop.

โจ Core Features
๐จ AI Product Photography Studio (Main Page /)
- Multi-image reference uploads supporting up to 14 photos (ideal for transparent product PNGs or standard reference images). Real-time preview thumbnails with delete action.
- Custom dropdown for Aspect Ratio: 1:1 (Square), 4:3 (Landscape), 3:4 (Portrait), 16:9 (Widescreen), 9:16 (Story).
- 7 pre-designed scene templates (presets) including: Minimalist Marble, Luxury Spotlight, Rustic Wood, Granite Countertop, Sunny Beach, Forest Moss, and Modern Office.
- Reset to default template button to quickly clear or restore baseline prompt directions.
- Cost: 18 credits per AI generation.
๐ผ๏ธ Creations History Gallery
- Bottom horizontal thumbnail grid of all generated product listing scenes.
- Cards show a thumbnail and indicators for status (
processing/completed/failed). - Active creation details: prompt overlay, selected aspect ratio, download high-res button, and floating thumbnail references.
- Auto-polls every 4 seconds for processing gallery items, plus 3 seconds active generation polling.
๐ณ Stripe Credit Billing (/pricing)
- Four credit packs based on a $1 = 200 credits conversion rate:
- Basic Pack ($5 / 1,000 credits โ up to 55 generations)
- Standard Pack ($10 / 2,000 credits โ up to 111 generations)
- Pro Pack ($20 / 4,000 credits โ up to 222 generations โ Most Popular)
- Business Pack ($50 / 10,000 credits โ up to 555 generations)
- No recurring subscriptions โ pay once, use at your own pace.
- Credit balance is automatically topped up via Stripe webhook on checkout completion.
๐ Google Auth + Credit Persistence
- NextAuth Google provider with Prisma adapter โ user sessions, credit balances, and galleries are all persisted per account.
- Credits displayed live in the Navbar with a coin icon.
โก Deployment: Vercel & Production
This architecture is engineered explicitly for Vercel serverless environments.
One-Click Deploy
Live App: amazon-product-studio.vercel.app
๐ Required Environment Variables
To successfully deploy and run, you must populate the following environment variables in your Vercel project settings:
| Service | Variable | Description & Source |
|---|---|---|
| Database | DATABASE_URL | PostgreSQL connection string (Supabase or Neon) |
DIRECT_URL | Non-pooling direct PostgreSQL URL (for migrations) | |
| NextAuth / Google | NEXTAUTH_SECRET | Secure random string generated via openssl rand -base64 32 |
NEXTAUTH_URL | Your production domain (e.g. https://my-app.vercel.app) | |
WEBHOOK_URL | Public URL for MuAPI async callbacks (same as NEXTAUTH_URL in production) | |
GOOGLE_CLIENT_ID | Get from Google Cloud Console | |
GOOGLE_CLIENT_SECRET | Get from Google Cloud Console | |
| Stripe Billing | STRIPE_SECRET_KEY | Get from Stripe Dashboard |
NEXT_PUBLIC_STRIPE_PUBLISHABLE_KEY | Get from Stripe Dashboard | |
STRIPE_WEBHOOK_SECRET | Webhook secret for resolving credit purchases | |
| AI Generation | MU_API_KEY | Create an account and get key from muapi.ai/access-keys |
| Theme | NEXT_PUBLIC_THEME | Theme selection (default dark) |
๐ Launching on Vercel: Step-by-Step
- Database Provisioning: Create a new Postgres database (via Supabase or Neon). Retrieve the connection string (
DATABASE_URL). - Project Creation: Import your GitHub fork into the Vercel dashboard.
- Configure Environment Variables: Copy the variables above into the Vercel project settings environment tab.
- Deploy: Hit "Deploy". Vercel will automatically run the build steps (
npm run build). - Database Push: Run
npx prisma db pushto synchronize database models before launching. - Integrations Setup:
- Establish a Google Cloud OAuth app, enabling the callback URL:
https://your-app.vercel.app/api/auth/callback/google - Setup a Stripe Webhook, pointing to
https://your-app.vercel.app/api/stripe/webhookand selecting thecheckout.session.completedevent. - Register a MuAPI Webhook pointing to
https://your-app.vercel.app/api/webhooks/aito receive async generation results.
- Establish a Google Cloud OAuth app, enabling the callback URL:
๐ ๏ธ Local Development
Ready to iterate locally? Setup is straightforward.
Prerequisites
- Node.js (v18 or higher)
- A local PostgreSQL instance or a free cloud Database URL.
- ngrok (optional, for local MuAPI webhook testing)
Setup
# 1. Clone the repository
git clone https://github.com/SamurAIGPT/amazon-product-studio
cd amazon-product-studio
# 2. Install dependencies
npm install
# 3. Setup Environment
cp .env.example .env
# Open .env and insert your specific keys.
# 4. Initialize Database Schema
# Note: Because the database is shared, see the Safety Warning below!
npx prisma generate
npx prisma db push
# 5. Start the Development Server
npm run dev
The console should now be active on http://localhost:3000.
Webhook Tip: For local MuAPI webhook testing, run
ngrok http 3000and setWEBHOOK_URLto the generated HTTPS URL in your.env.
โ ๏ธ Database Safety Warning (Shared Pool)
The workspace database is shared with other applications. Running npx prisma db push on a clean, empty schema will drop tables belonging to other applications. Always follow the Pull-Declare-Push-Cleanup sequence:
- Run
npx prisma db pullto fetch all database tables. - Declare your
AmazonProductCreationtable and update the relations on theUsermodel. - Run
npx prisma db pushto add your changes safely. - Clean up
schema.prismato keep only NextAuth models,AmazonProductCreation, and the updatedUserrelations. - Run
npx prisma generateto rebuild the type-safe client.
๐๏ธ Technical Architecture
amazon-product-studio/
โโโ prisma/
โ โโโ schema.prisma # PostgreSQL models (User, Account, Session, AmazonProductCreation)
โโโ src/
โ โโโ app/ # Next.js App Router
โ โ โโโ page.js # Main Studio Workspace (Uploads, Aspect Ratio, Presets, Prompts)
โ โ โโโ pricing/ # Pricing page with 4 credit billing plans
โ โ โ โโโ page.js
โ โ โโโ globals.css # Global CSS configurations (Tailwind 4)
โ โ โโโ layout.js # App router top-level layout
โ โ โโโ api/
โ โ โโโ auth/ # NextAuth credentials handling
โ โ โ โโโ [...nextauth]/
โ โ โ โโโ route.js
โ โ โโโ creations/ # GET (fetch history & polling) and POST (submit new scene tasks)
โ โ โ โโโ route.js
โ โ โโโ download/ # GET proxy to force-download high-res generated images
โ โ โ โโโ route.js
โ โ โโโ upload/ # Proxy to forward images securely to MuAPI
โ โ โ โโโ route.js
โ โ โโโ stripe/ # Stripe billing routes
โ โ โ โโโ checkout/
โ โ โ โ โโโ route.js # Create checkout session
โ โ โ โโโ webhook/
โ โ โ โโโ route.js # Stripe event fulfillment callback
โ โ โโโ webhooks/ # MuAPI webhooks
โ โ โโโ ai/
โ โ โโโ route.js # Async generation completion callback
โ โโโ components/
โ โ โโโ Providers.jsx # SessionProvider wrapper
โ โ โโโ saas/
โ โ โโโ AuthButtons.jsx # Google Login & Logout controls
โ โ โโโ CreditBadge.jsx # Navbar credit status coin indicator
โ โ โโโ Navbar.jsx # Sticky layout navbar header
โ โโโ lib/
โ โโโ auth.js # NextAuth adapter configuration
โ โโโ config.js # Central environment configurations
โ โโโ prisma.js # Cached Prisma Client instance
โ โโโ stripe.js # Stripe client initialization
โ โโโ services/
โ โโโ ai.js # Submit task, check status, and process callbacks
โ โโโ billing.js # Checkout creation and webhook processing
โ โโโ user.js # Add, deduct, and refund credit balances
๐ License
MIT Licensed.
Amazon Product Studio: A premium, high-contrast, fully responsive AI product photography studio built for e-commerce store owners, digital brands, and marketing teams.