A professional AI-powered web application that creates stunning visuals for any purpose - from YouTube thumbnails to product ads, banners, social media posts, logos, and more. Built with Next.js 15 App Router and TypeScript with full user authentication and cloud storage integration.
- Multi-Format Generation: Create thumbnails, product ads, banners, social posts, logos, infographics, cover photos, and story templates
- AI-Powered Creation: Combines OpenAI GPT for intelligent prompt enhancement and Gemini for high-quality image generation
- Template System: Professional templates for each image type with customizable elements and layouts
- Image Upload & Transform: Upload your photos and let AI transform them into professional marketing materials
- Smart Content Understanding: AI analyzes your input and creates contextually appropriate visuals for each format
- Brand-Aware Generation: Consistent styling across all image types with brand color and element integration
- Multiple Aspect Ratios: Support for all standard ratios (16:9, 9:16, 1:1, 4:5, 3:2, 2:3, 21:9, 16:10)
- Batch Generation: Creates multiple variations for each request with different styles and approaches
- Quality Options: Standard, High, and Ultra quality settings for different use cases
- User Authentication: Complete sign-up/sign-in system with Clerk integration
- Visual History: Save and access all your generated images across all formats
- Cloud Storage: Automatic image storage with Cloudinary integration
- Memory System: AI-powered user preferences and brand learning with Mem0 integration
- Analytics Dashboard: Comprehensive analytics for image performance and usage
- Template Library: 50+ professional templates across all image types
- Brand Management: Save brand colors, fonts, and logos for consistent generation
- Rating & Feedback: Rate generations to improve AI quality over time
- Mobile Responsive: Fully optimized for desktop, tablet, and mobile devices
- Progress Tracking: Real-time generation progress with detailed status updates
- Export Options: Download individual images, batch downloads, and organized ZIP files
- Format Conversion: Automatically optimize images for different platforms and use cases
- Frontend: Next.js 15 with App Router, TypeScript, React 19
- Styling: Tailwind CSS 4.0 with responsive design
- Animations: Framer Motion, Lenis for smooth scrolling
- Authentication: Clerk with webhook integration
- Database: Neon PostgreSQL with Drizzle ORM
- AI Services:
- OpenAI GPT-4 (Prompt Enhancement)
- Google Gemini 2.0 Flash (Image Generation)
- Mem0 (User Memory & Preferences)
- Storage: Cloudinary for image management
- State Management: Zustand
- File Processing: JSZip, File-Saver
- UI Components: Radix UI, Aceternity UI
- Icons: Lucide React
- Deployment: Vercel (recommended)
Before running this project, make sure you have:
- Node.js 18+ installed
- OpenAI API key with GPT-4 access
- Google Gemini API key with 2.0 Flash access
- Clerk account for authentication
- Neon PostgreSQL database
- Cloudinary account for image storage
- Mem0 API key for user memory
- Basic knowledge of Next.js and TypeScript
npm installCreate a .env.local file in the root directory:
# AI Services
OPENAI_API_KEY=your_openai_api_key_here
GEMINI_API_KEY=your_gemini_api_key_here
# Authentication
NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY=your_clerk_publishable_key
CLERK_SECRET_KEY=your_clerk_secret_key
CLERK_WEBHOOK_SECRET=your_clerk_webhook_secret
# Database
DATABASE_URL=your_neon_database_url
# Cloud Storage
CLOUDINARY_CLOUD_NAME=your_cloudinary_cloud_name
CLOUDINARY_API_KEY=your_cloudinary_api_key
CLOUDINARY_API_SECRET=your_cloudinary_api_secret
# Memory & AI
NEXT_PUBLIC_MEM0_API_KEY=your_mem0_api_key
# App Configuration
NEXT_PUBLIC_APP_URL=http://localhost:3000# Generate database schema
npx drizzle-kit generate:pg
# Run database migrations
npx drizzle-kit migrate:pgnpm run devOpen http://localhost:3000 in your browser to see the application.
renderly/
βββ src/
β βββ app/
β β βββ api/
β β β βββ enhance-prompt/ # OpenAI prompt enhancement
β β β βββ generate-image/ # General AI image generation
β β β βββ generate-thumbnail/ # Legacy thumbnail generation
β β β βββ templates/ # Template management API
β β β βββ thumbnails/ # Thumbnail management APIs
β β β β βββ save/ # Save thumbnails to database
β β β β βββ history/ # User thumbnail history
β β β β βββ rate/ # Thumbnail rating system
β β β β βββ download/ # Download management
β β β βββ webhooks/
β β β βββ clerk/ # User sync webhook
β β βββ app/ # Protected app routes
β β β βββ dashboard/ # User dashboard and image creation
β β β βββ history/ # All generated images history
β β β βββ library/ # Template library and management
β β β βββ analytics/ # Usage analytics and performance
β β β βββ settings/ # User settings and brand management
β β β βββ templates/ # Template browsing and customization
β β β βββ create/ # Image creation interface
β β βββ sign-in/ # Authentication pages
β β βββ sign-up/
β β βββ landing/ # Landing page
β β βββ about/ # About page
β β βββ features/ # Features page
β β βββ how-it-works/ # How it works page
β β βββ pricing/ # Pricing page
β β βββ globals.css # Global styles
β β βββ layout.tsx # Root layout with auth
β β βββ page.tsx # Home page redirect
β βββ components/
β β βββ ui/ # Reusable UI components
β β βββ landing/ # Landing page components
β β βββ layout/ # Layout components
β β βββ thumbnail/ # Legacy thumbnail components
β β βββ image-generation/ # Multi-format image generation components
β β βββ templates/ # Template selection and customization
β β βββ brand/ # Brand management components
β βββ db/
β β βββ schema.ts # Database schema
β β βββ index.ts # Database connection
β βββ lib/
β β βββ utils.ts # Utility functions
β β βββ constants.ts # App constants
β β βββ image-templates.ts # Template system and management
β β βββ brand-management.ts # Brand settings and consistency
β β βββ mem0.ts # Mem0 integration
β β βββ cloudinary.ts # Cloudinary integration
β βββ store/
β β βββ thumbnailStore.ts # Legacy thumbnail state
β β βββ imageGenerationStore.ts # Multi-format image generation state
β β βββ templateStore.ts # Template selection and customization
β β βββ brandStore.ts # Brand settings and preferences
β βββ types/
β β βββ index.ts # TypeScript definitions
β βββ scripts/
β β βββ migrate.ts # Database migration script
β βββ styles/
β βββ globals.css # Additional global styles
βββ drizzle.config.ts # Drizzle ORM configuration
βββ .env.local.example # Environment variables template
βββ tailwind.config.js # Tailwind CSS configuration
βββ next.config.js # Next.js configuration
βββ package.json
- Sign Up/Sign In: Create an account or sign in to access all features
- Choose Image Type: Select from thumbnails, product ads, banners, social posts, logos, infographics, cover photos, or story templates
- Pick Your Method: Use templates, upload images, or create from text prompts
- Browse our library of 50+ professional templates
- Filter by image type, category, style, or aspect ratio
- Customize text areas and image elements
- Generate variations based on the template structure
- Upload your photos (JPEG, PNG, WebP, up to 50MB)
- Choose image type and desired style
- Specify how to integrate your photo (placement, role)
- AI transforms your image into professional marketing material
- Describe what you want to create
- Select image type, category, style, and mood
- Choose aspect ratio and quality settings
- Add text content, brand elements, and advanced options
- Image Types: Thumbnails, Product Ads, Banners, Social Posts, Logos, Infographics, Cover Photos, Story Templates
- Content Categories: Gaming, Tutorial, Business, E-commerce, Social Media, Marketing, Personal, Education, Technology, Lifestyle
- Visual Styles: Modern, Vintage, Minimalist, Bold, Professional, Creative, Corporate, Artistic, Playful, Elegant
- Color Schemes: Vibrant, Monochrome, Pastel, Dark, Light, Gradient, Brand Colors, Complementary
- Aspect Ratios: 16:9, 9:16, 1:1, 4:5, 3:2, 2:3, 21:9, 16:10
- Quality Levels: Standard, High, Ultra (up to 4K resolution)
- Brand Settings: Save your brand colors, fonts, and logo
- Consistent Generation: AI learns your brand and maintains consistency
- Template Customization: Adapt templates to match your brand identity
- Batch Generation: Create multiple variations in one request
- History & Analytics: Track all your creations and their performance
- Export Options: Download individual files or organized ZIP packages
- Rating System: Improve AI quality by rating your generations
| Variable | Description | Required |
|---|---|---|
OPENAI_API_KEY |
OpenAI API key with GPT-4 access | Yes |
GEMINI_API_KEY |
Google Gemini API key | Yes |
NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY |
Clerk publishable key | Yes |
CLERK_SECRET_KEY |
Clerk secret key | Yes |
CLERK_WEBHOOK_SECRET |
Clerk webhook secret | Yes |
DATABASE_URL |
Neon PostgreSQL database URL | Yes |
CLOUDINARY_CLOUD_NAME |
Cloudinary cloud name | Yes |
CLOUDINARY_API_KEY |
Cloudinary API key | Yes |
CLOUDINARY_API_SECRET |
Cloudinary API secret | Yes |
NEXT_PUBLIC_MEM0_API_KEY |
Mem0 API key for user memory | Yes |
NEXT_PUBLIC_APP_URL |
Application URL for share links | No |
- Clerk Webhook: Set up user sync webhook at
/api/webhooks/clerk- Events:
user.created,user.updated,user.deleted - Endpoint:
https://yourdomain.com/api/webhooks/clerk
- Events:
Comprehensive documentation is available in the /docs folder:
- Documentation Index - Complete documentation overview
- Quick Start Guide - Get up and running fast
- Implementation Guide - Detailed setup instructions
- Apply Migration Now - Fix 500 errors (database migration required)
- Image Iteration Feature - How the iteration system works
- Testing Guide - Test the iteration feature
- mem0 Integration - AI memory system
- Dev Mode Guide - Development mode toggle
- Image Persistence - Database persistence solution
- Fix Chat History Error - Resolve chat loading issues
- Migration Testing - Post-migration verification
See the full documentation index for all available guides.
This project is licensed under the MIT License.
- OpenAI for GPT-4 API
- Google for Gemini 2.0 Flash API
- Vercel for Next.js framework and deployment platform
- Tailwind CSS for styling framework
- flowmind for interface design inspiration
Made with β€οΈ for YouTubers worldwide
Generate professional visuals for any purpose in seconds, not hours.