AI-Powered Ad Creation SaaS ยท Pre-launch
A full-stack AI platform that generates 6 ready-to-publish ad variants from a single product photo in under 60 seconds. No prompt needed โ all information comes from the user forms. Our cost: ~$0.15 per generation (6 ads). The user gets editable text placement, colors, sizes, and effects. Agencies charge $200-500 per ad concept.
67 pages ยท 93 API routes ยท built FIRST
Built before the user-facing app. The operational backbone where marketing, finance, support, and product teams operate independently โ without engineering tickets.
Search by 10+ filters, credit operations with reason tracking, full activity history, suspend/reactivate with audit logging, internal notes, VIP segmentation.
No manual DB queries. Safe credit operations without touching SQL. One person operates the whole user base in seconds.
See which countries spend most โ target marketing budget. See usage vs subscription limit โ spot upsell timing (user at 50% mid-month = personalized offer).
Segment users by revenue, country, plan, risk score. Identify VIP accounts for retention campaigns. Spot churn risk before it happens.
Christmas, Valentine's, Easter, Halloween. 3 decoration levels (colors โ particles โ animations). Per-page control. Auto-scheduling. Multi-country support โ different themes for different markets simultaneously.
Built at the start because retrofitting CSS theming across 70+ pages later costs 10ร more. Per-page level control (no decorations on checkout). Set once, runs every year.
Different countries celebrate different holidays โ Mexico, US, UK can each see their own seasonal theme simultaneously. Multi-market from day 1, not a retrofit.
We are a visual platform that generates images. Premium visual feel is not optional โ it's mandatory. Users see seasonal themes and think 'they know what they're doing.' Trust โ retention โ revenue.
Fingerprint grouping (deduplicate), deploy-aware analysis ("new since last deploy"), flood protection (10 err/min cap), exact file + line failure, payload sanitization.
Exact code location on failure โ debug in minutes, not hours. 'New since last deploy' counter catches regressions immediately. Built-in flood protection prevents log explosion.
Why not Sentry? $26/mo at scale + external dependency + data leaves your infrastructure. Custom = $0/mo, integrated with our deploy pipeline, we control the data. Build cost < 1 year of Sentry.
Every hour of downtime = lost users. Fast debug = less downtime = users never see broken features for long. Reliability builds trust.
Full lifecycle (draft โ pending โ approved โ active โ expired). Founder approval gate. Bulk coupon generation. Referral programs. ROI tracking per promotion.
Approval workflow prevents unauthorized discounts from hitting production. No one can accidentally give 90% off to everyone. Financial safety built into the architecture.
Track ROI per promotion before committing budget. Test regional pricing. Referral programs = viral loop operated from admin UI, not code. Financial governance without meetings.
Run campaigns instantly without engineering tickets. A/B test offers per country. Schedule promotions weeks in advance. Marketing team operates independently.
๐ฐFinancial Ops
๐ท๏ธBanners
๐ฉFeature Flags
๐งชA/B Testing
๐Audit Trail
โค๏ธโ๐ฉนSystem Health
two separate systems ยท user vs admin
Regular users and admins have completely separate security models. Users go through Supabase Auth (standard SaaS pattern). Admins go through a custom 5-layer system โ because they have service_role access that bypasses all RLS policies and can see every user's data.
Regular User
1 layer ยท Supabase Auth + RLS
Admin Panel
5 layers ยท custom security ยท service_role
Why two systems?
authenticated role โ RLS enforced, sees own data onlyservice_role โ bypasses ALL RLS, sees everythingAdmins use service_role because they need to see all user data, manage billing, and operate the platform. That god-mode access is exactly why they need 5 layers of protection instead of 1.
Admin Request Flow โ /admin/* (every single request)
Edge โ cookie? โ redirect โ Auth โ admin_users table? โ rejected โ IP โ whitelist match? โ session killed โ 2FA โ TOTP verified? โ redirect โ Session โ Redis valid? โ CSRF โ timing-safe match? โ Permission โ role has access? โโ execute โ audit log โ response7 steps ยท 60 seconds ยท ~$0.15/generation ยท zero prompts
The user never writes a prompt. A 7-step wizard collects everything the AI needs โ company identity, product details, campaign goal, creative direction, and platform. Every form field has a purpose in the generation pipeline.
Brand name, colors, fonts, industry
Name, price, benefit, audience, description
Product photo(s) โ background auto-removed
Sales/Traffic/Messages + creative style + platform
AI Director + 2 scenes + 6 variants (auto)
6 ads with scores, like/dislike, edit, download
Multi-language ร multi-platform ร custom copy
Every form field has a destination
Upload
Product photo
AI Director
Creative plan
2 Scenes
Parallel gen
Spatial AI
Grid analysis
Template
54 matched
Neuro Color
Psychology
Render
Satori + CSS
6 Ads
Ready to publish
๐ง AI Creative Director
$0.008Vision-capable LLM analyzes the product image, generates a complete creative brief, plans 2 scene compositions, and writes 6 ad copy variants โ each with a unique persuasion angle (urgency, social proof, emotional, features, value, use-case). One call, complete plan.
๐ญParallel Image Generation
$0.0782 scenes generated simultaneously. 8 visual styles ร 20 mood variations = the user never sees the same result twice. Triple fallback chain guarantees output even if primary AI fails.
๐Spatial Intelligence
proprietaryProprietary system that mathematically determines optimal text placement and contrast colors for each generated scene. No guessing, no manual positioning โ the algorithm handles it. WCAG-compliant output.
๐จNeuromarketing Engine
proprietaryCTA colors are psychologically optimized per campaign goal and harmonized with the scene palette. Sales โ warm reds (impulse). Traffic โ blues (trust). Messages โ greens (conversational).
Supabase (PostgreSQL) ยท 215 tables
๐คUser Data
Users, companies, products, services. Multi-company support. AI-generated metadata.
๐คAI Generation
Image jobs, orchestrator state, director output, scene compositions, cost tracking per generation.
๐ณCommerce
Credits ledger (atomic RPCs โ no race conditions), Stripe webhooks (idempotent), transaction export.
๐๏ธAdmin
12 tables: audit_log (partitioned monthly), sessions, team, permissions, promotions, coupons, banners, themes.
๐จContent
54+ overlay templates with neuro-scores, font pairings, color palettes, quality metrics.
๐Security
420+ RLS policies, per-table rules, admin via controlled RPCs only, IP whitelist with CIDR.
why this exact stack ยท cost at scale
"But what about..." โ common enterprise concerns
๐ Multi-Region Deployment
Vercel deploys to edge locations globally โ USA, Europe, Asia, automatically. Cloudflare R2 serves assets from 300+ PoPs worldwide. Supabase runs in the region closest to your primary market. Users in London, New York, and Tokyo all get sub-100ms responses without configuring anything.
๐พ Data Backup & Redundancy
Supabase runs on AWS infrastructure with daily automated backups and point-in-time recovery (Pro plan). Cloudflare R2 stores data across multiple availability zones โ data is never in a single location. Vercel deployments are immutable โ every deploy is a snapshot you can roll back to instantly.
๐ Security at Scale
Our stack doesn't compromise on security. 420+ RLS policies enforce data isolation at the database level. Vercel provides DDoS protection and WAF. Cloudflare adds another security layer. Upstash Redis handles rate limiting. The 12-layer admin security is custom-built โ more thorough than what most companies implement even on AWS.
๐ Scalability (100 to 10M users)
Every service in our stack auto-scales: Vercel serverless functions scale to zero and up to millions. Supabase connection pooling handles concurrent users. R2 has no bandwidth limits. Inngest queues handle burst loads. The same stack that costs $0 in dev handles 1M users โ no re-platforming, no migration, no architecture change.
market-driven language selection ยท not random
Most competitors deploy in English only. We broke that barrier โ but not randomly. Each language was chosen based on e-commerce market size, growth trajectory, and competitive gap (how underserved that market is by existing ad tools).
The competitive advantage
With 5 languages we cover ~$6.1 trillion in combined e-commerce markets and 2.5+ billion speakers. Our architecture makes translation a near-zero-cost upsell (text is separate from images). A competitor adding one language needs to rebuild their rendering pipeline. We already support five โ and adding more is a database entry, not a code change.
stack: Next.js 16 ยท React 19 ยท TypeScript strict ยท Supabase ยท PostgreSQL ยท Stripe ยท Cloudflare R2 ยท Upstash Redis ยท Inngest ยท Railway ยท Fabric.js ยท Satori ยท Puppeteer ยท Tailwind CSS v4 ยท 5 languages
Real recordings from the production app. Not mockups โ this is photoaiadvantage.com running live.
The app is live and public
Create a free account and try the ad generation yourself. This is a real SaaS, not a demo.
Try PhotoAI Advantage โAdmin Panel Walkthrough
2FA login, user management, promotions, financial dashboard, error monitoring, feature flags, audit trail, seasonal themes โ navigating the full 70+ page admin panel.
Ad Generation Demo
Complete flow: company form โ product form โ image upload โ goal selection โ AI generates 6 ad variants โ open editor โ edit text placement, colors, effects.